<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
On 7/28/10 5:32 PM, Brandon Armstead wrote:
<blockquote
cite="mid:AANLkTikB740a+sJcBi2wwcig9PDZAniZPcOGxdXwx5SL@mail.gmail.com"
type="cite">Daniel,<br>
<br>
When I take your example with the modified regex it works. I
wonder if there is any association to using / as delimiter versus | and
the () match references?<br>
</blockquote>
<br>
hmm, might the / versus | in the way that you may need to use \\/ to
escape it -- just try and let me know if solves something. I used |
because I try to avoid escaping inside subst expressions and it works
to use any character you want (same like in sed tool - the character
used on first position is considered delimiter and has to be escaped
when is not).<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<blockquote
cite="mid:AANLkTikB740a+sJcBi2wwcig9PDZAniZPcOGxdXwx5SL@mail.gmail.com"
type="cite"><br>
Sincerely,<br>
Brandon Armstead<br>
<br>
<div class="gmail_quote">On Wed, Jul 28, 2010 at 3:23 AM,
Daniel-Constantin Mierla <span dir="ltr"><<a moz-do-not-send="true"
href="mailto:miconda@gmail.com">miconda@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote"
style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div bgcolor="#ffffff" text="#000000">Hello,<br>
<br>
I tested with:<br>
<br>
xlog("===============================+++: [$rb]\n");<br>
$var(b) = $rb;<br>
$var(c) = $(rb{re.subst,|.*m=audio [0-9]+ RTP/AVP ([0-9
]+).+|\1|s});<br>
# $var(c) = $(var(b){re.subst,|.*m=audio [0-9]+ RTP/AVP ([0-9
]+).+|\1|s});<br>
xlog("===============================+++: [$rb]\n");<br>
xlog("==================================: [$var(c)]\n");<br>
<br>
and everything looked fine. Could be something specific for your config
or environment, what is content-length of your invite?<br>
<br>
Cheers,<br>
<font color="#888888">Daniel</font>
<div>
<div class="h5"><br>
<br>
<br>
On 7/27/10 9:44 PM, <a moz-do-not-send="true"
href="mailto:brandon@cryy.com" target="_blank">brandon@cryy.com</a>
wrote:
<blockquote type="cite"> Daniel,<br>
<br>
I've also tried with script vars. I think it has something to do with
the actual dynamic psuedo variable $rb. Var assignment and mangling
does not work for me either. I.e. Keep everything the same except
$var(test) = $rb and so on. Let me know if this makes sense.<br>
<br>
Sincerely,<br>
Brandon Armstead<br>
<br>
*Forgot to reply to ALL (resending)
<p>Sent from my Verizon Wireless BlackBerry</p>
<hr>
<div><b>From: </b> Daniel-Constantin Mierla
<a moz-do-not-send="true" href="mailto:miconda@gmail.com"
target="_blank"><miconda@gmail.com></a> </div>
<div><b>Date: </b>Tue, 27 Jul 2010 11:50:36 +0200</div>
<div><b>To: </b>Brandon Armstead<a moz-do-not-send="true"
href="mailto:brandon@cryy.com" target="_blank"><brandon@cryy.com></a></div>
<div><b>Cc: </b><a moz-do-not-send="true"
href="mailto:users@lists.kamailio.org" target="_blank"><users@lists.kamailio.org></a>;
<a moz-do-not-send="true" href="mailto:devel@lists.kamailio.org"
target="_blank"><devel@lists.kamailio.org></a></div>
<div><b>Subject: </b>Re: [SR-Users] Kamailio Transformation
Assignment to an AVP</div>
<div><br>
</div>
Hello,<br>
<br>
interesting, when I troubleshooted before your previous report, I used
this piece of cfg:<br>
<br>
xlog("==================================\n");<br>
$var(b) =<br>
"v=0\r\n"<br>
"o=- 5 2 IN IP4 192.168.3.100\r\n"<br>
"s=CounterPath Bria\r\n"<br>
"c=IN IP4 174.37.XX.XXX\r\n"<br>
"t=0 0\r\n"<br>
"m=audio 64192 RTP/AVP 107 0 8 18 101\r\n"<br>
"a=sendrecv\r\n"<br>
"a=rtpmap:107 BV32/16000\r\n"<br>
"a=rtpmap:18 G729/8000\r\n"<br>
"a=fmtp:18 annexb=yes\r\n"<br>
"a=rtpmap:101 telephone-event/8000\r\n"<br>
"a=fmtp:101 0-15\r\n"<br>
"a=nortpproxy:yes\r\n";<br>
<br>
$var(c) = $(var(b){re.subst,|.*m=audio [0-9]+ RTP/AVP ([0-9
]+).+|\1|s});<br>
xlog("==================================: [$var(c)]\n");<br>
<br>
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.<br>
<br>
Cheers,<br>
Daniel<br>
<br>
<br>
On 7/26/10 9:11 PM, Brandon Armstead wrote:
<blockquote type="cite">Hello,<br>
<br>
I have the following transformation on the SDP Body:<br>
<br>
$(rb{re.subst,/^(.*)m=audio ([0-9]+) RTP\/AVP ([0-9
]+)\015\012(.*)$/\3/s})<br>
<br>
However when I assign this to an AVP, i.e.<br>
<br>
$avp(s:sdp-payloads) = $(rb{re.subst,/^(.*)m=audio ([0-9]+) RTP\/AVP
([0-9 ]+)\015\012(.*)$/\3/s});<br>
<br>
I receive back a NULL result / transformation "regex does not match" is
what I receive with high verbose syslog on kamailio.<br>
<br>
HOWEVER.<br>
<br>
When I do something like this:<br>
<br>
xlog("L_INFO", "Payloads Available: $(rb{re.subst,/^(.*)m=audio
([0-9]+) RTP\/AVP ([0-9 ]+)\015\012(.*)$/\3/s})");<br>
<br>
It executes properly -- transformation regex matches and the payloads
are displayed as expected.<br>
<br>
If anyone can provide any insight as to what I may be doing wrong it
would be greatly appreciated.<br>
<br>
P.S. Kamailio SVN Revision # 2:5906M (1.5.2-notls).<br>
<br>
Also I CC'ed devel list (as I do believe this may be a bug).<br>
<br>
Thanks!<br>
<br>
Sincerely,<br>
Brandon Armstead<br>
<pre><fieldset></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a>
</pre>
<pre><fieldset></fieldset>
_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
<a moz-do-not-send="true" href="mailto:sr-users@lists.sip-router.org"
target="_blank">sr-users@lists.sip-router.org</a>
<a moz-do-not-send="true"
href="http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users"
target="_blank">http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<br>
<pre cols="72">--
Daniel-Constantin Mierla
<a moz-do-not-send="true" href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a>
</pre>
</div>
</div>
</div>
</blockquote>
</div>
<br>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
Daniel-Constantin Mierla
<a class="moz-txt-link-freetext" href="http://www.asipto.com/">http://www.asipto.com/</a>
</pre>
</body>
</html>