Hello,

The nameaddr.name transformation will return the "77777" string along the quotes. The s.int is to transform a number from string representation to integer - so it is a missusage of this transformation here. You just want to get rid of the quotes, right ?

You could do something simple like:

$avp(name) = $(hdr(P-Asserted-Identity){nameaddr.name})
# if string starts with '"", get rid of the first and last char from the string.
if ( $(avp(name){s,substr,0,1})=='"' )
$avp(name) := $(avp(name){s.substr,1,-1});

Regards,

Bogdan-Andrei Iancu
OpenSIPS Founder and Developer
http://www.opensips-solutions.com

On 25.03.2014 15:15, Alexander Mustafin wrote:
Hello.

I’ve got the header in message: P-Asserted-Identity: «777777" <sip:[email protected]>

And I need to parse «name» part for future used, but without quotes.

I’m trying:

$avp(name) = $(hdr(P-Asserted-Identity){nameaddr.name}{s.int});

but $avp(name) is null after this transformation.

How to delete quotes from this field?


Best regards,
Alexander Mustafin
[email protected] <mailto:[email protected]>






_______________________________________________
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