[Users] rport in via header

Daniel-Constantin Mierla daniel at voice-system.ro
Fri Aug 12 16:18:05 CEST 2005


Hello,

I understood the issue you have. I just added on CVS a new function ( 
add_local_rport() ) that appends the rport parameter to the via header 
generated by OpenSER. You have to call this function for any SIP request 
that your proxy will forward and you want to have the rport parameter.

The pserver cvs may take some time to synchronize (sourceforge policy).

Please let me know if it works.

Daniel


On 08/12/05 08:10, ranveer kunal wrote:

>correction :
>
>On 8/12/05, ranveer kunal <ranveerkunal at gmail.com> wrote:
>  
>
>>hi daniel,
>>             no basically gateway is not appending any via header, its
>>acting as NAT.
>>ok i'll explain the scenario onece again.
>>
>>proxy is behind the gateway, so any packet going out of proxy is
>>natted out using gateway's ip (ip2) and port (port2), the via header
>>is appended by the proxy, it has ip1:port1. ok.
>>Now when next hop proxy gets the packet, it will reply to the ip from
>>    
>>
>
>***********> which it got the packet ie ip1 and the port from top via
>header that
>***********> is port2.
>which it got the packet ie ip2 and the port from top via header that
>is port1.
>
>
>  
>
>>Ithink now you'll get the real picture.
>>
>>Regards,
>>Ranveer.
>>
>>
>>On 8/12/05, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>>    
>>
>>>Hello,
>>>
>>>so actually the gateway is a NAT, and it is not SIP aware at all. From
>>>the picture I got that the gateway adds also a via header with
>>>ip2:port2. In this case, I understand your question, I will double check
>>>how via header is built inside openser and come back with answer during
>>>the day (too late now).
>>>
>>>Daniel
>>>
>>>On 08/11/05 21:06, ranveer kunal wrote:
>>>
>>>      
>>>
>>>>hi,
>>>>   RFC 3581 says if the the transport layer is UDP, the reply should
>>>>be sent to ip of ip packet received and the port shud be taken from
>>>>the via header, untill unless rport is there.
>>>>
>>>>since in via header port  is port1(it was written by proxy). next hop
>>>>proxy sends the reply to ip2:port1.
>>>>
>>>>I have figured a work around, i'll force gateway to send the packet
>>>>        
>>>>
>>>>from port=port1. Thus the problem will be solved.
>>>      
>>>
>>>>Thanks.
>>>>
>>>>Regards,
>>>>Ranveer.
>>>>
>>>>
>>>>On 8/11/05, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>>>>
>>>>
>>>>        
>>>>
>>>>>Hello,
>>>>>
>>>>>On 08/11/05 04:33, ranveer kunal wrote:
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>hey daniel,
>>>>>>             The packet from the ser proxy is statelessly forwarded
>>>>>>by a gateway that is inline with proxy, now i want next hop proxy to
>>>>>>reply on the port of the gateway rather than port of proxy. that is y
>>>>>>i need proxy to send rport.
>>>>>>
>>>>>>proxy--------------gateway--------------next hop proxy
>>>>>>
>>>>>>proxy -> ip1:port1-> gateway -> ip2:port2 -> next hop proxy
>>>>>>next hop proxy -> replies to ip2:port1 (hybrid) -> screws my setup
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>the next hop proxy is broken, why does it reply to ip2:port1? It should
>>>>>reply to source_ip and source_port of the received request. The proxy is
>>>>>not aware at all about ip2:port2 used by gateway.
>>>>>
>>>>>Daniel
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>can you suggest me some way to overcome this.
>>>>>>
>>>>>>Regards,
>>>>>>Ranveer.
>>>>>>
>>>>>>On 8/11/05, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Hello,
>>>>>>>
>>>>>>>On 08/10/05 21:10, ranveer kunal wrote:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>hi daniel,
>>>>>>>>          as far as i have explored force_rport(), places the rport
>>>>>>>>parameter in the topmost via header and not in its own via header. am
>>>>>>>>i right ?
>>>>>>>>
>>>>>>>>example :
>>>>>>>>
>>>>>>>>UAC -> (via1:via2:via3)proxy(force_rport)->(via1:via2:via3,rport:via4)next proxy
>>>>>>>>
>>>>>>>>i want this :
>>>>>>>>UAC -> (via1:via2:via3)proxy(force_rport)->(via1:via2:via3:via4,rport)next proxy
>>>>>>>>
>>>>>>>>Please clarify it ?
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>yes, it is like that. And this is how it is supposed to be, according to
>>>>>>>RFC3581. Why do you need it in proxy's via? The proxy will look at the
>>>>>>>second via to get the destination address for reply.
>>>>>>>
>>>>>>>Daniel
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>Regards,
>>>>>>>>Ranveer.
>>>>>>>>
>>>>>>>>On 8/10/05, Daniel-Constantin Mierla <daniel at voice-system.ro> wrote:
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>>>Hello,
>>>>>>>>>
>>>>>>>>>you have to use force_rport() in the configuration file for the request
>>>>>>>>>you want rport parameter in VIA.
>>>>>>>>>
>>>>>>>>>Daniel
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>On 08/10/05 20:44, ranveer kunal wrote:
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>                  
>>>>>>>>>
>>>>>>>>>>hi all,
>>>>>>>>>>    Is there a way to configure openser so that it sends rport in
>>>>>>>>>>via header ? Actually th packet from server is reverse natted through
>>>>>>>>>>another system using any random port, i want it the reply to come on
>>>>>>>>>>the same port . thanks ....
>>>>>>>>>>
>>>>>>>>>>Regards,
>>>>>>>>>>Ranveer.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>                    
>>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>
>>>>
>>>>        
>>>>
>>--
>>Memories : They bring Diamonds and Rust
>>
>>    
>>
>
>
>  
>




More information about the sr-users mailing list