Hello Satish,

There is no need for regex substitution, since OpenSIPS has lots of useful variables. [1]

In your case, you could do:

$var(id) = "sip:" + $rd + ":" + $rp;

[1]: http://www.opensips.org/Documentation/Script-CoreVar-1-12

Best regards,

Liviu Chircu
OpenSIPS Developer
http://www.opensips-solutions.com

On 12.09.2014 23:48, Satish Patel wrote:
Following is $ru and i want to extract following sip:sipprovider.com:5060 <http://sipprovider.com:5060>

sip:[email protected]:5060 <http://sip:[email protected]:5060>

to

sip:sipprovider.com:5060 <http://sipprovider.com:5060>

I am using following regex but its not working, does following make sense?

 $var(z) = $ru;
        $var(z) = "s/[^:@]*@//";
        xlog("My regex $ru\n");









_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to