<HTML>
<HEAD>
<TITLE>trace_dialog() is missing things</TITLE>
</HEAD>
<BODY>
<FONT FACE="Tahoma, Verdana, Helvetica, Arial"><SPAN STYLE='font-size:10pt'>Hello,<BR>
<BR>
In the example below, 10.1.1.1 is the caller, 10.10.10.10 is Opensips, 10.2.2.2 is the first PSTN carrier that rejects the call, and 10.3.3.3 is the second PSTN carrier that accepts the call.<BR>
<BR>
In this tshark output...<BR>
<BR>
1 10.1.1.1 -&gt; 10.10.10.10 &nbsp;SIP/SDP Request: INVITE sip:<a href="19998887777@10.10.10.10">19998887777@10.10.10.10</a>;user=phone, with session description<BR>
2 10.10.10.10 -&gt; 10.1.1.1 SIP Status: 100 Trying<BR>
3 10.10.10.10 -&gt; 10.2.2.2 &nbsp;SIP/SDP Request: INVITE sip:<a href="9998887777@10.2.2.2">9998887777@10.2.2.2</a>;user=phone, with session description<BR>
4 10.2.2.2 -&gt; 10.10.10.10 &nbsp;SIP Status: 100 Trying<BR>
5 10.2.2.2 -&gt; 10.10.10.10 &nbsp;SIP Status: 503 Service Unavailable<BR>
6 10.10.10.10 -&gt; 10.2.2.2 &nbsp;SIP Request: ACK sip:<a href="9998887777@10.2.2.2">9998887777@10.2.2.2</a>;user=phone<BR>
------ first carrier rejected call, try second ------<BR>
7 10.10.10.10 -&gt; 10.3.3.3 SIP/SDP Request: INVITE sip:<a href="9998887777@10.3.3.3">9998887777@10.3.3.3</a>;user=phone, with session description<BR>
8 10.3.3.3 -&gt; 10.10.10.10 &nbsp;SIP Status: 100 Trying<BR>
9 10.3.3.3 -&gt; 10.10.10.10 &nbsp;SIP Status: 180 Ringing<BR>
10 10.10.10.10 -&gt; 10.1.1.1 SIP Status: 180 Ringing<BR>
11 10.3.3.3 -&gt; 10.10.10.10 &nbsp;SIP/SDP Status: 200 OK, with session description<BR>
12 10.10.10.10 -&gt; 10.1.1.1 SIP/SDP Status: 200 OK, with session description<BR>
13 10.1.1.1 -&gt; 10.10.10.10 &nbsp;SIP Request: ACK sip:<a href="9998887777@10.3.3.3">9998887777@10.3.3.3</a><BR>
14 10.10.10.10 -&gt; 10.3.3.3 SIP Request: ACK sip:<a href="9998887777@10.3.3.3">9998887777@10.3.3.3</a><BR>
------ call in progress, caller hangs up ------<BR>
15 10.1.1.1 -&gt; 10.10.10.10 &nbsp;SIP Request: BYE sip:<a href="9998887777@10.3.3.3">9998887777@10.3.3.3</a><BR>
16 10.10.10.10 -&gt; 10.3.3.3 SIP Request: BYE sip:<a href="9998887777@10.3.3.3">9998887777@10.3.3.3</a><BR>
17 10.3.3.3 -&gt; 10.10.10.10 &nbsp;SIP Status: 200 OK<BR>
18 10.10.10.10 -&gt; 10.1.1.1 SIP Status: 200 OK<BR>
<BR>
...only packets 1 and 15 are captured to the database.<BR>
<BR>
Some portions of the config:<BR>
<BR>
loadmodule &quot;dialog.so&quot;<BR>
modparam(&quot;dialog&quot;, &quot;enable_stats&quot;, 1)<BR>
modparam(&quot;dialog&quot;, &quot;dlg_flag&quot;, 4)<BR>
modparam(&quot;dialog&quot;, &quot;default_timeout&quot;, 21600)<BR>
modparam(&quot;dialog&quot;, &quot;bye_on_timeout_flag&quot;, 4)<BR>
modparam(&quot;dialog&quot;, &quot;dlg_extra_hdrs&quot;, &quot;Hint: dialog expired\r\n&quot;)<BR>
modparam(&quot;dialog&quot;, &quot;dlg_match_mode&quot;, 1) &nbsp;# 0 = DID_ONLY; 1 = DID first, SIP second<BR>
modparam(&quot;dialog&quot;, &quot;db_url&quot;, &quot;mysql://user:pass@localhost/database&quot;)<BR>
modparam(&quot;dialog&quot;, &quot;db_mode&quot;, 1)<BR>
modparam(&quot;dialog&quot;, &quot;db_update_period&quot;, 60)<BR>
modparam(&quot;dialog&quot;, &quot;profiles_with_value&quot;, &quot;inbound ; outbound&quot;)<BR>
<BR>
loadmodule &quot;siptrace.so&quot;<BR>
modparam(&quot;siptrace&quot;, &quot;db_url&quot;, &quot;mysql://user:<a href="pass@ww.xx.yy.zz/database&quot;">pass@ww.xx.yy.zz/database&quot;</a>)<BR>
modparam(&quot;siptrace&quot;, &quot;trace_on&quot;, 1)<BR>
modparam(&quot;siptrace&quot;, &quot;enable_ack_trace&quot;, 1)<BR>
<BR>
And then in route[0]:<BR>
<BR>
if (is_method(&quot;INVITE&quot;)) {<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;setflag(4); &nbsp;&nbsp;&nbsp;&nbsp;# Dialog, and BYE on expiration<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if (create_dialog()){<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;xlog(&quot;L_INFO&quot;, &quot;Initial dialog successfully created\n&quot;);<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace_dialog();<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;route(1); &nbsp;&nbsp;&nbsp;# Process invite<BR>
}<BR>
<BR>
In following advice Bogdan gave a month or two back, since I am using dialog-based tracing, I am not setting the flag. &nbsp;For what it&#8217;s worth, the dialogs seem to be working properly, with the exception of the ACK-before-200-processed known issue.<BR>
<BR>
I&#8217;m not sure where to go from here. &nbsp;Any thoughts or hints?<BR>
<BR>
<BR>
Thanks,<BR>
Jeff<BR>
</SPAN></FONT>
</BODY>
</HTML>