Hello,

interesting, when I troubleshooted before your previous report, I used this piece of cfg:

xlog("==================================\n");
$var(b) =
"v=0\r\n"
"o=- 5 2 IN IP4 192.168.3.100\r\n"
"s=CounterPath Bria\r\n"
"c=IN IP4 174.37.XX.XXX\r\n"
"t=0 0\r\n"
"m=audio 64192 RTP/AVP 107 0 8 18 101\r\n"
"a=sendrecv\r\n"
"a=rtpmap:107 BV32/16000\r\n"
"a=rtpmap:18 G729/8000\r\n"
"a=fmtp:18 annexb=yes\r\n"
"a=rtpmap:101 telephone-event/8000\r\n"
"a=fmtp:101 0-15\r\n"
"a=nortpproxy:yes\r\n";

$var(c) = $(var(b){re.subst,|.*m=audio [0-9]+ RTP/AVP ([0-9 ]+).+|\1|s});
xlog("==================================: [$var(c)]\n");

And the xlog printed properly the value of $var(c) - meaning that it was assigned the right value. I will test with avps next time I have a chance.

Cheers,
Daniel


On 7/26/10 9:11 PM, Brandon Armstead wrote:
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


_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

--
Daniel-Constantin Mierla
http://www.asipto.com/

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

Reply via email to