Hello,

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.

In this tshark output...

1 10.1.1.1 -> 10.10.10.10  SIP/SDP Request: INVITE
sip:[email protected];user=phone, with session description
2 10.10.10.10 -> 10.1.1.1 SIP Status: 100 Trying
3 10.10.10.10 -> 10.2.2.2  SIP/SDP Request: INVITE
sip:[email protected];user=phone, with session description
4 10.2.2.2 -> 10.10.10.10  SIP Status: 100 Trying
5 10.2.2.2 -> 10.10.10.10  SIP Status: 503 Service Unavailable
6 10.10.10.10 -> 10.2.2.2  SIP Request: ACK
sip:[email protected];user=phone
------ first carrier rejected call, try second ------
7 10.10.10.10 -> 10.3.3.3 SIP/SDP Request: INVITE
sip:[email protected];user=phone, with session description
8 10.3.3.3 -> 10.10.10.10  SIP Status: 100 Trying
9 10.3.3.3 -> 10.10.10.10  SIP Status: 180 Ringing
10 10.10.10.10 -> 10.1.1.1 SIP Status: 180 Ringing
11 10.3.3.3 -> 10.10.10.10  SIP/SDP Status: 200 OK, with session description
12 10.10.10.10 -> 10.1.1.1 SIP/SDP Status: 200 OK, with session description
13 10.1.1.1 -> 10.10.10.10  SIP Request: ACK sip:[email protected]
14 10.10.10.10 -> 10.3.3.3 SIP Request: ACK sip:[email protected]
------ call in progress, caller hangs up ------
15 10.1.1.1 -> 10.10.10.10  SIP Request: BYE sip:[email protected]
16 10.10.10.10 -> 10.3.3.3 SIP Request: BYE sip:[email protected]
17 10.3.3.3 -> 10.10.10.10  SIP Status: 200 OK
18 10.10.10.10 -> 10.1.1.1 SIP Status: 200 OK

...only packets 1 and 15 are captured to the database.

Some portions of the config:

loadmodule "dialog.so"
modparam("dialog", "enable_stats", 1)
modparam("dialog", "dlg_flag", 4)
modparam("dialog", "default_timeout", 21600)
modparam("dialog", "bye_on_timeout_flag", 4)
modparam("dialog", "dlg_extra_hdrs", "Hint: dialog expired\r\n")
modparam("dialog", "dlg_match_mode", 1)  # 0 = DID_ONLY; 1 = DID first, SIP
second
modparam("dialog", "db_url", "mysql://user:p...@localhost/database")
modparam("dialog", "db_mode", 1)
modparam("dialog", "db_update_period", 60)
modparam("dialog", "profiles_with_value", "inbound ; outbound")

loadmodule "siptrace.so"
modparam("siptrace", "db_url", "mysql://user:[email protected]/database")
modparam("siptrace", "trace_on", 1)
modparam("siptrace", "enable_ack_trace", 1)

And then in route[0]:

if (is_method("INVITE")) {
        setflag(4);     # Dialog, and BYE on expiration
        if (create_dialog()){
                xlog("L_INFO", "Initial dialog successfully created\n");
                trace_dialog();
        }
        route(1);    # Process invite
}

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.

I¹m not sure where to go from here.  Any thoughts or hints?


Thanks,
Jeff

_______________________________________________
Users mailing list
[email protected]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to