[Freeswitch-users] dialplan condition do string comparison

Lee JJ jengjr at gmail.com
Thu Aug 21 06:32:25 EDT 2008


Hello :

So far I test 2 sip profiles, thinking the dialplan logic

if sip_from_host == sip_to_host {
// this part is searching 2 groups user registered directly
     do dialplan XML processing
     do bridge sofia/...
//  otherwise looking outside
}else {
     do dialplan ENUM processing
}

Can the dialplan condition do string comparison ?
e.g. "${sip_from_host} == ${sip_to_host}"
otherwise something like this

<condition field="${sip_from_host}" expression="210.2xx.xx.xx"/>
<condition field="${sip_to_host}" expression="210.2xx.xx.xx">
<action ....


I finally got some experience of multiple sip profiles.
Some key points
# under sip_profiles directory #
<param name="context" value="inter2"/>
<param name="dialplan" value="ENUM"/>

# user config file
<variable name="user_context" value="inter2"/>


# enum.conf.xml
<routes>
<route service="E2U+SIP" regex="sip:(.*)"
replace="sofia/${sofia_profile_name}/$1"/>

Wondering can this ENUM work out ?
<route service="E2U+SIP" regex="sip:^(.*)$\@${sophia_profile_name}"
replace="sofia/${sophia_profile_name}/$1"/>

However I still think the FreeSwitch should do DNS , or SRV lookup first !

It should not query ENUM first .
21  11.653138 210.2x.x.x -> 202.y.y.y DNS Standard query NAPTR
2.9.9.9.e164.org

# dialplan
<action application="transfer" data="$1 enum"/ >  this syntax also working !

thanks !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20080821/eae2d802/attachment.html 


More information about the Freeswitch-users mailing list