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><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">&lt;<a href="mailto:miconda@gmail.com">miconda@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">



  

<div bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
I tested with:<br>
<br>
    xlog(&quot;===============================+++: [$rb]\n&quot;);<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(&quot;===============================+++: [$rb]\n&quot;);<br>
    xlog(&quot;==================================: [$var(c)]\n&quot;);<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></div><div class="h5"><br>
<br>
<br>
On 7/27/10 9:44 PM, <a href="mailto:brandon@cryy.com" target="_blank">brandon@cryy.com</a> wrote:
<blockquote type="cite">
  
Daniel,<br>
  <br>
I&#39;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 href="mailto:miconda@gmail.com" target="_blank">&lt;miconda@gmail.com&gt;</a>
  </div>
  <div><b>Date: </b>Tue, 27 Jul 2010 11:50:36 +0200</div>
  <div><b>To: </b>Brandon Armstead<a href="mailto:brandon@cryy.com" target="_blank">&lt;brandon@cryy.com&gt;</a></div>
  <div><b>Cc: </b><a href="mailto:users@lists.kamailio.org" target="_blank">&lt;users@lists.kamailio.org&gt;</a>;
<a href="mailto:devel@lists.kamailio.org" target="_blank">&lt;devel@lists.kamailio.org&gt;</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(&quot;==================================\n&quot;);<br>
$var(b) =<br>
&quot;v=0\r\n&quot;<br>
&quot;o=- 5 2 IN IP4 192.168.3.100\r\n&quot;<br>
&quot;s=CounterPath Bria\r\n&quot;<br>
&quot;c=IN IP4 174.37.XX.XXX\r\n&quot;<br>
&quot;t=0 0\r\n&quot;<br>
&quot;m=audio 64192 RTP/AVP 107 0 8 18 101\r\n&quot;<br>
&quot;a=sendrecv\r\n&quot;<br>
&quot;a=rtpmap:107 BV32/16000\r\n&quot;<br>
&quot;a=rtpmap:18 G729/8000\r\n&quot;<br>
&quot;a=fmtp:18 annexb=yes\r\n&quot;<br>
&quot;a=rtpmap:101 telephone-event/8000\r\n&quot;<br>
&quot;a=fmtp:101 0-15\r\n&quot;<br>
&quot;a=nortpproxy:yes\r\n&quot;;<br>
  <br>
$var(c) = $(var(b){re.subst,|.*m=audio [0-9]+ RTP/AVP ([0-9
]+).+|\1|s});<br>
xlog(&quot;==================================: [$var(c)]\n&quot;);<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 &quot;regex does not match&quot; is
what I receive with high verbose syslog on kamailio.<br>
    <br>
HOWEVER.<br>
    <br>
When I do something like this:<br>
    <br>
xlog(&quot;L_INFO&quot;, &quot;Payloads Available: $(rb{re.subst,/^(.*)m=audio
([0-9]+) RTP\/AVP ([0-9 ]+)\015\012(.*)$/\3/s})&quot;);<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&#39;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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a 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 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 href="mailto:sr-users@lists.sip-router.org" target="_blank">sr-users@lists.sip-router.org</a>
<a 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 href="http://www.asipto.com/" target="_blank">http://www.asipto.com/</a>
</pre>
</div></div></div>

</blockquote></div><br>