[Serusers] configuring ser.cfg for ip addresses

Amen Holmes atob100 at yahoo.com
Mon May 17 12:37:48 CEST 2004


Thanks - that makes sense.
If I am using a url instead of defining the ip address, e.g. iptel.org, why don't I need to put in the backslash to escape the . character?

Jan Janak <jan at iptel.org> wrote:
On 14-05 07:47, Amen Holmes wrote:
> I am a newbie to ser and am trying to get ser.cfg working for a specific ip address.
> 
> I am trying to get ser.cfg to pick up a specific ip address. Do I need anything special when defining the ip address (like \ characters)?
> 
> Any help would be greatly appreciated.
> 
> e.g.
> route{
> 
> if (uri=~"^sip:[09][0-9]*@194.xxx.xxx.xxx") {
> ........}

Yes, =~ means "match using regular expression" and the string between
quotes is supposed to be a regular expressions. Therefore you have to
escape . characters with backslash:

if (uri=~"^sip:[09][0-9]*@194\.xxx\.xxx\.xxx") {

Jan.
		
---------------------------------
Do you Yahoo!?
SBC Yahoo! - Internet access at a great low price.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20040517/fe3aa2f9/attachment.htm>


More information about the sr-users mailing list