[Freeswitch-users] multiple sip profile , centrex like function

Lee JJ jengjr at gmail.com
Fri Aug 22 01:30:52 PDT 2008

Hello Brian :

I finally work something out !

# the dialplan
<extension name="centrex testing">
<condition field="destination_number" expression="^(1[0-9][0-9][0-9])$">
<action application="set" data="dialed_ext=$1"/>
<action application="export" data="dialed_ext=$1"/>
<condition field="${sip_from_host}" expression="^${sip_to_host}$">
<action application="bridge" data="sofia/${sofia_profile_name}/${dialed_ext}" />
<anti-action application="bridge" data="sofia/${sip_to_host}/${dialed_ext}" />

# the same EXT 1528 at inter2  bridged  with  1528 at internal
2008-08-22 15:58:06 [NOTICE] sofia.c:2491 sofia_handle_sip_i_state()
Channel [sofia/inter2/1528] has been answered
2008-08-22 15:58:06 [DEBUG] mod_sofia.c:430 sofia_answer_channel()
Local SDP sofia/internal/1528 at
2008-08-22 15:58:06 [NOTICE] switch_ivr_originate.c:1298
switch_ivr_originate() Channel [sofia/internal/1528 at]
has been answered

But there is one issue
2008-08-22 15:06:11 [WARNING] sofia.c:3130 sofia_handle_sip_i_invite()
IP Rejected by acl domains

I have to disable the acl in profiles
<!-- param name="apply-inbound-acl" value="domains"/ -->
otherwise it won't allow me to call  "sip:1528 at internal"  from "sip:1528 at inter2"
( PLS  explain the security issue )

# the following diaplan tested , really nothing to do with ENUM
very good DNS working
<extension name="apnic Testing" continue="true">
<condition field="destination_number" expression="^(info|billing)">
<action application="bridge" data="sofia/default/$1@${sip_to_host}" />

1   0.000000 -> SIP/SDP Request: INVITE
sip:billing at voip.apnic.net, with session description
2   0.246246 -> SIP Status: 100 Trying
3   0.659271 -> SIP Status: 180 Ringing
4   2.589506 -> SIP Request: CANCEL
sip:billing at voip.apnic.net

Also been through these points.

More information about the FreeSWITCH-users mailing list