<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Henning/Karsten,<div class=""><br class=""></div><div class="">Thanks so much for your feedback.<br class=""><div class="">
<div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;"><br class="">@Henning - you’re right, I’ve misunderstood the purpose of cseq_diff. Thanks for pointing that out, I’ve removed that reference!</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;"><br class=""></div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;">I’ve done a debug and privatised a few values (IPs, phone numbers, passwords, etc):</div><div style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; -webkit-text-stroke-width: 0px; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;"><a href="https://0bin.net/paste/yjXiQF4-IO7HSRvE#xdrfRXGjGG0TOA6VYV0iy49IuOSUFuMghz7cyUK1fhO" class="">https://0bin.net/paste/yjXiQF4-IO7HSRvE#xdrfRXGjGG0TOA6VYV0iy49IuOSUFuMghz7cyUK1fhO</a></div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">Flow of the call:</div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">A (Originating client) -> B (Kamailio) -> C (Provider)</div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">5.6.7.8: <span class="Apple-tab-span" style="white-space:pre">                                       </span>A</div><div style="text-align: start; text-indent: 0px;">1.2.3.4:<span class="Apple-tab-span" style="white-space:pre">                     </span> <span class="Apple-tab-span" style="white-space:pre">           </span>B (Public IP, advertise)</div><div style="text-align: start; text-indent: 0px;">10.0.1.2:<span class="Apple-tab-span" style="white-space:pre">                                     </span>B (Private IP)</div><div style="text-align: start; text-indent: 0px;">0400123123: <span class="Apple-tab-span" style="white-space:pre">                            </span>Phone number being dialed</div><div style="text-align: start; text-indent: 0px;">siptrunk.provider.local:<span class="Apple-tab-span" style="white-space:pre">             </span>C</div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">I don’t understand the dialog module well, however it appears the auth header is created around line 456. </div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">The lines below that read as follows:</div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;"><div><div><div><font face="Courier New" size="1" class="">DEBUG: {1 102 INVITE <a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060} dialog [dlg_cseq.c:59]: dlg_cseq_prepare_msg(): prepare msg for cseq update operations</font></div><div><font face="Courier New" size="1" class="">DEBUG: {1 102 INVITE <a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060} dialog [dlg_cseq.c:145]: dlg_cseq_update(): initiating cseq updates</font></div><div><font face="Courier New" size="1" class="">DEBUG: {1 102 INVITE <a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060} dialog [dlg_hash.c:778]: internal_get_dlg(): no dialog <a href="mailto:callid='504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">callid='504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060' found</font></div><div><font face="Courier New" size="1" class="">DEBUG: {1 102 INVITE <a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060} dialog [dlg_hash.c:813]: get_dlg(): no dialog <a href="mailto:callid='504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">callid='504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060' found</font></div><div><font face="Courier New" size="1" class="">DEBUG: {1 102 INVITE <a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060} dialog [dlg_handlers.c:1224]: dlg_lookup_msg_dialog(): dlg with callid '<a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060' not found</font></div><div><font face="Courier New" size="1" class="">DEBUG: {1 102 INVITE <a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060} dialog [dlg_cseq.c:151]: dlg_cseq_update(): no dialog for this request</font></div></div></div></div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">This reads to me like the dialog wasn’t tracked, and as it can’t find it, it isn’t incrementing it. Is that correct?</div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">The first reference I can see to dialog is on line 135, which is quite similar:</div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;"><font face="Courier New" size="1" class="">DEBUG: {1 102 INVITE <a href="mailto:504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060} dialog [dlg_hash.c:778]: internal_get_dlg(): no dialog <a href="mailto:callid='504966da0d624fd85a04e68a62c945f5@5.6.7.8" class="">callid='504966da0d624fd85a04e68a62c945f5@5.6.7.8</a>:5060’ found</font></div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;">This makes me thing that the dialog isn’t being created in the first place. However I have the dlg_flag enabled in kamailio.cfg:</div><div style="text-align: start; text-indent: 0px;"><br class=""></div><div style="text-align: start; text-indent: 0px;"><div style="color: rgb(212, 212, 212); background-color: rgb(30, 30, 30); font-family: Menlo, Monaco, "Courier New", monospace; line-height: 18px; white-space: pre;" class=""><div class="">modparam(<span style="color: #ce9178;" class="">"dialog"</span>, <span style="color: #ce9178;" class="">"dlg_flag"</span>, 4)</div><div class="">modparam(<span style="color: #ce9178;" class="">"dialog"</span>, <span style="color: #ce9178;" class="">"track_cseq_updates"</span>, 1)</div><div class="">modparam(<span style="color: #ce9178;" class="">"dialog"</span>, <span style="color: #ce9178;" class="">"event_callback"</span>, <span style="color: #ce9178;" class="">"ksr_dialog_event"</span>)</div><div class=""></div></div></div><div style="text-align: start; text-indent: 0px;"><br class=""></div></div></div>
</div>
<div><br class=""></div><div>I’ve had a good read through the dialog module docs, and it appears setting the dlg_flag should enable dialog creation during the initial request. Have I missed setting something here?</div><div><br class=""></div><div>Thanks!</div><div><br class=""></div><div>Andrew</div><div><br class=""><blockquote type="cite" class=""><div class="">On 28 Apr 2019, at 10:29 am, Henning Westerholt <<a href="mailto:hw@skalatan.de" class="">hw@skalatan.de</a>> wrote:</div><br class="Apple-interchange-newline"><div class="">

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" class="">

<div bgcolor="#FFFFFF" text="#000000" class=""><p class="">Hello,</p><p class="">why do you set the variable cseq_diff to 1? From the module README:</p><p class="">"The CSeq difference is stored in $dlg_var(cseq_diff), be sure this variable is not overwritten via config operation."</p><p class="">A suggestion would be to test this with DBG log level, so see if the dialog module is logging something related to the CSEQ update code path. There is some log output that should be visible.<br class="">
</p><p class="">Cheers,</p><p class="">Henning</p>
<div class="moz-cite-prefix">Am 27.04.19 um 18:27 schrieb Karsten Horsmann:<br class="">
</div>
<blockquote type="cite" cite="mid:CAFArqsZEBvNLx3J+YshtP0ok_5CVT4GrtmRs2vozFw_mSMxbhw@mail.gmail.com" class="">
<div dir="auto" class="">
<div class="">Hi,
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class="">AFAIK the uac module don't support cseq autoupdate.</div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class="">CSeq is not increased automatically by uac_auth() during authentication - the follow up request may be rejected. CSeq can be increased when authenticating INVITE requests - dialog module has to be used, with CSeq tracking feature enabled (see
 the readme of dialog module).</div>
<div dir="auto" class=""><br class="">
</div>
<div dir="auto" class="">Hmm are you sure that the dialog module is taking care of your second INVITE? </div>
<br class="">
Kind regards </div>
<div dir="auto" class="">Karsten </div>
<div dir="auto" class=""><br class="">
<div class="gmail_quote" dir="auto">
<div dir="ltr" class="gmail_attr">Andrew White <<a href="mailto:andrew@uconnected.com.au" moz-do-not-send="true" class="">andrew@uconnected.com.au</a>> schrieb am Fr., 26. Apr. 2019, 19:15:<br class="">
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
              .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word;line-break:after-white-space" class="">Hi all,
<div class=""><br class="">
</div>
<div class="">I’m still building with app_ruby and loving it - for the most part!</div>
<div class=""><br class="">
</div>
<div class="">I’m having an issue with one of my providers responding with a 482 on auth invite. Researching, it appears that my CSeq isn’t incrementing and this is the reason for the issue.</div>
<div class=""><br class="">
</div>
<div class="">I already have the relevant flag set in my kamailio.cfg however:</div>
<div class=""><br class="">
</div>
<div class="">modparam("dialog", "track_cseq_updates", 1) </div>
<div class=""><br class="">
</div>
<div class="">During my uac_auth, I’ve tried manually setting the diff, as well as running msg_iflag_reset (as suggested by Daniel -
<a href="https://github.com/kamailio/kamailio/issues/1359" target="_blank" rel="noreferrer" moz-do-not-send="true" class="">
https://github.com/kamailio/kamailio/issues/1359</a> - unfortunately the function isn’t exported in KEMI):</div>
<div class=""><br class="">
</div>
<div class="">
<div style="color:rgb(212,212,212);background-color:rgb(30,30,30);font-family:Menlo,Monaco,"Courier New",monospace;line-height:18px;white-space:pre-wrap" class="">
<div class=""><span style="color:#c586c0" class="">if</span> <span style="color:#4ec9b0" class="">KSR</span>::<span style="color:#4ec9b0" class="">UAC</span>.uac_auth()
<span style="color:#c586c0" class="">then</span></div>
<div class=""><span style="color:#4ec9b0" class="">KSR</span>.info(<span style="color:#ce9178" class="">"UAC authed, relaying"</span>)</div>
<div class=""><span style="color:#6a9955" class="">#KSR::COREX.msg_iflag_reset("UAC_AUTH")</span></div>
<div class=""><span style="color:#4ec9b0" class="">KSR</span>::<span style="color:#4ec9b0" class="">PV</span>.sets(<span style="color:#ce9178" class="">"$dlg_var(cseq_diff)"</span>,
<span style="color:#ce9178" class="">"1"</span>)</div>
<div class=""><span style="color:#4ec9b0" class="">KSR</span>.info(<span style="color:#ce9178" class="">"CSeq diff:
</span><span style="color:#569cd6" class="">#{</span><span style="color:#4ec9b0" class="">KSR</span>::<span style="color:#4ec9b0" class="">PV</span>.gete(<span style="color:#ce9178" class="">"$dlg_var(cseq_diff)"</span>)<span style="color:#569cd6" class="">}</span><span style="color:#ce9178" class="">"</span>)</div>
<div class=""><span style="color:rgb(78,201,176)" class="">KSR</span>::<span style="color:rgb(78,201,176)" class="">TM</span>.t_relay()</div>
</div>
<div class="">
<div dir="auto" style="text-align:start;text-indent:0px;word-wrap:break-word;line-break:after-white-space" class="">
<div dir="auto" style="word-wrap:break-word;line-break:after-white-space" class="">
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
<br class="">
</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
Unfortunately in both cases the actual CSeq doesn’t increment in the second INVITE:</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
<br class="">
</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
INVITE 1 (unauthenticated):</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
 > CSeq: 102 INVITE</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
<br class="">
</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
INVITE 2 (with Authorization header):</div>
<div style="text-align:start;text-indent:0px" class="">> CSeq: 102 INVITE</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
<br class="">
</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
I’m unsure if I’ve missed something silly around the track_cseq_updates flag, or if app_ruby somehow isn’t interacting with the dialog module when running uac_auth to trigger the increment?</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
<br class="">
</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
Thanks!</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
<br class="">
Kind regards,</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
<br class="">
</div>
<div style="letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; text-decoration: none; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; text-align: start; text-indent: 0px;" class="">
Andrew</div>
</div>
</div>
</div>
</div>
</div>
_______________________________________________<br class="">
Kamailio (SER) - Users Mailing List<br class="">
<a href="mailto:sr-users@lists.kamailio.org" target="_blank" rel="noreferrer" moz-do-not-send="true" class="">sr-users@lists.kamailio.org</a><br class="">
<a href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users" rel="noreferrer noreferrer" target="_blank" moz-do-not-send="true" class="">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a><br class="">
</blockquote>
</div>
</div>
</div>
<br class="">
<fieldset class="mimeAttachmentHeader"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
Kamailio (SER) - Users Mailing List
<a class="moz-txt-link-abbreviated" href="mailto:sr-users@lists.kamailio.org">sr-users@lists.kamailio.org</a>
<a class="moz-txt-link-freetext" href="https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users">https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users</a>
</pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Henning Westerholt - <a class="moz-txt-link-freetext" href="https://skalatan.de/blog/">https://skalatan.de/blog/</a>
Kamailio services - <a class="moz-txt-link-freetext" href="https://skalatan.de/services">https://skalatan.de/services</a></pre>
</div>

</div></blockquote></div><br class=""></div></body></html>