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

Peter P GMX Prometheus001 at gmx.net
Thu Jan 17 10:11:48 CET 2008


Thanks for your quick reply,


I have the following routes:

For the invites
route[6] {
  # -----------------------------------------------------------------
  # Exchange 2007 Handler
  # -----------------------------------------------------------------
  xlog("L_INFO","Step 600 Entering ==== Route 6 (Exchange 2007) ======");
  force_send_socket(10.10.2.24:5060); # for sending requets on eth1
  if (t_relay("tcp:10.10.2.13:5060")){
    xlog("L_INFO", "Step 601: Forward to UM2007 succecssful - From=$fu 
To=$tu\n");
  }else{
    xlog("L_INFO", "Step 602: Forward to UM2007 not successful - 
From=$fu To=$tu\n");
  };
}


For the failure route

failure_route[1] {
    xlog("L_INFO","Step 700 Entering ==== Failure Route 1 ======");
    xlog("L_INFO","Step 701:Method [$rm]");
    if (method=="INVITE"){
        get_redirects("*");
        force_send_socket(10.10.2.24:5060);  # for sending requets on eth1
        if (t_relay()){
            xlog("L_INFO","Step 702: t_relay ok");
        }
    }
}

As UM requests a different port (5065) in the 302 message, I cannot use 
t_relay with TCP in the failure_route. With t_relay I have to submit the 
whole address like
t_relay(tcp: dest_ip:port) and I cannot always predict the port in this 
case.

Best regards
Peter

Iñaki Baz Castillo schrieb:
> El Miércoles, 16 de Enero de 2008, Peter P GMX escribió:
>   
>> 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
>>     
>
>
>   
>> 1. How can I change the initial INVITe message (Step5) in order to have 
>> the right headers. (transport=TCP instead of transport=UDP)?  
>>     
>
> I suppose that the account in UM 2007 is not registered in OpenSer so you need 
> to specify protocol TCP in the t_relay(). How do you use "t_relay()" to 
> contact UM 2007?
>
>
>
>   




More information about the sr-users mailing list