[sr-dev] NOTIFY being sent through UDP instead of TCP
Vadim Lebedev
vadim at mbdsys.com
Thu Aug 19 20:05:53 CEST 2010
On 08/19/2010 06:07 PM, Daniel-Constantin Mierla wrote:
>
> SIP allows to register/subscribe via a transport protocol and specify
> to be contacted over a different transport. So you have to put TCP in
> the contact if you want to be contacted via TCP, otherwise is UDP -
> default transport protocol if none is specified.
>
> Cheers,
> Daniel
>
Diniel i think you'll aggree that in NATed environment this behaviour
is not really locgical.
The most logical thing to dis in such case is to use the
'force_send_socket' IMO.
Thanks
Vadim
>>
>>>
>>> Cheers,
>>> Daniel
>>>
>>>
>>> On 8/19/10 5:30 PM, nikita wrote:
>>>> Hello list,
>>>>
>>>> I have some trouble with the presence module, I'm registering and
>>>> subscribing to a presentity through TCP, and kamailio is sending me
>>>> NOTIFY to the correct ip/port, but through UDP.
>>>>
>>>> I have checked in modules_k/presence/notify.c::1578, the value of
>>>> the dialog's proto field is PROTO_TCP. but It's looke like that the
>>>> function modules/tm/uac.c:t_uac_prepare() is trying to guess the
>>>> transport (in ut.h at line 319 the function sip_hostport2su choose
>>>> UDP as transport) instead of using the one present in the dialog.
>>>>
>>>> And as result I'm getting this warning and the NOTIFY through the
>>>> wrong transport: 1(28921) WARNING: <core> [forward.c:248]:
>>>> WARNING: get_send_socket: protocol/port mismatch
>>>>
>>>> It's maybe a foolishness from my part but why can't we just use the
>>>> dialog's transport for the notify request, so it will be the same
>>>> transport as subscribe ?
>>>>
>>>> In forward.c:242, when we find that force_send_socket->proto !=
>>>> guessed_proto, why we don't use the force_send_socket proto ?
>>>>
>>>> What do you think about it ? If someone want to take a closer look,
>>>> I can post a sipp scenario which reproduce this issue.
>>>>
>>>> Thanks by advance,
>>>>
>>>
>>
>
More information about the sr-dev
mailing list