Closed ilyinvv closed 5 years ago
Good day! Please help with NOTIFY now the question is very acute, thanks in advance! The crux of the problem: When using the dialog creation function, NOTIFY does not receive the CALL-ID dialog create dialog installed before INVITE, INVITE dialog packages, 100Tryning, 200 sdp, ACK, BYE, CANCEL, REFER get the dialogue notif no
@ilyinvv , I suppose you are referring to the NOTIFY's for the REFER , like frame 33 ? If so, this NOTIFY is broken (incorrectly generated by .12 party) - that NOTIFY must be in the same dialog as the REFER (so same callid and tags) Looking at the pcap, I assume .12 is an OpenSIPS doing some Topo Hiding with call-id changing ??
Thank you for responding, that's right. IP .12 is the Opensips server and the Notif package really refers to Refer. I use the topology hiding module, and when working with it, the generation of a new cal id does not occur. A new calid id appears when using the dialog module; for the Referrer, a new callid is created for notify in the same dialog no. What needs to be done so that Opensips inserts a dialogue callout into the noifi package?
Notify package generates Asterisk
Scheme of work: UA -> Opensips (hide topology and create dialog enabled) -> Asterisk
REFER в сторону Asterisk
REFER sip:10.227.228.4:5061 SIP/2.0 Via: SIP/2.0/UDP 10.227.228.18:5060;branch=z9hG4bK5e8.2b6ca0e4.0 From: "3136439101" sip:3136439101@sbc2.profintel.ru;tag=726200977 To: sip:103@sbc2.profintel.ru;tag=9c220e7b-da63-44f3-81ad-f75c0ec09383 Call-ID: DLGCH_fkdTW2RwaWB8MFRefXpgfXxCS19icQ-- Contact: <sip:10.227.228.18;did=0b8.524664a5> Max-Forwards: 70 Refer-To: sip:104@sbc2.profintel.ru?Replaces=a35abe95-c7f8-4f2c-9a87-fbfd0a9b4045%3Bto-tag%3D972ce402-95de-4711-a83d-93f8d6d75a42%3Bfrom-tag%3D1972317729 Referred-By: "3136439101" sip:3136439101@sbc2.profintel.ru Event: refer Content-Length: 0 CSeq: 4 REFER
Notify from Asterisk
NOTIFY sip:10.227.228.18:5060;did=0b8.524664a5 SIP/2.0
Via: SIP/2.0/UDP 10.227.228.4:5061;rport;branch=z9hG4bKPj72347fb7-94c4-488a-8078-aebc99014951
From: sip:103@sbc2.profintel.ru;tag=9c220e7b-da63-44f3-81ad-f75c0ec09383
To: "3136439101" sip:3136439101@sbc2.profintel.ru;tag=726200977
Contact:
SIP/2.0 100 Trying
NOTIFY sip:10.227.228.18:5060;did=0b8.524664a5 SIP/2.0
Via: SIP/2.0/UDP 10.227.228.4:5061;rport;branch=z9hG4bKPj7f9b38e7-1a0d-4ba5-bc13-8be1f3ffd6a1
From: sip:103@sbc2.profintel.ru;tag=9c220e7b-da63-44f3-81ad-f75c0ec09383
To: "3136439101" sip:3136439101@sbc2.profintel.ru;tag=726200977
Contact:
SIP/2.0 200 OK
when Notifi passes the package through the open-ended acquisition, he does not receive a new callid
sorry here that log will be more accurate logrefer.log
WARNING:dialog:dlg_onroute: tight matching failed for NOTIFY with callid='DLGCH_fkVdXGJ4ZGB+RiVfY2djY2FDV0BieGg-'/38, ftag='09a196e2-ecfb-4139-a0fb-8078789acb45'/36, ttag='1912511377'/10 and direction=0 Jan 29 14:21:09 node2 /usr/local/sbin/opensips[24]: WARNING:dialog:dlg_onroute: dialog identification elements are callid='1582114316@10.30.32.118'/23, caller tag='1912511377'/10, callee tag='09a196e2-ecfb-4139-a0fb-8078789acb45'/36 Jan 29 14:21:09 node2 /usr/local/sbin/opensips[24]: DBG:dialog:unref_dlg: unref dlg 0x7f817cfd1e60 with 1 -> 5 in entry 0x7f817cf6de98
As far as I understand the callid log does not change due to the non-compliance of the fields with from and to their tags, the reason is clear, but how to get around this?
help if you need more information?
help if you need more information?
I solved the problem so far: Disabled in the function topology_hiding_match key "C" modifying call-id. In my case, this is not important, with the indication "C" the callid in the Notify package does not change - the problem is also relevant for version 2.4.4
In order to be able to create the global variable I need in the dialog, I used the create dialog function before INVITE if (is_method("INVITE")) { create_dialog(); if (has_totag()) { fix_nated_contact(); xlog("lua => Re-INVITE ==> (FUSER=$fu)\n"); lua_exec ("core","Re-INVITE"); .......................................................... When an INVITE arrives, the create dialog function creates an INVITE with a new callid type: Call ID: DLGCH_fkdTXmN4YGp.MFRefXpgfXxCS19icQ-- Dialogue packages, including REFER, contain a new callid, but the NOTIFY request does not receive a new callid when it arrives, and as a result, it does not work as expected. I tried to add create dialog before REFER and NOTIFI but it doesn’t affect in any way. What do I need to do to get a new callid in the existing dialog for the NOTIFY package? Сreate dialog is currently only used in the INVITE code above.