[SR-Users] Kamailio Transformation Assignment to an AVP

Brandon Armstead brandon at cryy.com
Mon Jul 26 21:11:14 CEST 2010


Hello,

    I have the following transformation on the SDP Body:

$(rb{re.subst,/^(.*)m=audio ([0-9]+) RTP\/AVP ([0-9 ]+)\015\012(.*)$/\3/s})

However when I assign this to an AVP, i.e.

$avp(s:sdp-payloads) = $(rb{re.subst,/^(.*)m=audio ([0-9]+) RTP\/AVP ([0-9
]+)\015\012(.*)$/\3/s});

I receive back a NULL result / transformation "regex does not match" is what
I receive with high verbose syslog on kamailio.

HOWEVER.

When I do something like this:

xlog("L_INFO", "Payloads Available: $(rb{re.subst,/^(.*)m=audio ([0-9]+)
RTP\/AVP ([0-9 ]+)\015\012(.*)$/\3/s})");

It executes properly -- transformation regex matches and the payloads are
displayed as expected.

If anyone can provide any insight as to what I may be doing wrong it would
be greatly appreciated.

P.S. Kamailio SVN Revision # 2:5906M (1.5.2-notls).

Also I CC'ed devel list (as I do believe this may be a bug).

Thanks!

Sincerely,
Brandon Armstead
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20100726/460ad431/attachment.htm>


More information about the sr-users mailing list