[Freeswitch-users] Call back through SIP trunk

Sina Owolabi notify.sina at gmail.com
Thu Jan 1 15:12:45 MSK 2015


Avi,

thanks and happy new year!
I'm trying to  using a public extension to receive the call, hangup
and transfer to the extension that is actually doing the lua'ing (so
to speak):

<extension name="callback-caller1">
    <condition field="${caller_id_number}"
expression="^0(\d{10})$"require-nested="false">
       <action application="set" data="effective_caller_id_number=+123${1}"/>
       <action application="set" data="effective_caller_id_name=+123${1}"/>
    </condition>
    <condition field="destination_number" expression="^0123456(7)(8)$">
      <action application="ring_ready" />
      <action application="sleep" data="3000"/>
      <action application="set" data="ringback=%(2000, 4000, 440.0, 480.0)"/>
      <action application="hangup" />
      <action application="transfer" data="1213 XML default"/>
   </condition>

<extension name="1213">
     <condition field="destination_number" expression="^1213$">
        <action application="lua" data="callback.lua
${effective_caller_id_number} ${destination_number}"/>
     </condition

Please is this the proper way to collect data from the first leg to
pass to the lua script?

On Wed, Dec 31, 2014 at 6:36 PM, Avi Marcus <avi at avimarcus.net> wrote:
> I've used a lua script to grab the information (and make sure it's a valid
> callback), hangup, and then run:
>
> freeswitch.msleep(2000); --wait 2 seconds to make sure their side will
> actually have the call over
> api = freeswitch.API()
> api:execute("originate", your-dialstring)
>
> -Avi
>
> On Wed, Dec 31, 2014 at 11:37 AM, Sina Owolabi <notify.sina at gmail.com>
> wrote:
>>
>> Hi List!
>>
>>
>> FreeSWITCHNewbie here.
>> Please can I have some guidance on how to setup call back?
>>
>> I would like to be able to dial the DID attached to the SIP trunk
>> Freeswitch is registered to, and then have freeSWITCH hang up the call
>> and dial the caller id number back through any other SIP trunk
>> FreeSWITCH Is registered with, but with the origination number set to
>> the DID that the first call came through in the first place.
>>
>> Please is this possible just through the dial plan?
>>
>> Thanks for any help!
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> consulting at freeswitch.org
>> http://www.freeswitchsolutions.com
>>
>> Official FreeSWITCH Sites
>> http://www.freeswitch.org
>> http://confluence.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
>
>
>
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org
> http://www.freeswitchsolutions.com
>
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://confluence.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



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