[Freeswitch-users] Sorting through a list of conditions

Ken Fulmer kenfulmer at icstechnologysolutions.com
Wed May 5 12:41:17 PDT 2010


We'd like to match on either Caller ID or ANI for outbound faxes and lock
them to PCMU. 

 

Here's what we've been using:

 

<extension name="FAX-LCL-7D">

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="destination_number" expression="^9(\d{7})$">

       <action application="export" data="sip_append_audio_sdp=a=fmtp:18
annexb=no"/>

       <action application="export"
data="nolocal:absolute_codec_string=PCMU"/>

       <action application="set" data="hangup_after_bridge=true"/>

       <action application="bridge" data="sofia/external/$0 at X.X.X.X"/>

       <action application="set" data="instant_ringback=true"/>

       <action application="set" data="ringback=${us-ring}"/>

   </condition>

</extension>

 

If we use a list and break=on-false, searching stops after the first
non-match. If we use break=on-true, it stops after the first match, and we
get no digits to send upstream. If we use break=never, it applies the digit
match to all numbers, regardless of Caller ID. I realize this is all normal
behavior. 

 

Is there a way to sort through a list of Caller ID's, match one, and then
match the outbound digits? We're trying to avoid having to create a
dial-plan entry for every Caller ID. 

 

Here's what it *might* look like with multiple internal fax lines:

 

<extension name="FAX-LCL-7D">

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="caller_id_number" expression="^XXXXXXXXXX$"/>

   <condition field="destination_number" expression="^9(\d{7})$">

       <action application="export" data="sip_append_audio_sdp=a=fmtp:18
annexb=no"/>

       <action application="export"
data="nolocal:absolute_codec_string=PCMU"/>

       <action application="set" data="hangup_after_bridge=true"/>

       <action application="bridge" data="sofia/external/$0 at X.X.X.X"/>

       <action application="set" data="instant_ringback=true"/>

       <action application="set" data="ringback=${us-ring}"/>

   </condition>

</extension>

 

 

Thanks,

 

Ken Fulmer

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20100505/d4f1e82b/attachment.html 


More information about the FreeSWITCH-users mailing list