[OpenSIPS-Users] Validate To Uri

Dave Singer dave.dorasinger at gmail.com
Wed May 4 17:04:32 CEST 2011


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 <denis7979 at mail.ru> wrote:

> Hello
>
> Try to use dialplan module
> http://www.opensips.org/html/docs/modules/devel/dialplan.html#id249075
>
> -----Original Message-----
> From: users-bounces at lists.opensips.org [mailto:
> users-bounces at lists.opensips.org] On Behalf Of Jan D.
> Sent: Wednesday, May 04, 2011 1:00 PM
> To: users at 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 at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>



-- 
David Singer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20110504/2329e16c/attachment.htm>


More information about the Users mailing list