Hello list,
I am afraid I am asking something stupid but I cannot find a way to do this cleanly, so here it goes....
I am retrieving values from a db using either carrierroute or mtree modules to send a 302 to my softswitch. It expects the message as:
SIP/2.0 302 Moved Temporarily Via: SIP/2.0/UDP 134.111.48.66:5060;branch=zgfdgdfgf2491b5437 Contact: sip:989897@X.X.X.X;rg=4003;q=0.2 Contact: sip:989897@X.X.X.X:rg=321;q=0.8 To: sip:989897@X.X.X.X:5066;tag=1 .....
Where the important things are the rg: those are the trunks in the SS) and the q (probability) and there can be multiple rgs for the same prefix (2 in this example)
My idea was to keep in the db something like this:
Prefix:98 Route:4003,0.2|321,0.8
And then inject those values in the contact header, but I am having a hard time finding the right way to do it. Is there any way to do it without calling the perl module?
Many thanks,
A
On Friday 10 September 2010, anthony thomas wrote:
I am retrieving values from a db using either carrierroute or mtree modules to send a 302 to my softswitch. It expects the message as: [..] Contact: sip:989897@X.X.X.X;rg=4003;q=0.2 Contact: sip:989897@X.X.X.X:rg=321;q=0.8 [..] And then inject those values in the contact header, but I am having a hard time finding the right way to do it. Is there any way to do it without calling the perl module?
Hi anthony,
so your question is related to the modifying of the contact header in the message? Have you tried the remove_hf/ append_hf functions, or the subst function (all in textops) in the config script?
Cheers,
Henning
W dniu 2010-09-10 11:45, anthony thomas pisze:
SIP/2.0 302 Moved Temporarily Via: SIP/2.0/UDP 134.111.48.66:5060;branch=zgfdgdfgf2491b5437 Contact:sip:989897@X.X.X.X;rg=4003;q=0.2 Contact:sip:989897@X.X.X.X:rg=321;q=0.8 To:sip:989897@X.X.X.X:5066;tag=1 .....
by the way.. As i recall get_redirects() function doesn't handle properly such responses from other servers. Same aply to $ct PV which doesn't accept [*] i know it can be bypassed by using $hdr(Contact)[*] and AFAIR multiple contact header is not quite fine with RFC but many systems are doing this that way, so maybe it would by good to support it.
excuse me if it was already added - haven't checked recently.
Grzegorz Stanislawski
Hello,
not sure if was worked in case you reported in the past. Please register a tracker issue every time you report a problem, otherwise may be lost:
http://sip-router.org/tracker/
Thanks, Daniel
On 9/12/10 11:24 PM, Grzegorz Stanislawski wrote:
W dniu 2010-09-10 11:45, anthony thomas pisze:
SIP/2.0 302 Moved Temporarily Via: SIP/2.0/UDP 134.111.48.66:5060;branch=zgfdgdfgf2491b5437 Contact:sip:989897@X.X.X.X;rg=4003;q=0.2 Contact:sip:989897@X.X.X.X:rg=321;q=0.8 To:sip:989897@X.X.X.X:5066;tag=1 .....
by the way.. As i recall get_redirects() function doesn't handle properly such responses from other servers. Same aply to $ct PV which doesn't accept [*] i know it can be bypassed by using $hdr(Contact)[*] and AFAIR multiple contact header is not quite fine with RFC but many systems are doing this that way, so maybe it would by good to support it.
excuse me if it was already added - haven't checked recently.
Grzegorz Stanislawski
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