[Freeswitch-users] How do I know uuid both leg before bridge?

Steven Ayre steveayre at gmail.com
Tue Jul 14 19:45:04 MSD 2015


>
> I think it is worth adding these things in questions and answers, so that
> people know about these brackets [ ] and how it works inline=true


They're documented on Confluence / the wiki, but to include them in this
thread and for your info

Variables in {} are set on all the legs
Variables in [] are set only on the leg they appear before

{a=123}[b=456]user/1000|[b=789]user/1001
The call to 1000 will have a=123 & b=456
The call to 1001 will have a=123 & b=789

Dialplan parsing happens in to stages - hunting and execution. In hunting
it goes through the extensions, looks for all matching conditions, and
builds up a list of all actions to execute. It then executes those actions
in order. When an action has inline=true it is executed immediately during
the hunt instead of being queued for the execution stage. That means the
variable value is available for other conditions to check during the
hunting stage. However the actions don't expand the value until they're
executed so ${my_uuid} in your bridge isn't expanded until execution and
therefore the variable doesn't need to be set inline.

On 14 July 2015 at 14:35, Denis Jakovlev <yadenis at seznam.cz> wrote:

>  Dobrý den,
>
> Great! Thanks a lot for the help. Now it is working as it should.
>
> I think it is worth adding these things in questions and answers, so that
> people know about these brackets [ ] and how it works inline=true
>
>
>
>
>
>
>
>
> *-- S pozdravem, Ing.Denis Jakovlev                           mob.tel
> <http://mob.tel>. 775-415-382 úterý 14. července 2015, 14:51:28, napsal
> jste: *
>
>  Use origination_uuid=${my_uuid} not ${uuid}
>
> ${uuid} is the existing a-leg, origination_uuid will be the new b-leg
>
> Currently you're trying to create a b-leg with the same uuid as the a-leg,
> hence the error.
>
> I also suggest you put origination_uuid in [] not {} - if you ever add
> extra legs you'll have the duplicate error return as all the b-legs would
> get the same uuid.
>
> You also definitely *don't* need inline=true, I would avoid using it as
> it'll execute much earlier than you need it, and if you use set the same
> variable inline later in your dialplan then it may not create the bridge
> with the uuid you expect.
>
> Steve
>
>
>
> On 14 July 2015 at 13:36, Denis Jakovlev <yadenis at seznam.cz> wrote:
> Hi All,
>
> For my tasks need to know uuid both feet before bridge. How can i do this?
>
> If I do in the dialplan
> <action application="set" data="my_uuid=${create_uuid foo}" inline="true"/>
>
> and then
> <action application="bridge" data="{origination_uuid=${uuid}}user/1003"/>
>
> I get an error
> 2015-07-14 14:25:32.350565 [CRIT] switch_core_session.c:2342 Duplicate
> UUID!
> 2015-07-14 14:25:32.350565 [CRIT] mod_sofia.c:4376 Error Creating Session
>
> How correctly before bridge I assign or generate a uuid and use later?
>
>
>
>
> *-- S pozdravem, Ing.Denis Jakovlev                           *mob.tel
>
> *. 775-415-382 *
> _________________________________________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20150714/ec31c788/attachment.html 


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