[Freeswitch-users] Help on Explaination of the configurations parrametters

Paul Cupis paul at cupis.co.uk
Thu May 17 23:01:35 MSD 2012


On 17/05/12 02:50, Albert Nguyen wrote:
> I am new to FS and trying to setup a SBC using the example 2 in the FS
> wiki website. The link is
> http://wiki.freeswitch.org/wiki/SBC_FreeSWITCH_Configuration_Example_2.
>
> There are parameters in the example that I have to replaces for it to
> work with my own scenarios. However I have problem understanding the
> following lines. Is there anyone able to explain what does this mean
>
> <condition field="${sip_redirect_contact_0}"
> expression="(((192.168.)|(172.24.)|(10.10.))\d+\.\d+(:\d+)(;dtg=\w+)?)">
>
> The bits I am not sure is )\d+\.\d+(:\d+)(;dtg=\w+)?). What does this do?

This will match certain (IPv4) IP addresses, with ports specified:

192.168.x.x:y
172.24.x.x:y
10.10.x.x:y

optionally ending in:

;dtg=xxxx

In the given example, the rest of the XML is executed conditionally on 
this match. If the sip_redirect_contact_0 matches the expression, then 
the <actions> are executed, otherwise the <anti-action> is executed.

Regards,



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