[Freeswitch-users] Notify after forwarded Call is finished

Raphael Lechner raphael.lechner at gmail.com
Wed Feb 11 12:27:30 MSK 2015


Attached the link to my current working solution. Some parts of the python script are only used on that installation and probably need to be changed for another installation.

If you dial *5 + external number then you get the notification after the call is finished. The Python script needs to be running.

There exists also some limitation:
- This works only for ATTENDED_TRANSFER not for BLIND_TRANSFER
- If you put *5 + external Number to a Linekey then you always get the notification after hanging up (If you only call them, without transferring another call).

Python Script:
https://pastebin.freeswitch.org/23906 <https://pastebin.freeswitch.org/23906>
Check if call is finished and send notification to the yealink phone.

Dialplan:
https://pastebin.freeswitch.org/23907 <https://pastebin.freeswitch.org/23907>
mark the call for processing them after with the python script and create outgoing call.

Raphael

> On 10 Feb 2015, at 17:12, Raphael Lechner <raphael.lechner at gmail.com> wrote:
> 
> Thank you for the hint. 
> The api_hangup_hook seems to work only for the first call and for the attended transfer call in the background.
> 
> At the moment I have a working solution using the event CHANNEL_HANGUP_COMPLETE and by parsing the different variables sending the phone a popup via XML.
> In some situation the script get confused. I’m still experimenting and I will report them back after.
> 
> Raphael
> 
>> On 10 Feb 2015, at 16:53, Michael Collins <msc at freeswitch.org <mailto:msc at freeswitch.org>> wrote:
>> 
>> You could set api_hangup_hook on either of these legs and have the API send out a NOTIFY (or anything you want, I suppose) at hangup.
>> https://freeswitch.org/confluence/display/FREESWITCH/Variables#Variables-api_hangup_hook <https://freeswitch.org/confluence/display/FREESWITCH/Variables#Variables-api_hangup_hook>
>> 
>> Please experiment and report back!
>> 
>> -MC
>>  
>> 
>> Thank you very much!
>> 
>> Raphael
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
>> 
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org <http://www.freeswitch.org/>
>> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
>> http://www.cluecon.com <http://www.cluecon.com/>
>> 
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
>> http://www.freeswitch.org <http://www.freeswitch.org/>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services: 
>> consulting at freeswitch.org <mailto:consulting at freeswitch.org>
>> http://www.freeswitchsolutions.com <http://www.freeswitchsolutions.com/>
>> 
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org <http://www.freeswitch.org/>
>> http://confluence.freeswitch.org <http://confluence.freeswitch.org/>
>> http://www.cluecon.com <http://www.cluecon.com/>
>> 
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org <mailto:FreeSWITCH-users at lists.freeswitch.org>
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users <http://lists.freeswitch.org/mailman/listinfo/freeswitch-users>
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users <http://lists.freeswitch.org/mailman/options/freeswitch-users>
>> http://www.freeswitch.org <http://www.freeswitch.org/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150211/d2786184/attachment.html 


Join us at ClueCon 2016 Aug 8-12, 2016
More information about the FreeSWITCH-users mailing list