[Freeswitch-users] dialplan of multi profile
Lee JJ
jengjr at gmail.com
Fri Aug 8 17:22:59 PDT 2008
Dear All Guru :
1.
I am curious what's the relation between alias "name", "type" ?
Does it affect the dialplan routing call ?
How to know more inside of this ?
[INFO] mod_dialplan_xml.c:222 dialplan_hunt() Processing 1526->1528 at default
^^^^^^^^^
From the FAQ:
Q: How do I assign endpoints to contexts with different sets of extensions
Here are the different possible approaches:
- Use 1 profile per context you want to route to (each one needs a
distinct ip:port)
[root at localhost dialplan]# netstat -aup
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address
State PID/Program name
udp 0 0 210.24y.y.y:sip
*:* 3748/freeswitch
udp 0 0 210.24x.x.x:sip
*:* 3748/freeswitch
udp 0 0 210.24y.y.y:5070
*:* 3748/freeswitch
udp 0 0 210.24x.x.x:5070
*:* 3748/freeswitch
udp 0 0 210.24x.x.x:5080
*:* 3748/freeswitch
Sofia status still the same
Name Type
Data State
=================================================================================================
internal profile sip:mod_sofia at 210.24x.x.x:5060
RUNNING (0)
external profile sip:mod_sofia at 210.24x.x.x:5080
RUNNING (0)
nat profile sip:mod_sofia at 210.24x.x.x:5070
RUNNING (0)
default alias
internal ALIASED
210.24x.x.x alias internal
ALIASED
inter2 profile sip:mod_sofia at 210.24y.y.y:5060
RUNNING (0)
210.24y.y.y alias inter2
ALIASED
outbound alias
external ALIASED
=================================================================================================
2.
<anti-action application="bridge"
data="user/${dialed_ext}@$${domain}"/<user/$%7Bdialed_ext%7D@$$%7Bdomain%7D%22/>>
---
this syntax working
<anti-action application="bridge" data="
sofia/profilename/${dialed_ext}@$${domain}"/<sofia/profilename/$%7Bdialed_ext%7D@$$%7Bdomain%7D%22/>>
---- while this not !
What is the syntax difference ?
FYI: setting files
sip profiles use the default config , and modify the correspoding parameter
profile name , context , domain
[root at localhost sip_profiles]# ls -F
./ ../ external/ external.xml inter2.xml internal/ internal.xml nat/
nat2.xml nat.xml
<!-- http://wiki.freeswitch.org/wiki/Sofia_Configuration_Files -->
<profile name="inter2" domain="210.243.126.72">
<!--aliases are other names that will work as a valid profile name for
this profile-->
<aliases>
<alias name="210.243.126.72"/>
<alias name="inter2"/>
</aliases>
[root at localhost dialplan]# ls -F
./ default.xml default.xml.old extensions/ inter2.xml
../ default.xml.simpl-test features.xml public.xml
the most simple dialplan setting
[root at localhost dialplan]# more default.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- http://wiki.freeswitch.org/wiki/Dialplan_XML -->
<include>
<context name="default">
<!--
if the calling party is the called party, go to their VM
if the calling party is NOT the called party dial the extension
(1000-1019) for 30 seconds and go to voicemail if the
call fails (continue_on_fail=true), otherwise hang up after a
successful bridge (hangup_after-bridge=true)
-->
<extension name="Local_Extension">
<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>
<condition field="destination_number"
expression="^${caller_id_number}$">
<anti-action application="set" data="call_timeout=30"/>
<anti-action application="set" data="hangup_after_bridge=true"/>
<anti-action application="bridge" data="
user/${dialed_ext}@$${domain}"/ <user/$%7Bdialed_ext%7D@$$%7Bdomain%7D%22/>>
<!-- anti-action application="bridge" data="
sofia/profilename/${dialed_ext}@$${domain}"/<sofia/profilename/$%7Bdialed_ext%7D@$$%7Bdomain%7D%22/>-->
<anti-action application="answer"/>
</condition>
</extension>
</context>
</include>
------------------------------
*From:* Jengjr Lee ( 李正之 )
*Sent:* Thursday, August 07, 2008 6:23 PM
*To:* 'freeswitch-users at lists.freeswitch.org'
*Subject:* dialplan of two profile users
Dear all :
I would like to create 2 profiles which represent 2 company.
There will be the same extension no in these 2 profiles.
For example , one is "default" , another is "inter2".
I am not familiar with the dialplan file , command, logic , control ;
don't know how to control the
call from these 2 profile extensions.
Or is there any more info explain it deeply ?
thanks
Name Type
Data State
=================================================================================================
internal profile sip:mod_sofia at 210.x.x.x:5060
RUNNING (0)
external profile sip:mod_sofia at 210.x.x.x:5080
RUNNING (0)
nat profile sip:mod_sofia at 210.x.x.x:5070
RUNNING (0)
default alias
internal ALIASED
210.x.x.x alias internal
ALIASED
inter2 profile sip:mod_sofia at 210.y.y.y:5060
RUNNING (0)
210.y.y.y alias inter2
ALIASED
outbound alias
external ALIASED
=================================================================================================
4 profiles 4 aliases
freeswitch at localhost> sofia_contact 1526 at 210.x.x.x
API CALL [sofia_contact(1526 at 210.x.x.x)] output:
sofia/internal/1526 at 219.8.z.z:15421
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080809/2953cf6d/attachment-0002.html
More information about the FreeSWITCH-users
mailing list