[Freeswitch-users] Post Hangup string

Bogdan Patrascoiu bogdan.patrascoiu at sinergetic.ro
Fri Jun 11 08:11:28 PDT 2010


Hello,

First thank you for the ideas, in this case the agent is leg A because
it's an outbound callcenter the operators initiate all the calls.
What we did in the dialplan was :

      <action application="set" data="transfer_after_bridge=*3472"/>
      <action application="bind_meta_app" data="0 a s transfer::*3472"/>
      <action application="record_session" data="${record_file}"/>

The script for *3472 being :

 function mycb( session, type, obj, arg ) {
                try {
                        if ( type == "dtmf" ) {
                                console_log( "info", "digit: "+obj.digit+"\n" );
                                if ( obj.digit == "#" ) {
                                        //console_log( "info",
"detected pound sign.\n" );
                                        exit = true;
                                        return( false );
                                }
                                dtmf.digits += obj.digit;
                                if ( dtmf.digits.length >= digitmaxlength ) {
                                        exit = true;
                                        return( false );
                                }
                        }
                } catch (e) {
                        console_log( "err", e+"\n" );
                }
                return( true );

var dtmf = new Object( );
        dtmf.digits = "";

        if ( session.ready( ) ) {
                session.answer( );

                if (admin_pin.length > 0) {
                        digitmaxlength = 2;
                        session.streamFile(
"/usr/local/freeswitch/sounds/custom/callcenter/1.wav", mycb, "dtmf");
                        session.collectInput( mycb, dtmf, timeoutpin );
                        //console_log( "info", "DISA pin: " +
dtmf.digits + "\n" );
                }

                while (dtmf.digits > 21 || dtmf.digits < 1) {

                        session.streamFile(
"/usr/local/freeswitch/sounds/custom/callcenter/2.wav", mycb, "dtmf");
                        dtmf.digits = "";
                        session.collectInput( mycb, dtmf, timeoutpin );

                }

                        session.streamFile(
"/usr/local/freeswitch/sounds/custom/callcenter/3.wav", mycb, "dtmf");
                        session.execute("set","cod_status="+dtmf.digits);
                        console_log( "info", "DISA Pin: " +
dtmf.digits + " is incorrect\n" );
                        var record_file = session.getVariable("record_file");
                        session.hangup("NORMAL_CLEARING");
                        record_file = record_file.replace ( ".mp3","");
                        system("mv " + record_file + ".mp3 " +
record_file + "_" + dtmf.digits + ".mp3");
                        console_log( "info", "Record file: " +
record_file + "\n" );


Thanks again,

Bogdan

On Wed, Jun 9, 2010 at 7:32 PM, David Ponzone <david.ponzone at gmail.com> wrote:
> Tony,
> of course, you're right.
> In my mind, it was an outbound call center, so the agent will be leg A.
> But for an inbound call center, the agent would be leg B.
> David Ponzone  Direction Technique
> email: david.ponzone at ipeva.fr
> tel:      01 74 03 18 97
> gsm:   06 66 98 76 34
> Service Client IPeva
> tel:      0811 46 26 26
> www.ipeva.fr  -   www.ipeva-studio.com
> Ce message et toutes les pièces jointes sont confidentiels et établis à
> l'intention exclusive de ses destinataires. Toute utilisation ou diffusion
> non autorisée est interdite. Tout message électronique est susceptible
> d'altération. IPeva décline toute responsabilité au titre de ce message s'il
> a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce
> message, merci de le détruire immédiatement et d'avertir l'expéditeur.
>
>
>
> Le 09/06/2010 à 18:13, Anthony Minessale a écrit :
>
> if you do that and the other end of the call hangs up first your application
> will not execute.
> FreeSWITCH does not continue in the dial-plan once a call has hungup.
> you are better off using the api_hangup_hook variable to have a script be
> called on hangup that processes the data.
> The channel is not available in the script but there is an event with all of
> the channel vars.
>
> On Wed, Jun 9, 2010 at 10:24 AM, David Ponzone <david.ponzone at gmail.com>
> wrote:
>>
>> Bogdan,
>> There could be a way to do something nice if you don't hangup leg A after
>> the call.
>> The idea would be to disable hangup_after_bridge (it is by default I
>> think), and to add a call to an internal IVR after the call to the customer
>> is completed.
>> In this IVR, you would listen to a wrap-up code entered as DTMF, and then
>> you would rename to recording of the first call according to this.
>> Some work to do, but should be doable.
>> David Ponzone  Direction Technique
>> email: david.ponzone at ipeva.fr
>> tel:      01 74 03 18 97
>> gsm:   06 66 98 76 34
>> Service Client IPeva
>> tel:      0811 46 26 26
>> www.ipeva.fr  -   www.ipeva-studio.com
>> Ce message et toutes les pièces jointes sont confidentiels et établis à
>> l'intention exclusive de ses destinataires. Toute utilisation ou diffusion
>> non autorisée est interdite. Tout message électronique est susceptible
>> d'altération. IPeva décline toute responsabilité au titre de ce message s'il
>> a été altéré, déformé ou falsifié. Si vous n'êtes pas destinataire de ce
>> message, merci de le détruire immédiatement et d'avertir l'expéditeur.
>>
>>
>>
>> Le 08/06/2010 à 23:12, Bogdan Patrascoiu a écrit :
>>
>> Hello,
>>
>> I'm currently working on a FreeSWITCH box for a callcenter. One of the
>> callcenter's requests was to rename each of the calls recordings based
>> on the call's outcome, so each operator must tag each of it's call
>> recording by hand. I planned to do this by ignoring both parties
>> hangup requests and to catch a post end of conversation string from
>> the voip client (in this case X-Lite) and fit this in the recording's
>> file name by renaming it.
>>
>> I haven't done anything like it so far and wanted to ask if there is a
>> standard approach for such post hangups implementations .
>>
>>
>> Thanks,
>>
>> Bogdan Patrascoiu
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>>
>> _______________________________________________
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> http://www.freeswitch.org
>>
>
>
>
> --
> Anthony Minessale II
>
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>
> AIM: anthm
> MSN:anthony_minessale at hotmail.com
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
> IRC: irc.freenode.net #freeswitch
>
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org
> googletalk:conf+888 at conference.freeswitch.org
> pstn:+19193869900
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>
> _______________________________________________
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> http://www.freeswitch.org
>
>



More information about the FreeSWITCH-users mailing list