Coder Social home page Coder Social logo

pchero / asterisk-outbound Goto Github PK

View Code? Open in Web Editor NEW
9.0 9.0 5.0 1.46 MB

Strategical outbound dialing module for Asterisk

License: BSD 2-Clause "Simplified" License

Makefile 1.15% C 71.06% Python 26.39% C++ 0.07% JavaScript 1.23% HTML 0.10%

asterisk-outbound's People

Contributors

pchero avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

asterisk-outbound's Issues

dl_org scheme update

  • Add/Change current dialing info to dl_org.
  • These values are should be set when dialing and should be freed after write result.
  • dialing_chan_unique_id => dialing_uuid
  • dialing_camp_uuid
  • dialing_plan_uuid
  • dialing_channel
  • Check also(res_dial, res_hangup)

Add info_*

  • Add info_dial : original dial info
  • Add info_dl : original dl list info

Add campaign remove

  • Do not delete from the database.
  • Make use column.
  • use:0(Not in use), use:1(in use)
  • Change to check only use campaign when trying to get the campaign.

Crash when create new plan

When send OutPlanCreate AMI message with no options, it crashed.

Action: OutPlanCreate

Connection closed by foreign host.
[Oct  2 15:14:53] NOTICE[30503]: src/plan_handler.c:85 create_plan: Create plan. uuid[215d980f-9ac6-4f20-86fb-292acb3f789a], name[(null)]

Added Failure response handler for OriginateResponse event

Need to add the originate failure handler.

[Oct  5 22:00:14] DEBUG[3379] src/ami_handler.c: Received event. tmp[{"event":"OriginateResponse","context":"res_outbound","privilege":"call,all","response":"Failure","channel":"sip/sip/302","calleridname":"","reason":"0","exten":"d1306a32-0ec6-4389-a5f1-118153b6266e","calleridnum":"","uniqueid":"d2e1a48c-59ab-4233-a156-ca6e2da09748"}]

Add tutorial to manual

Add a simple to manual.

Probably, this sequence.

  • preparing
    -- Add the agent(sip) info.
    -- Add the client(sip) info.
    -- Create a queue.
  • Create a Dl with Dlma
  • Create a Plan
  • Create a Campaign using created Dlma and Plan
  • Campaign run

Add cli campaign status set

Add cli campaign status set

  • out set campaign status <start|stop|stopping>
  • Update campaign status of campaign.

Result data check.

Something is not correct..

MariaDB [outbound]> select tm_dial_begin, tm_dial_end, tm_pickup, tm_redirect, tm_bridge, tm_hangup, tm_tr_dial_begin, tm_tr_dial_end, tm_tr_hangup  from dl_result;
+----------------------------+----------------------------+----------------------------+-------------+-----------+----------------------------+------------------+----------------+--------------+
| tm_dial_begin              | tm_dial_end                | tm_pickup                  | tm_redirect | tm_bridge | tm_hangup                  | tm_tr_dial_begin | tm_tr_dial_end | tm_tr_hangup |
+----------------------------+----------------------------+----------------------------+-------------+-----------+----------------------------+------------------+----------------+--------------+
| 2016-10-07 00:09:40.931232 | 2016-10-07 00:10:00.738987 | 2016-10-07 00:09:40.919762 | NULL        | NULL      | 2016-10-07 00:10:12.340689 | NULL             | NULL           | NULL         |
+----------------------------+----------------------------+----------------------------+-------------+-----------+----------------------------+------------------+----------------+--------------+
1 row in set (0.00 sec)

MariaDB [outbound]> select res_dial, res_amd, res_amd_detail, res_hangup, res_hangup_detail, res_tr_dial, res_tr_hangup, res_tr_hangup_detail from dl_result;
+----------+---------+----------------+------------+-------------------+-------------+---------------+----------------------+
| res_dial | res_amd | res_amd_detail | res_hangup | res_hangup_detail | res_tr_dial | res_tr_hangup | res_tr_hangup_detail |
+----------+---------+----------------+------------+-------------------+-------------+---------------+----------------------+
|        4 | NULL    | NULL           |         16 | Normal Clearing   | NULL        | NULL          | NULL                 |
+----------+---------+----------------+------------+-------------------+-------------+---------------+----------------------+
1 row in set (0.00 sec)

Change database from maria/mysql to sqlite3

I have been think about this for a long time.

The answer is, need to change it. Because, there's lot's of benefits if it change.

For example, if it uses the sqlite3, to install the module, it doesn't need to run the script by manual.

Wrong dialing

the asterisk-outbound module makes a lots of calls for the 1 customer,

Add cli campaign create

Add cli campaign create

  • out create campaign
  • Create campaigns...
  • Returns created campaign info.

Support dialings AMI

Action: OutDialingShow
-> Show every dialings
-> Show specified dialings

Action: OutDialingSummary
-> Show summarized info of dialings

Event: OutDialingCreate
-> Notify created dialing

Event: OutDialingUpdate
-> Notify updated dialing

Event: OutDialingDelete
-> Notify deleted dialing

Plan Cli/AMI command

Create below commands. When delete the Plan, just set the in_use flag to 0.

OutPlanCreate
OutPlanUpdate
OutPlanDelete

Warning messages when module load

warning messages print when the module is loading.

pluto*CLI> module load res_outbound.so 
Loaded res_outbound.so
Connected to mysql. host[localhost], user[root], dbname[outbound]
Initiated module.
[Oct  3 20:51:37] NOTICE[32577]: src/dialing_handler.c:38 init_rb_dialing: Initiated dialing handler.
[Oct  3 20:51:37] NOTICE[32577]: src/ami_handler.c:271 ami_evt_handler: Start zmq_evt hook.
[Oct  3 20:51:37] NOTICE[32577]: src/ami_handler.c:53 init_ami_handle: Initiated AMI handler.
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutCampaignShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutPlanShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlmaShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDlListShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueCreate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueUpdate in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueDelete in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutQueueShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDialingShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDialingShow in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDialingSummary in XML documentation
[Oct  3 20:51:37] WARNING[32577]: xmldoc.c:2204 xmldoc_build_field: Couldn't find manager OutDialingSummary in XML documentation
[Oct  3 20:51:37] NOTICE[32612]: src/event_handler.c:135 init_outbound: Initiated outbound.

Set wrong value for CampaignCreate

When create Campaign, it sets wrong value.

Plan, TmDelete

    Action: OutCampaignCreate
    
    Response: Success
    Message: Campaign created successfully
    
    Event: OutCampaignCreate
    Privilege: message,all
    Uuid: 5686822c-f596-483c-acaa-e96c12294e68
    Name: 
    Detail: 
    Status: 0
    Plan: (null)
    Dlma: 
    TmCreate: 
    TmDelete: 2016-10-02 14:28:45.812672
    TmUpdate: 

Remove not in use object

Need to remove not in use objects from below..

j_dest,
j_camp,
j_plan,
j_dl_list,
j_dlma,
...

out show dlma list error

pluto*CLI> out show dlma 9155a63e-6577-4abc-96e4-2c7811b5f639 10
No such command 'out show dlma 9155a63e-6577-4abc-96e4-2c7811b5f639 10' (type 'core show help out show' for other possible commands)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.