[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [osip-dev] Some questions about the rport and oSIP

From: yonglong.zhao
Subject: Re: [osip-dev] Some questions about the rport and oSIP
Date: Tue, 22 Jan 2013 09:30:06 +0800

Hi Aymeric,
Thanks for your suggestion.
The code used by my project was published in 2001s, so it is too old and I can't found "osip_message_fix_last_via_header ".
I will check the eXosip2 ,hope it may help me to solve the problem.


发件人:Aymeric Moizard
发送时间:2013-01-21 19:12:19
主题:Re: [osip-dev] Some questions about the rport and oSIP
Hi Yonglong,

There is a method in osip that is a helper for adding "received" and "rport" parameters
into an incoming request.

For every incoming request, you can call the following method with the correct SOURCE
IP and PORT.
int osip_message_fix_last_via_header (osip_message_t * request, const char *ip_addr, int port)

The source ip & port can be retreived using "recvfrom" socket API.

 You can check eXosip2 source code to see how this is done.

I don't see any reference to  "sip_message_receive" and "osipua_distribute_event" in 
my code.... (may be that's reference to an old sample code or version?)


2013/1/21 yonglong.zhao <address@hidden>
Hi all,
I have some problem with the rport and oSIP.
The value of rport must be set to the source port of the request if the request has a rport without value, as specificed in RFC 3581. 
While in oSIP stack, the value of rport is set to the port of via.
So this should  cause some problems in some cases.
Such as the port of via may be 0 or empty, or the port of via may be different with the source port in UDP.
My question is if it is possible to get the source port of a request in SIP layer, how and if the answer is no,how can I resolve those problems?
I have checked the source code of oSIP libaray,and I find that a sip message is transformed from routeline sip_message_receive() with a parameter port,
 this should be the source port what I need.But this value isn't transformed to the next routeline osipua_distribute_event ().
Thanks for any replies.

osip-dev mailing list

Antisip - http://www.antisip.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]