Marius hi,<br><br>Thank you for your replay.<br>With the regular expression you provided me I get &quot;<b><i>SIP/2.0/UDP  172.16.0.13:5060;tgrp:TNDEM-ACR</i></b>&quot;<br><br>Can I isolate only <b><i>tgrp:TNDEM-ACR ?<br><br>
</i></b>Thank you<br>Alex<br><b><i><br></i></b><br><div class="gmail_quote">On Tue, Nov 30, 2010 at 5:07 PM, marius zbihlei <span dir="ltr">&lt;<a href="mailto:marius.zbihlei@1and1.ro">marius.zbihlei@1and1.ro</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 text="#000000" bgcolor="#ffffff"><div><div></div><div class="h5">
On 11/30/2010 01:58 PM, alex pappas wrote:
<blockquote type="cite">Dear All,<br>
  <br>
We have some cisco gw that they send to the Kamailio in the first
invite and inside the VIA header an x-route-tag=&quot;The Gateway that the
call entered&quot;.<br>
  <br>
I&#39;m trying to add this to the acc module in order to have it recorded
but without sucess.<br>
My config is this:<br>
  <br>
if (search(&quot;x-route-tag&quot;))<br>
        {<br>
                avp(s:xroutetag) = $sel(@via);<br>
                xlog(&quot;----- We have a x-route-tag in the SIP msg avp:
$avp(s:xroutetag) -----&quot;);<br>
        };<br>
  <br>
I&#39;m trying to add the VIA header to an avp so I could manipulate the
string but i cannot implement this.<br>
  <br>
Does anyone can suggest a way to add the <b>x-route-tag</b> value to
an AVP?<br>
  <br>
Thank you in advance<br>
  <br>
Alex<br>
  <br>
sample VIA header:  Via: SIP/2.0/UDP  <a href="http://10.0.0.15:5060" target="_blank">10.0.0.15:5060</a>;<b>x-route-tag=&quot;tgrp:TANDEM-KOR&quot;</b><br>
  <br>
</blockquote></div></div>
Hello, <br>
<br>
You can use transformations
<a href="http://kamailio.org/dokuwiki/doku.php/transformations:3.1.x" target="_blank">http://kamailio.org/dokuwiki/doku.php/transformations:3.1.x</a> . This
should to the trick: (careful on needed modules)<br>
<br>
<pre>$var<span>(</span>s:xroutetag<span>)</span> <span>=</span> $<span>(</span>hdr(Via)<span>{</span>re.<span>subst</span><span>,/</span><span></span><span></span><span></span><span></span><span></span><span></span><span>x-route-tag=&quot;(.*)&quot;</span><span>/</span>\1<span>/</span><span>}</span><span>)</span><span>;


</span></pre>
Cheers,<br>
Marius<br>
<pre><span></span><span></span><span>

</span></pre>
<br>
</div>

<br>_______________________________________________<br>
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list<br>
<a href="mailto:sr-users@lists.sip-router.org">sr-users@lists.sip-router.org</a><br>
<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><br>
<br></blockquote></div><br>