[Solved] Custom rec exten with 3way conference

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

[Solved] Custom rec exten with 3way conference

Postby airflux » Tue Feb 14, 2017 11:58 am

Hi all.
We have a campaign where agents, for each sale, needs to call an external phone number using 3way conference to send the registration of the verbal ordering in realtime to an external system.
This 3way call is answered by a PBX that asks for PIN, the agent sends the PIN using DTMF to start the registration inside the external system, then read the verbal ordering, and at the end the agent sends DTMF # to stop the registation inside the external system.

We are doing this manually using the web interface in this way:
- START RECORDING
- TRASFER - CONF, using PRESETS they loads number to call and PIN in DTMF field
- DIAL WITH CUSTOMER, after 8-10 seconds SEND DTMF (PIN)
- SEND DTMF #, after some seconds HANGUP XFER LINE, then STOP RECORDING

I would like to create something more simple for agents, maybe writing something custom for START RECORDING (Campaign Rec Exten - default 8309) and STOP RECORDING (i don't know how to handle this event from exten), or add an SCRIPT that contains the buttons "CUSTOM START REC" and "CUSTOM STOP REC" calling the manager_send.php events triggered by my manual procedure, but I'm stuck in both this ideas!

I need some help, pls :)
Last edited by airflux on Thu Feb 23, 2017 1:57 pm, edited 1 time in total.
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm

Re: Custom rec exten with 3way conference

Postby airflux » Thu Feb 23, 2017 1:57 pm

I've found a way to do what I need, I hope this can help someone :)

I've added a new script that loads my_custom_recorder.php page that contains START and STOP links, the script text contains the following html:
Code: Select all
<iframe src="../agc/my_custom_recorder.php?user=--A--user--B--&server_ip=--A--server_ip--B--" style="background-color:transparent;" scrolling="auto" frameborder="0" allowtransparency="true" id="popupFrame" name="popupFrame"  width="--A--script_width--B--" height="--A--script_height--B--" STYLE="z-index:17"> </iframe>


In my_custom_recorder.php file there are 2 sequences of curl_get($url) to handle the START and STOP actions, plus some extra code to crypt the agent user ($agent) in links to try to avoid jokes between agents (lol), I should find a better solution.

START:
http:// $server_ip/agc/api.php?source=external_rec&user=$api_user&pass=$api_pass&agent_user=$agent&function=recording&value=START
http:// $server_ip/agc/api.php?source=external_rec&user=$api_user&pass=$api_pass&agent_user=$agent&function=transfer_conference&value=DIAL_WITH_CUSTOMER&phone_number=$external_recorder_number
sleep(16); // I don't know how to catch the silence after the pin request, then this is the best (bad) idea I've got :)
http:// $server_ip/agc/api.php?source=external_rec&user=$api_user&pass=$api_pass&agent_user=$agent&function=send_dtmf&value=$pin

STOP:
http:// $server_ip/agc/api.php?source=external_rec&user=$api_user&pass=$api_pass&agent_user=$agent&function=send_dtmf&value=P // P = #,
sleep(16); // I need to listen the final message from the external recorder
http:// $server_ip/agc/api.php?source=external_rec&user=$api_user&pass=$api_pass&agent_user=$agent&function=recording&value=STOP
http:// $server_ip/agc/api.php?source=external_rec&user=$api_user&pass=$api_pass&agent_user=$agent&function=transfer_conference&value=HANGUP_XFER

Agent API are powerful.
Vicibox 7.0.2 - V. 2.12-551a Build 160427-1656 - svn 2353 – 3 Dell R610 (1 db+www - 4 sas raid 10, 2 dialers - 2 sas raid 1)
Vicibox 7.0.3 - V. 2.14-585a Build 170114-1356 - svn 2659 – 2 Dell R610 (1 db+www - 4 sas raid 10, 1 dialer - 2 sas raid 1)
airflux
 
Posts: 29
Joined: Fri Nov 07, 2014 12:39 pm


Return to Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 63 guests