[Kamailio-Users] Hor to strip() $rU dynamically

Juha Heinanen jh at tutpro.com
Wed Mar 18 16:01:20 CET 2009


Iñaki Baz Castillo writes:

 >   INVITE sip:client_xxx2004 at domain.org SIP/2.0
 > 
 > and I get from an $avp(CLIENT) the value "client_xxx".
 > 
 > I need to strip from $rU the lenght of $avp(CLIENT), this is:
 > 
 >   # Original $rU => client_xxx2004
 >   strip($avp(CLIENT));
 >   # New $rU      => 2004
 > 
 > Unfortunatelly "strip()" doesn't accept a PV as parameter, but a
 > static integer.

does len() accept a pv argument?  if it does, you can then uses s.substr
transformation.

-- juha




More information about the sr-users mailing list