Marius hi,

Thank you for your replay.
With the regular expression you provided me I get "SIP/2.0/UDP  172.16.0.13:5060;tgrp:TNDEM-ACR"

Can I isolate only tgrp:TNDEM-ACR ?

Thank you
Alex


On Tue, Nov 30, 2010 at 5:07 PM, marius zbihlei <marius.zbihlei@1and1.ro> wrote:
On 11/30/2010 01:58 PM, alex pappas wrote:
Dear All,

We have some cisco gw that they send to the Kamailio in the first invite and inside the VIA header an x-route-tag="The Gateway that the call entered".

I'm trying to add this to the acc module in order to have it recorded but without sucess.
My config is this:

if (search("x-route-tag"))
        {
                avp(s:xroutetag) = $sel(@via);
                xlog("----- We have a x-route-tag in the SIP msg avp: $avp(s:xroutetag) -----");
        };

I'm trying to add the VIA header to an avp so I could manipulate the string but i cannot implement this.

Does anyone can suggest a way to add the x-route-tag value to an AVP?

Thank you in advance

Alex

sample VIA header:  Via: SIP/2.0/UDP  10.0.0.15:5060;x-route-tag="tgrp:TANDEM-KOR"

Hello,

You can use transformations http://kamailio.org/dokuwiki/doku.php/transformations:3.1.x . This should to the trick: (careful on needed modules)

$var(s:xroutetag) = $(hdr(Via){re.subst,/x-route-tag="(.*)"/\1/});


Cheers,
Marius




_______________________________________________
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