[SR-Users] presentce handly_subscribe() protocol/port mismatch to WS endpoint

Yuriy Gorlichenko ovoshlook at gmail.com
Wed Oct 4 13:55:39 CEST 2017


Already tried yesterday evening. Same result with $du

On Oct 4, 2017 14:35, "Daniel-Constantin Mierla" <miconda at gmail.com> wrote:

> Can you print $du there and see if it set? looks like it is not routed by
> r-uri, but dst uri.
>
> Cheers,
> Daniel
>
> On 03.10.17 22:58, Yuriy Gorlichenko wrote:
>
> Found that at the tm:local-request $ru modifies but anyway - request sent
> to old RURI.
>  INFO: NOTIFY to WS, update RURI
>
> -- here is making
> $ru = $ru+";transport=ws";
> ---
>
>  INFO: NOTIFY to WS, new RURI: sip:94e51c30bdf28de52519 at 93.
> 81.99.68:54733;gr=urn:uuid:88b3033f-e65d-4694-ac45-
> 2a1d1a44501c;transport=ws
>
> --- for now $ru is updated
>
> -- but here also same result:
>
>  INFO: presence [notify.c:1619]: send_notify_request(): NOTIFY
> sip:94e51c30Bdf28de52519 at d0c20d13-e5b4-4649-821e-9ab8ec94b141 via
> sip:94e51c30bdf28de52519 at 93.81.99.68:54733;gr=urn:uuid:
> 88b3033f-e65d-4694-ac45-2a1d1a44501c on behalf of
> sip:8dc08f881f2105dD3d75 at d0c20d13-e5b4-4649-821e-9ab8ec94b141 for event
> presence : 3biad4n635ugovv7vmjv
>
>
> 2017-10-03 21:31 GMT+03:00 Yuriy Gorlichenko <ovoshlook at gmail.com>:
>
>> Can not find any entry of this device at the active watchers.
>> Suppose after module found sockets mistmatch and didnt got NOTIFY
>> response it removes entry from active watchers...
>>
>> I added handling at the event route as you sugested and tried to do next
>>
>> Firs i tried fix $ru here but it does not work
>> Also tried to force socket but same
>>
>>
>> I see at the logs that first kamailio says about proto mistmatch and only
>> then calling  event_route[tm:local-request]...
>>
>> This is my log with most important variables for understanding
>>
>>   INFO: <script>: ---------------------------------------
>>   INFO: <script>: #012SUBSCRIBE | source: 93.81.99.68:57031,
>>   INFO: <script>: #012SUBSCRIBE | proto: wss,
>>   INFO: <script>: #012SUBSCRIBE | RURI: sip:8dc08f881f2105dD3d75 at d0c20
>> d13-e5b4-4649-821e-9ab8ec94b141,
>>   INFO: <script>: #012SUBSCRIBE | contact: <sip:94e51c30bdf28de52519 at d0c2
>> 0d13-e5b4-4649-821e-9ab8ec94b141;gr=urn:uuid:14f23c6c-166f-
>> 4649-9b7e-71a66b20450f>
>>   INFO: <script>: #012SUBSCRIBE | from : 94e51c30Bdf28de52519
>>   INFO: <script>: #012SUBSCRIBE | to : 8dc08f881f2105dD3d75
>>   INFO: <script>: ---------------------------------------
>>   INFO: <script>: SUBSCRIBE : fixing nated contact
>>   INFO: <script>: SUBSCRIBE from WSS proto
>>
>> ----- Here is handle_subscribe happens
>>
>>   WARNING: <core> [core/forward.c:231]: get_send_socket2(): protocol/port
>> mismatch (forced tls:172.31.13.191:7443, to udp:93.81.99.68:57031)
>>
>> ----  event_route[tm:local-request]
>>
>>   INFO: <script>: ---------------------------------------
>>   INFO: <script>: #012NOTIFY | source: 172.31.13.191:5060,
>>   INFO: <script>: #012NOTIFY | proto: udp,
>>   INFO: <script>: #012NOTIFY | RURI: sip:94e51c30bdf28de52519 at 93.81
>> .99.68:57031;gr=urn:uuid:14f23c6c-166f-4649-9b7e-71a66b20450f,
>>   INFO: <script>: #012NOTIFY | contact: <sip:34.192.121.47:5060;transp
>> ort=tls>
>>   INFO: <script>: #012NOTIFY | from : 8dc08f881f2105dD3d75
>>   INFO: <script>: #012NOTIFY | to : 94e51c30Bdf28de52519
>>   INFO: <script>: ---------------------------------------
>>   INFO: <script>: NOTIFY to WS, forsing socket to TLS
>>
>> ---- here is i trying to fix $ru and $fs
>>
>>   INFO: presence [notify.c:1619]: send_notify_request(): NOTIFY
>> sip:94e51c30Bdf28de52519 at d0c20d13-e5b4-4649-821e-9ab8ec94b141 via
>> sip:94e51c30bdf28de52519 at 93.81.99.68:57031;gr=urn:uuid:14f23
>> c6c-166f-4649-9b7e-71a66b20450f on behalf of sip:8dc08f881f2105dD3d75@
>> d0c20d13-e5b4-4649-821e-9ab8ec94b141 for event presence :
>> 8n0erm4mtff6pn9ljgdq
>>
>>
>>
>>
>> 2017-10-03 18:43 GMT+03:00 Daniel-Constantin Mierla <miconda at gmail.com>:
>>
>>> Hello,
>>>
>>> you should use set_contact_alias() for subscribe instead of
>>> fixed_nated_contact(), is a better option.
>>>
>>> Back to the reported topic, can you paste here the db record from
>>> active_watchers table?
>>>
>>> Then, you should be able to update some parts of the local generated
>>> requests by having an event_route[tm:local-request] block in your
>>> kamailio.cfg.
>>>
>>> Cheers,
>>> Daniel
>>>
>>> On 03.10.17 10:44, Yuriy Gorlichenko wrote:
>>>
>>> Also found at the lists some solutions like "accept fix_nated_register()
>>> and fix_nated_contact() for REGISTER and SUBSCRIBE"
>>>
>>> Done it. But still protos mistmatch...
>>>
>>> kamailio founds tls:myip:myport and forces t to udp...
>>>
>>> 2017-10-03 10:49 GMT+03:00 Yuriy Gorlichenko <ovoshlook at gmail.com>:
>>>
>>>> Hi. I have presence server and it works fine for UDP/TCP/TLS endpoints.
>>>> For now i have new one type of endpoints that runs via WebSockets
>>>>
>>>> It sends SUBSCRIBE request to the and then after handle_subscribe()
>>>> NOTIFY not comes to the subscriber because of
>>>> [core/forward.c:231]: get_send_socket2(): protocol/port mismatch
>>>>
>>>> I already had some issues regarding this for ACK for example but i
>>>> resolved it cimply doing
>>>>
>>>> $ru = $ru+";transport=wss"
>>>>
>>>> but NOTIFY sending is internal process and can't be controlled by
>>>> config file. So i can not change $ru for NOTIFY directly.
>>>>
>>>> Any ideas how to fix this?
>>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Kamailio (SER) - Users Mailing Listsr-users at lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>>>
>>>
>>> --
>>> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
>>> Kamailio Advanced Training - www.asipto.com
>>> Kamailio World Conference - www.kamailioworld.com
>>>
>>>
>>
>
> --
> Daniel-Constantin Mierlawww.twitter.com/miconda -- www.linkedin.com/in/miconda
> Kamailio Advanced Training - www.asipto.com
> Kamailio World Conference - www.kamailioworld.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20171004/bd30debc/attachment.html>


More information about the sr-users mailing list