[SR-Users] Kamailio sends SIP messages to old websocket after reconnection during call
Idris AVCI
idris.avci at gmail.com
Tue May 22 13:47:08 CEST 2018
Hi Daniel,
Yes we do lookup(location) for the BYE message.
We traced down the way BYE message flows and tried all possible route
blocks for lookup(location) but nothing changed.
When we check the AOR for the user after websocket reconnection we see the
new valid connection only but lookup(location) does not update the dialog
to use that one, still tries to send to old socket.
Here is the debug log:
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=444 a=24 n=sip_trace
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=445 a=39 n=setflag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=448 a=5 n=route
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=627 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=621 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=626 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=621 a=24 n=pike_check_req
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=633 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=638 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=633 a=25 n=mf_process_maxfwd_header
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=643 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=638 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=647 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[REQINIT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=643 a=26 n=sanity_check
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=451 a=5 n=route
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=852 a=55 n=force_rport
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=863 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=853 a=25 n=nat_uac_test
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=859 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=854 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=858 a=24 n=set_contact_alias
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=860 a=39 n=setflag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[NATDETECT] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=863 a=2 n=return
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=462 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=454 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DEFAULT_ROUTE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=462 a=5 n=route
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=654 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=651 a=24 n=has_totag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=672 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=654 a=24 n=loose_route
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=655 a=5 n=route
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DLGURI] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=924 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DLGURI] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=920 a=24 n=isdsturiset
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DLGURI] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=921 a=24 n=handle_ruri_alias
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[DLGURI] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=924 a=2 n=return
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=668 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=656 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=657 a=39 n=setflag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=658 a=39 n=setflag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[WITHINDLG] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=668 a=5 n=route
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=589 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=586 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=588 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=587 a=25 n=t_is_set
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=587 a=25 n=t_on_branch
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=592 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=589 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=597 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=592 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=602 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=597 a=25 n=is_method
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=598 a=39 n=setflag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=599 a=24 n=dlg_manage
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=605 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=602 a=24 n=t_relay
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[MANAGE_BRANCH] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=1021 a=25 n=xdbg
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[MANAGE_BRANCH] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=1022 a=5 n=route
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=896 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=886 a=24 n=is_request
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=892 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=887 a=24 n=has_totag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=891 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=888 a=25 n=check_route_param
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=889 a=25 n=setbflag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=900 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=896 a=41 n=isflagset
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=907 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=900 a=24 n=is_request
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=906 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=901 a=24 n=has_totag
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=914 a=16 n=if
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=907 a=24 n=is_reply
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:branch_route=[NATMANAGE] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=914 a=2 n=return
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: WARNING:
<core> [msg_translator.c:2761]: via_builder(): TCP/TLS connection (id: 0)
for WebSocket could not be found
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: ERROR:
<core> [msg_translator.c:1979]: build_req_buf_from_sip_req(): could not
create Via header
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: ERROR: tm
[t_fwd.c:462]: prepare_new_uac(): could not build request
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: ERROR: tm
[t_fwd.c:1723]: t_forward_nonack(): ERROR: t_forward_nonack: failure to add
branches
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=603 a=24 n=sl_reply_error
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: ERROR: sl
[sl_funcs.c:363]: sl_reply_error(): ERROR: sl_reply_error used: No error
(2/SL)
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: exec: ***
cfgtrace:request_route=[RELAY] c=[/usr/local/etc/kamailio/kamailio.cfg]
l=605 a=2 n=exit
May 18 14:01:47 registrar-kenan /usr/local/sbin/kamailio[27976]: NOTICE:
acc [acc.c:317]: acc_log_request(): ACC: transaction answered:
timestamp=1526652107;method=BYE;from_tag=as1cce13f8;to_
tag=fl4kaj6oin;call_id=9f4p1pp6a6d55r6tf663;code=500;reason=Server Internal
Error;src_user=05392111479;src_domain=registrarkenan.alo-tech.com
;src_ip=192.158.28.164;dst_ouser=114408;dst_user=ipkkm7vs;dst_domain=
ujmd89iahcfm.invalid
Thanks.
Idris
On Fri, May 18, 2018 at 3:55 PM, Daniel-Constantin Mierla <miconda at gmail.com
> wrote:
> Hello,
>
> are you doing lookup(location) for the BYE that is attempted to be routed
> on the old connection?
>
> Cheers,
> Daniel
>
> On 17.05.18 17:45, Idris AVCI wrote:
>
> Hi,
>
> We use kamailio as a backend for JSSIP based WebRTC UAs.
> We use SIP over Weboscket as transport and everythings work fine generally.
>
> Some websocket connections to kamailio drop during an active call and
> JSSIP reconnects immediately. New websocket connection has a different port
> than the dropped one but kamailio tries to send to old websocket port which
> is not active anymore.
>
> We use GRUU and configured all the related parameters in registrar,
> dialog, tm, websocket, tls, xhttp and userloc modules both for versions 4.4
> and 5.1 but couldn't find a solution yet.
>
> For a typical call below are the ordered events:
>
> 1. UA register to kamailio over wss (Code: WS1)
> 2. Kamailio send an INVITE to the UA (Code: Call1)
> 3. UA answer and media starts
> 4. UA drops WS1 to kamailio and reconnect (Code: WS2)
> 5. UA has an active websocket (WS2) to kamailio
> 6. Kamailio tries to send BYE message of Call1 to WS1 which is no longer
> active and complains that websocket could not be found
> 7. Kamailio send an INVTE to the UA (Code: Call2) over WS2
> 8. UA answer and media starts
> 9. Kamailio send BYE message of Call2 to UA over WS2 and everything work
> as expected (No websocket drop)
>
> Error log:
>
> WARNING: <core> [msg_translator.c:2761]: via_builder(): TCP/TLS connection
> (id: 0) for WebSocket could not be found
>
> I think we need a mechanism that will update the dialog information of
> Call1 to use WS2 after reconnection.
>
> Any help greatly appreciated.
>
> Thanks.
>
>
> _______________________________________________
> 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 World Conference - May 14-16, 2018 - www.kamailioworld.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-users/attachments/20180522/61ba2086/attachment.html>
More information about the sr-users
mailing list