[OpenSER-Users] appending into Via header

Jayesh Nambiar voip_freak at yahoo.co.in
Mon Jun 16 14:02:40 CEST 2008


Hi Henning,
Thanks for your reply.
I do not want it to add two times. I have explained as to where I want to add it in the Via header. I dont want to add it twice in the message.
I know I can easily add a new header but that does not meet my requirement.
I want it to be appended to the Via header that Openser creates while sending the call to the PSTN gateway.
To be precise, the format has to be like:
Via: SIP/2.0/UDP 192.168.2.125;branch=z9hG4bK7e7c.877b4352;x-route-tag="cid:1234"
where 192.168.2..125 is my openser and x-route-tag is what I want to append in the Via header.
Thanks again for your help.
w/regards,
Jayesh



----- Original Message ----
From: Henning Westerholt <henning.westerholt at 1und1.de>
To: users at lists.openser.org
Cc: Jayesh Nambiar <voip_freak at yahoo.co.in>
Sent: Monday, 16 June, 2008 2:57:52 PM
Subject: Re: [OpenSER-Users] appending into Via header

On Monday 16 June 2008, Jayesh Nambiar wrote:
> I had a requirement of appending a text in the VIA header while forwarding
> the request to the PSTN gateway. For eg:
> When the call is forwarded to a PSTN gateway from my Openser server, I
> needed the Via header to be as follows: Via: SIP/2.0/UDP
> 192.168.2.125;branch=z9hG4bK7e7c..877b4352;x-route-tag="cid:1234"
> x-route-tag="cid:1234" is what I want to append to the Via header that is
> going out of my proxy. I do not want to disturb the first Via header that
> has come in from the UA, I only want to append the text in the Via header
> when the message goes out of Openser proxy. Can someone please guide me on
> which module can help me in doing this or what would be the right approach.
> Thanks in advance,
> -- Jayesh

Hi Jayesh,

take a look at the textops modules, there are functions present to add/ 
manipulate header fields. I don't understand why you need to append the same 
parameter "x-route-tag" two times.. Instead of modifiying the VIA perhaps its 
possible to just add some new header, e.g. X-Route-Tag, this should be 
easier.

Henning



      Unlimited freedom, unlimited storage. Get it now, on http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20080616/87138a47/attachment.htm>


More information about the sr-users mailing list