osip-dev
[Top][All Lists]
Advanced

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

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


From: Aymeric Moizard
Subject: Re: [osip-dev] Some questions about the rport and oSIP
Date: Mon, 21 Jan 2013 12:12:17 +0100

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?)

Regards
Aymeric

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.
 
Regards,
Yonglong

_______________________________________________
osip-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/osip-dev




--
Antisip - http://www.antisip.com

reply via email to

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