[Freeswitch-users] Setting up callbacks

Alex Lake alex at digitalmail.com
Mon Jun 3 12:26:30 MSD 2013


As simple as that, eh?! Seems too good to be true! Thanks....
> You currently (in a previous mail) call a user/ dialstring and when 
> that answers execute a bridge that dials a sofia/ dialstring and joins 
> the 2 calls. The syntax was slightly off, but close.
>
> Now think what'd happen if the 2 dialstrings were both sofia/ 
> dialstrings to dial 2 PSTN numbers via your SIP provider(s)...
>
> You may need to tweak that further if you want either leg to go via 
> the dialplan.
>
> -Steve
>
>
> On Friday, May 31, 2013, Alex Lake wrote:
>
>     ...and for our next trick, how do I do a callback from one PSTN
>     destination to another? i.e. place a call to 07775123456 and when
>     that answers, place another one to 02012345678?
>
>     Cheers,
>     Alex
>>     You almost got it: it's: exten [dialplan] [context]
>>
>>     So you just needed to do:
>>     originate
>>     {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302
>>     07775123456 xml dp0095
>>     ... without the &bridge. You /either/ choose an extension or do
>>     &(app).
>>     Usage: originate <call_url> <exten>|&<application_name>(<app_args>)
>>         [<dialplan>] [<context>] [<cid_name>] [<cid_num>] [<timeout_sec>]
>>     To quote from the wiki:
>>
>>     "Here's an example of originating a call to an extension in a
>>     different context than 'default' (required for the FreePBX which
>>     uses context_1, context_2, etc.):"
>>
>>         originate sofia/internal/2001 at foo.com  <javascript:_e({}, 'cvml', '2001 at foo.com');>  3001 xml context_3
>>     -Avi Marcus
>>     BestFone
>>
>>
>>     On Thu, Mar 7, 2013 at 4:02 PM, Alex Lake <alex at digitalmail.com
>>     <javascript:_e({}, 'cvml', 'alex at digitalmail.com');>> wrote:
>>
>>         Yes, I'd seen that - but I'm currently the wrong side of the
>>         "got it" fence. However, I did this:
>>
>>         originate
>>         {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302&bridge({origination_caller_id_number=2070602000}sofia/internal/07775123456 at pstngateway.com
>>         <javascript:_e({}, 'cvml',
>>         'origination_caller_id_number\x3d2070602000%7Dsofia/internal/07775123456 at pstngateway.com');>)
>>
>>         and it kind of did what I wanted.
>>
>>         However, what I really want to do is to simulate as closely
>>         as possible what happens when ext 0095302 makes an outbound
>>         call to 07775123456 from a handset - preferably using the
>>         dp0095 context of the xml (?) dialplan.
>>
>>         So I thought I'd try using the dialplan and context
>>         parameters like this:
>>
>>         originate
>>         {origination_caller_id_name=CallBack,origination_caller_id_number=07775123456}user/0095302
>>         &bridge(07775123456) xml dp0095
>>
>>         But I've clearly got the wrong end of the stick!
>>
>>>         There's a whole bunch of examples here:
>>>         http://wiki.freeswitch.org/wiki/Mod_commands#originate
>>>
>>>         The first arg rings first, and must be an endpoint, e.g.
>>>         sofia/, user/.
>>>         Once they pick up, the second arg is called.
>>>
>>>         So originating to a local user or to a remote endpoint is
>>>         nearly the same... especially if you can use the lcr/ endpoint.
>>>         Your leg B can be a brige, a conference
>>>         &conference(conf_uuid-TEST_CON), or just hit the dialplan.
>>>
>>>
>>>         -Avi Marcus
>>>
>>>         On Thu, Mar 7, 2013 at 1:00 PM, Alex Lake
>>>         <alex at digitalmail.com> wrote:
>>>
>>>             I was wondering where's a good place to find some
>>>             examples of how, by
>>>             sending the right commands to the event_socket, I could
>>>             have Freeswitch
>>>             establish callbacks for me.
>>>
>>>             Essentially there are a couple of different termination
>>>             types - PSTN
>>>             (via a gateway) and internally registered SIP accounts
>>>
>>>             I would wish to be able to set up A->B (and maybe small
>>>             conferences)
>>>             using these types of destination in any combination.
>>>
>>>             I've looked through the event_socket pages and the
>>>             "originate" syntax,
>>>             but would like to put together something a little more
>>>             "idiot-friendly"
>>>             so am looking around for precedents/tips...
>>>
>>>
>>>
>>>
>>>
>>>             _________________________________________________________________________
>>>             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.cluec <http://www.cluecon.com>
>>>
>>
>>         _________________________________________________________________________
>>         Professional FreeSWITCH Consulting Services:
>>         consulting at freeswitch.org <javascript:_e({}, 'cvml',
>>         '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 <javascript:_e({},
>>         'cvml', '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
>>
>>
>>
>>
>>     _________________________________________________________________________
>>     Professional FreeSWITCH Consulting Services:
>>     consulting at freeswitch.org  <javascript:_e({}, 'cvml', '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  <javascript:_e({}, 'cvml', '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
>>
>>
>>     No virus found in this message.
>>     Checked by AVG - www.avg.com <http://www.avg.com>
>>     Version: 2012.0.2240 / Virus Database: 2641/5652 - Release Date:
>>     03/06/13
>>
>
>
>
> _________________________________________________________________________
> 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
>
>
> No virus found in this message.
> Checked by AVG - www.avg.com <http://www.avg.com>
> Version: 2012.0.2242 / Virus Database: 3162/5878 - Release Date: 06/02/13
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20130603/14328be0/attachment-0001.html 


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