[Freeswitch-users] how to do callback with dialplan?

Regis M regis.freeswitch.org at tornad.net
Wed Jun 5 19:13:12 MSD 2013


You can do it by setting the variable *api_hangup_hook*.

http://wiki.freeswitch.com/wiki/Channel_Variables#api_hangup_hook

In dialplan you set an originate to be done on hangup and then, you hangup.

<action application="set" data="api_hangup_hook=originate user/1001
&bridge(sofia/gateway/<YOUR GATEWAY>/${caller_id_number})"/>
<action application="hangup" />



2013/6/5 Vincent Xia <gmangudai at gmail.com>

> how to do callback with dialplan?
>
> the idea is when user A(his phone number is, for example 1001) calls a
> number with a prefix, e.g. **1002, the
>
> freeswitch will hangup the call leg with user A and originate calls to
> 1001 and 1002, then bridge 1001 and 1002 after
>
> both are connected. since originate is a console command, how could i make
> dialplan to do callback?
>
> maybe it's something like:
>     <extension name="callback">
>       <condition field="destination_number" expression="^\*\*(\d+)$">
> <action application="hangup"/>
> <action application="originate" data="sofia/${use_profile}/$1"/>
>  <action application="originate"
> data="sofia/${use_profile}/${caller_id_number}"/>
> <action application="bridge" data="sofia/${use_profile}/$1
> sofia/${use_profile}/${caller_id_number}"/>
>       </condition>
>     </extension>
> but certainly it's not gonna work, can anybody give a hand?
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> 
> 
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130605/35c35e28/attachment.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users mailing list