[Freeswitch-dev] mod_fifo

Thierry Panthier thierry.devel at gmail.com
Mon Jun 17 11:58:03 MSD 2013


Hello everyone,

If I use the below syntax, it works fine. But since I'm using
*$${variable}*(two $-signs) it only works for static values defined at
start-up.

  <fifos>
      <fifo name="emergency" importance="0">
        <member timeout="60" simo="1"
lag="0">{member_wait=nowait,origination_callee_id_name=*$${variable}*
}loopback/dequeue_emergency/default/XML</member>
      </fifo>
  </fifos>

If I use *${**variable**}* (one $-sign) I get the error:

   *Invalid data (${origination_callee_id_name} contains a variable)*
*
*
Since I couldn't find a way of using a variable from the dialplan, I
decided to solve the problem in my application.

Whenever I need to get the list of *callers* and *bridges* in the fifo*, *first
I get the list of UUIDs (with *fifo list <name>*) and then I use *uuid_getvar
<uuid> effective_caller_id_number*

I decided to share just in case someone has a similar requirement...

Regards,

Thierry Panthier





On Wed, Jun 12, 2013 at 6:21 PM, Thierry Panthier
<thierry.devel at gmail.com>wrote:

> Hello everyone,
>
> When a call leaves mod_fifo (and it gets bridged) if I do a *fifo list
> <myqueue>*, I get:
>
> <bridges>
>   <bridge fifo_name="emergency" bridge_start="2013-06-12 07:45:03"
> bridge_start_epoch="1371023103">
>      <caller uuid="a16767af-e252-43b5-ad33-cbd38a42bc64" caller_id_name=*
> "Outbound%20Call"* caller_id_number=*"XML"*></caller>
>      <consumer>
>        <uuid>4b84ab5e-f2a2-4d87-8295-7726663abeed</uuid>
>        <outgoing_uuid>0b9fa586387efe4014e010bada4da9cc</outgoing_uuid>
>      </consumer>
>   </bridge>
> </bridges>
>
> However I need to get the *caller_id_name* and the *caller_id_number* of
> the entity that initiated the call and not "*Outbound Call*" or *"XML"*.
>
> I read in a thread that I should set *origination_callee_id_name* and *
> origination_callee_num* but how do I do that?
>
> I tried to set a variable in my dialplan and use it in *fifo.conf.xml *but
> I get the following error:
>
> *[CRIT] switch_channel.c:1364 Invalid data (${origination_callee_id_name}
> contains a variable)*
>
>
> Here's my *original* fifo.conf.xml:
>
> <fifos>
>     <fifo name="emergency" importance="0">
>       <member timeout="60" simo="1"
> lag="0">{member_wait=nowait}loopback/dequeue_emergency/default/XML</member>
>     </fifo>
> </fifos>
>
>
> Here's part of my *original* dialplan:
> *
> *
> <extension name="queue_emergency">
>     <action application="set" data="fifo_music=$${hold_ringing}"/>
>     <action application="set"
> data="fifo_orbit_exten=timeout_emergency:$${emergency_queue_timeout}"/>
>     <action application="answer"/>
>     <action application="fifo" data="emergency in"/>
> </extension>
>
>
>
> Here's my *modified* fifo.conf.xml:
>
> <fifos>
>     <fifo name="emergency" importance="0">
>       <member timeout="60" simo="1"
> lag="0">{member_wait=nowait,origination_callee_id_name=${some_var_set
> in_the_dialplan}}loopback/dequeue_emergency/default/XML</member>
>     </fifo>
> </fifos>
>
>
> If I set to a fixed value instead of a variable, it works fine. But that's
> useless to me.
>
> Any help would be greatly appreciated.
>
> Regards,
>
> Thierry Panthier
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20130617/2595e77b/attachment.html 


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