[OpenSER-Users] Openser 1.3 How to rewrite transport protocol from udp to tcp after redirect

Peter P GMX Prometheus001 at gmx.net
Wed Jan 16 23:25:37 CET 2008


Hello,

I have the following scenario:

SIP UA  <=UDP=> OpenSER <=TCP> Microsoft Unified Messaging 2007

When I invite an account on the UM 2007 server the following happens

1 SIP UA  ==Invite UDP=> OpenSER
2 SIP UA  <== 407 Proxy Authentication Required UDP= OpenSER
3 SIP UA  ==ACK UDP=> OpenSER
4 SIP UA  ==Invite UDP=> OpenSER
5 OpenSER ==Invite TCP=> UM2007
6 OpenSER <=Trying TCP== UM2007
7 OpenSER <= 302 Moved Temporarily TCP== UM2007
8 OpenSER == ACK TCP=> UM2007
9 OpenSER == INVITE UDP=> UM2007
.....no answer from UM2007
(I left out some steps between Openser and UA)

In Step 5 OpenSER invites "sip:11111 at 10.10.2.13;transport=UDP>" with TCP 
protocol (checked with ngrep) and UM2007 answers.
In Step 7 UM2007 answers with CONTACT: 
<sip:11111 at 10.10.2.13:5065;transport=UDP> but I need to answer on TCP to 
UM2007.
(I can change the message with add_uri_param("transport=tcp") in step 5 
and I get a <sip:11111 at 10.10.2.13:5065;transport=TCP> back from UA2007, 
but in fact the message is corrupted and OpenSER replies to the UA with 
Error 500  then, see below)

The point is:
- I can invite UM2007 with TCP (although I was not able to produce 
correct headers as there is still "transport=udp;>" mentioned in the 
INVITE part)
- but in the failure route when I force OpenSER to reinvite with 
get_redirects("*") and t_relay() I am not able to swith to TCP

I tried several ways as described in discussions which I found in  
http://osdir.com/ml/voip.openser.user/2005-12/msg00256.html
 - add_uri_param("transport=tcp"); ==> added transport=tcp additionally 
to transport=udp ==> transport=udp;transport=tcp  ==> 500 Internal 
Server error
 - $avp(s:foo)="sip:10.10.2.13;transport=tcp"; 
   avp_pushto("$du","$avp(s:foo)");                     ==>had actually 
no effect
 - replace_all("transport=udp", "transport=tcp");   ==> produced invalid 
headers as it simply replaced the headers wrongly as described in
   http://openser.org/pipermail/devel/2007-May/007702.html

Questions:
1. How can I change the initial INVITe message (Step5) in order to have 
the right headers. (transport=TCP instead of transport=UDP)?
2. How can I answer to a redirect and change to a different transport 
protocol (Step 9)?

Your help is very much appreciated.

Best regards
Peter










More information about the sr-users mailing list