[Freeswitch-users] Sending calls to multiple destinations (with and without Enterprise Originate)

Alex alex at thewinelake.com
Mon Jul 30 16:52:18 MSD 2012


I've been having problems with some aspects of Enterprise Origin 
(notably call_leg_delay) and am wondering if I need to be using EO at all.

Trouble is that even pretty simple multi-destination dialplans just 
don't seem to be working for me with multiple SIP registrations.

eg.

<include>
  <extension name="0095301">
   <condition field="destination_number" expression="^(301|441223900481)$">
    <action application="set" data="hangup_after_bridge=true"/>
    <action application="set" data="continue_on_fail=true"/>
    <action application="set" data="bridge_generate_comfort_noise=true"/>
    <action application="set" data="ignore_early_media=true"/>
    <action application="set" 
data="leg_common=sess_ref=${uuid},tenant_id=0095,b_ext=301,group_confirm_file=lua 
confirmcall.lua,group_confirm_key=exec,whisper_msg=/home/pabx/004-0095/20120730-100551-00001/recordings/tts/301_whisper.wav,accept_msg=/home/pabx/004-0095/20120730-100551-00001/recordings/tts/accept1.wav"/>
<action application="set" 
data="leg_sip=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,origination_caller_id_name=WizzCo 
x301 Fred,leg_timeout=60]user/0095301@${domain_name}"/>
<action application="set" 
data="leg_pstn=[leg_delay_start=10,accept_mode=Direct,leg_timeout=60,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000202074904992 at x.y.z.a"/>
    <action application="bridge" 
data="<${leg_common}>${leg_sip},${leg_pstn}"/>
   </condition>
  </extension>
</include>

The idea here is that the user can have a SIP phone as well as a PSTN 
phone.

The above script works OK with a single SIP registration against user 
0095301.

But when one tries to connect more than one SIP handset, It doesn't work 
(and the warning "[WARNING] switch_ivr_originate.c:2351 Only calling the 
first element in the list in this mode." comes up).
(However, the pstn phone does kick in after 10s, which is nice).

That's why we went for Enterprise Originate - which works well for 
multiple SIP registrations, except for the fact that we no longer have 
control over delayed leg-starting.

Now I'm wondering what that warning is all about - eg. what is "this 
mode"???
Just in case you're wondering - we do have the line : <param 
name="multiple-registrations" value="true"/> in the 
/conf/sip_profiles/internal.xml
(Although I confess to not quite understanding why it's using a profile 
called "internal" for this)

*** Question: What does "this mode" mean?


A variant on this is to not use multiple SIP registrations to the same 
user, but actually create another user (so we have a and b):

<action application="set" 
data="leg_sipa=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,leg_timeout=60]user/0095301a@${domain_name}"/>
<action application="set" 
data="leg_sipb=[accept_mode=Direct,sip_h_sb_routing=${sb_routing}&441223900481_301_pers_Fred,leg_timeout=60]user/0095301b@${domain_name}"/>
<action application="set" 
data="leg_pstn=[leg_delay_start=10,accept_mode=Direct,leg_timeout=60,origination_caller_id_number=00953010${ani}]sofia/internal/898000000000202074904992 at x.y.z.a"/>
<action application="bridge" 
data="<${leg_common}>${leg_sipa},${leg_sipb},${leg_pstn}"/>

This is close to achieving our aim, although it would be better if it 
could also support multiple SIP regsitrations.





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