[Freeswitch-users] Transfer and scoping confusion

Brian Foster bdfoster at davri.com
Tue Jun 11 16:44:43 MSD 2013


I don't think you need to use loopback anymore but I could be wrong.

- BDF
On Jun 11, 2013 8:14 AM, "admin" <admin at tedssupply.com> wrote:

>  Thanks for the help Michael, but I am still missing a tiny thing
> somewhere..
>
>  Let me illustrate as briefly as possible by snipping where possible.
>  Local_Extension is as installed except for:
>
>  <extension name="Local_Extension">
>
>    .
>
>    .
>
>    <action application="export" data="new_vm_digits=123"
>
>    <action application="bind_meta_app" data="4 b s
> execute_extension::direct_to_vmail XML default"/>
>
>    .
>
> </extension>
>
>  This matches in an added extension call_direct_to_vmail
>
>  <extension name="call_direct_to_vmail">
>
>    <condition field="destination_number" expression="^direct_to_vmail$">
>
>       <action application="read" data="4 4
> 'tone-stream://%(10000,0,350,440)' digits 30000 #" />
>
>        <action application="log" data="INFO Value of digits are
> [${digits}]" />
>
>       <action application="log" data="INFO Value of new_vm_digits before
> assignment  [${new_vm_digits}]"/>
>
>        <action application="set" data="new_vm_digits=${digits}"/>
>
>       <action application="log" data="INFO Value of new_vm_digits after
> assignment  [${new_vm_digits}]"/>
>
>        <action application="transfer" data="-bleg vmail_now XML default"/>
>
>     </condition>
>
> </extension>
>
>  This transfers to vmail_now:
>
>  <extension name="vmail_now">
>
>    <condition field="destination_number" expression="^vmail_now$">
>
>
>       <action application="log" data="INFO Value of new_vm_digits in
> vmail_now  [${new_vm_digits}]"/>
>
>
>        <action application="bridge" data="loopback/app=voicemail:default
> ${domain_name} ${new_vm_digits}"/>
>
>
>     </condition>
>
> </extension>
>
>  Logged entries show:
>
>  Local_extension assigns new_vm_digits = 123
>
>     In direct_to_vmail the value of new_vm_digits = 123 BEFORE
> reassignment
>
>    In direct_to_vmail the value of new_vm_digits = 1005 after "set", just
> before "transfer" - number I entered
>
>        In vmail_now the value of new_vm_digits = 123
>
>       In vmail_now [WARNING] mod_voicemail.c:3310 Can't find user
> [123 at xxx.xxx.xxx.xxx] - as expected
>
>  I am missing the scope of new_vm_digits, but where?
>
> Aren't variables global without the "%"?
>
> Doesn't the "export" in Local_Extension scope into all following legs?
>
> Docs say that "execute_extension" is in scope.
>
>  The -bleg bothers me also... but thats another day!
>
>
>
>
> >>> Michael Collins <msc at freeswitch.org> 6/10/2013 1:42 PM >>>
>
>
>
>
>   On Mon, Jun 10, 2013 at 10:31 AM, admin <admin at tedssupply.com> wrote:
>
>>  Thanks Cal, first time on any mailing list and with lack of sleep I got
>> a bit long winded...
>>
>>
>>  I am assuming the subject will create the threading...
>>
>>
>>  I also snipped all previous for brevity.
>>
>>
>>  Let me know if this is not OK.
>>
>>
>>  Let's start simply: After two legs have been bridged, do you use
>> "transfer" to unbridge the calls and then send one of them somewhere else
>> (this is the greater portion of my question) ?
>>
>  You can use FS command line APIs uuid_transfer or uuid_dual_transfer to
> accomplish this. See the "API Commands" link on the Wiki navigation panel
> to see all the API commands in alphabetical order. Try those out and let us
> know if you have any questions.
>
>   -MC
>
>
> --
> Michael S Collins
> Twitter: @mercutioviz
> http://www.FreeSWITCH.org
> http://www.ClueCon.com
> http://www.OSTAG.org
>
>
> _________________________________________________________________________
> 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/20130611/1258c07c/attachment.html 


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