[OpenSIPS-Users] Validate To Uri

2011-05-04 Thread Jan D.
In an INVITE I want to validate the To Uri ($Tu). This should be a numeric
value (ie. 31201234567).

Is there a function I can use or should I validate against a regexp (if so,
do you have an example).

Regards,

Jan

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Validate-To-Uri-tp6330114p6330114.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Validate To Uri

2011-05-04 Thread Denis Putyato
Hello

Try to use dialplan module
http://www.opensips.org/html/docs/modules/devel/dialplan.html#id249075

-Original Message-
From: users-boun...@lists.opensips.org 
[mailto:users-boun...@lists.opensips.org] On Behalf Of Jan D.
Sent: Wednesday, May 04, 2011 1:00 PM
To: users@lists.opensips.org
Subject: [OpenSIPS-Users] Validate To Uri

In an INVITE I want to validate the To Uri ($Tu). This should be a numeric
value (ie. 31201234567).

Is there a function I can use or should I validate against a regexp (if so,
do you have an example).

Regards,

Jan

--
View this message in context: 
http://opensips-open-sip-server.1449251.n2.nabble.com/Validate-To-Uri-tp6330114p6330114.html
Sent from the OpenSIPS - Users mailing list archive at Nabble.com.

___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


Re: [OpenSIPS-Users] Validate To Uri

2011-05-04 Thread Dave Singer
Jan,

I'm assuming you actually meant $tU which is the user portion of the To URI.
If all you are trying to do is test if they are numeric then regex is the
best way to test it.
Something like:
if ( ! $tU =~ "^[0-9]*$" ) {
   ... deal with non numeric user ...
}

Dave

On Wed, May 4, 2011 at 2:07 AM, Denis Putyato  wrote:

> Hello
>
> Try to use dialplan module
> http://www.opensips.org/html/docs/modules/devel/dialplan.html#id249075
>
> -Original Message-
> From: users-boun...@lists.opensips.org [mailto:
> users-boun...@lists.opensips.org] On Behalf Of Jan D.
> Sent: Wednesday, May 04, 2011 1:00 PM
> To: users@lists.opensips.org
> Subject: [OpenSIPS-Users] Validate To Uri
>
> In an INVITE I want to validate the To Uri ($Tu). This should be a numeric
> value (ie. 31201234567).
>
> Is there a function I can use or should I validate against a regexp (if so,
> do you have an example).
>
> Regards,
>
> Jan
>
> --
> View this message in context:
> http://opensips-open-sip-server.1449251.n2.nabble.com/Validate-To-Uri-tp6330114p6330114.html
> Sent from the OpenSIPS - Users mailing list archive at Nabble.com.
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> ___
> Users mailing list
> Users@lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
David Singer
___
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users