[Freeswitch-users] dialplan condition do string comparison

Lee JJ jengjr at gmail.com
Thu Aug 21 03:32:25 PDT 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
<route service="E2U+SIP" regex="sip:(.*)"

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

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

# 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-0002.html 

More information about the FreeSWITCH-users mailing list