<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 -> 10.10.10.10 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 -> 10.1.1.1 SIP Status: 100 Trying<BR>
3 10.10.10.10 -> 10.2.2.2 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 -> 10.10.10.10 SIP Status: 100 Trying<BR>
5 10.2.2.2 -> 10.10.10.10 SIP Status: 503 Service Unavailable<BR>
6 10.10.10.10 -> 10.2.2.2 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 -> 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 -> 10.10.10.10 SIP Status: 100 Trying<BR>
9 10.3.3.3 -> 10.10.10.10 SIP Status: 180 Ringing<BR>
10 10.10.10.10 -> 10.1.1.1 SIP Status: 180 Ringing<BR>
11 10.3.3.3 -> 10.10.10.10 SIP/SDP Status: 200 OK, with session description<BR>
12 10.10.10.10 -> 10.1.1.1 SIP/SDP Status: 200 OK, with session description<BR>
13 10.1.1.1 -> 10.10.10.10 SIP Request: ACK sip:<a href="9998887777@10.3.3.3">9998887777@10.3.3.3</a><BR>
14 10.10.10.10 -> 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 -> 10.10.10.10 SIP Request: BYE sip:<a href="9998887777@10.3.3.3">9998887777@10.3.3.3</a><BR>
16 10.10.10.10 -> 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 -> 10.10.10.10 SIP Status: 200 OK<BR>
18 10.10.10.10 -> 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 "dialog.so"<BR>
modparam("dialog", "enable_stats", 1)<BR>
modparam("dialog", "dlg_flag", 4)<BR>
modparam("dialog", "default_timeout", 21600)<BR>
modparam("dialog", "bye_on_timeout_flag", 4)<BR>
modparam("dialog", "dlg_extra_hdrs", "Hint: dialog expired\r\n")<BR>
modparam("dialog", "dlg_match_mode", 1) # 0 = DID_ONLY; 1 = DID first, SIP second<BR>
modparam("dialog", "db_url", "mysql://user:pass@localhost/database")<BR>
modparam("dialog", "db_mode", 1)<BR>
modparam("dialog", "db_update_period", 60)<BR>
modparam("dialog", "profiles_with_value", "inbound ; outbound")<BR>
<BR>
loadmodule "siptrace.so"<BR>
modparam("siptrace", "db_url", "mysql://user:<a href="pass@ww.xx.yy.zz/database"">pass@ww.xx.yy.zz/database"</a>)<BR>
modparam("siptrace", "trace_on", 1)<BR>
modparam("siptrace", "enable_ack_trace", 1)<BR>
<BR>
And then in route[0]:<BR>
<BR>
if (is_method("INVITE")) {<BR>
setflag(4); # Dialog, and BYE on expiration<BR>
if (create_dialog()){<BR>
xlog("L_INFO", "Initial dialog successfully created\n");<BR>
trace_dialog();<BR>
}<BR>
route(1); # 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. For what it’s worth, the dialogs seem to be working properly, with the exception of the ACK-before-200-processed known issue.<BR>
<BR>
I’m not sure where to go from here. Any thoughts or hints?<BR>
<BR>
<BR>
Thanks,<BR>
Jeff<BR>
</SPAN></FONT>
</BODY>
</HTML>