Module: kamailio
Branch: 5.2
Commit: 91436c9fc402f2038467a18ffa0aa00d1ade12a6
URL: https://github.com/kamailio/kamailio/commit/91436c9fc402f2038467a18ffa0aa00…
Author: Peter Friedrich <peter.friedrich(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-30T19:09:26+02:00
ims_dialog: bugfix for registering dialog callbacks
- bugfix for registering dialog callbacks
- in Rx scenarios of parallel forking (several INVITEs with same CALLID
and FROMTAG sent to PCSCF) and INVITE for orig and term handled in
same PCSCF (means also INVITEs with identical CALLID and FROMTAG) the wrong
dialog is selected for registering the callback (i.e. the callback
for sending STR) when 200OK from terminator is processed.
- Root cause is that dialog is searched with callid-fromtag-totag but at
the time of dialog insertion (processing of INVITE) no totag is available.
- fix is to get ctx dialog at 200OK processing before suspending the
transaction - save dialog until AAA is received - use this dialog for
registering the STR callback.
(cherry picked from commit e2a1b967fd6e2cc92dc1447e1c033f6124aca446)
---
Modified: src/modules/ims_dialog/dlg_cb.c
Modified: src/modules/ims_dialog/dlg_cb.h
Modified: src/modules/ims_dialog/dlg_handlers.c
---
Diff: https://github.com/kamailio/kamailio/commit/91436c9fc402f2038467a18ffa0aa00…
Patch: https://github.com/kamailio/kamailio/commit/91436c9fc402f2038467a18ffa0aa00…
---
diff --git a/src/modules/ims_dialog/dlg_cb.c b/src/modules/ims_dialog/dlg_cb.c
index 1b7caa21ce..d4d0ee356c 100644
--- a/src/modules/ims_dialog/dlg_cb.c
+++ b/src/modules/ims_dialog/dlg_cb.c
@@ -100,15 +100,10 @@ void destroy_dlg_callbacks(unsigned int types)
}
}
-int register_dlgcb_nodlg(str *callid, str *ftag, str *ttag,
- int types, dialog_cb f,
+
+int register_dlgcb_nodlg(struct dlg_cell *dlg, int types, dialog_cb f,
void *param, param_free_cb ff )
{
- struct dlg_cell *dlg;
-
- unsigned int dir = DLG_DIR_NONE;
- dlg = get_dlg(callid, ftag, ttag, &dir); //increments ref count!
-
if (!dlg) {
LM_ERR("Can't find dialog to register callback\n");
return -1;
diff --git a/src/modules/ims_dialog/dlg_cb.h b/src/modules/ims_dialog/dlg_cb.h
index f0f9815c9c..13d76d5a74 100644
--- a/src/modules/ims_dialog/dlg_cb.h
+++ b/src/modules/ims_dialog/dlg_cb.h
@@ -51,8 +51,7 @@ typedef void (param_free_cb) (void *param);
typedef int (*ims_register_dlgcb_f)(struct dlg_cell* dlg, int cb_types,
dialog_cb f, void *param, param_free_cb ff);
-typedef int (*ims_register_dlgcb_nodlg_f)(str *callid, str *ftag, str *ttag,
- int cb_types, dialog_cb f, void *param, param_free_cb ff);
+typedef int (*ims_register_dlgcb_nodlg_f)(struct dlg_cell* dlg, int cb_types, dialog_cb f, void *param, param_free_cb ff);
/* method to set a variable within a dialog */
//typedef int (*set_dlg_variable_f)( struct dlg_cell* dlg,
@@ -103,7 +102,7 @@ void destroy_dlg_callbacks(unsigned int type);
void destroy_dlg_callbacks_list(struct dlg_callback *cb);
-int register_dlgcb_nodlg(str *callid, str *ftag, str *ttag, int types, dialog_cb f, void *param, param_free_cb ff );
+int register_dlgcb_nodlg(struct dlg_cell* dlg, int types, dialog_cb f, void *param, param_free_cb ff);
int register_dlgcb( struct dlg_cell* dlg, int types, dialog_cb f, void *param, param_free_cb ff);
void run_create_callbacks(struct dlg_cell *dlg, struct sip_msg *msg);
diff --git a/src/modules/ims_dialog/dlg_handlers.c b/src/modules/ims_dialog/dlg_handlers.c
index b0f5b491bb..3d8dee7ff3 100644
--- a/src/modules/ims_dialog/dlg_handlers.c
+++ b/src/modules/ims_dialog/dlg_handlers.c
@@ -1965,4 +1965,3 @@ struct dlg_cell *dlg_get_msg_dialog(sip_msg_t *msg) {
return dlg;
}
-
Module: kamailio
Branch: 5.3
Commit: 46ad9e6dacb7b6040e50ba0c53d72585510dac28
URL: https://github.com/kamailio/kamailio/commit/46ad9e6dacb7b6040e50ba0c53d7258…
Author: Peter Friedrich <peter.friedrich(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-30T19:08:31+02:00
ims_qos: bugfix for Rx register dialog callback
- bugfix for Rx register dialog callback
- In some scenarios like parallel forking several INVITE with identical
CALLID and FROMTAG sent to PCSCF which inserts dialogues for each INVITE.
- When 200OK is received in PCSCF the dialog callback must be registered
for the respective dialog. Currently sometimes the wrong dialog is selected
by searching with CALLID FROMTAG and TOTAG thus leading to problem
no STR is sent at BYE.
- Fix is to pickup the right dialog before suspending the transaction during
AAR/AAA processing and reuse this saved dialog.
(cherry picked from commit 2768f8ce1cf6da242674e7e40c8e76eb6c630f6b)
---
Modified: src/modules/ims_qos/ims_qos_mod.c
Modified: src/modules/ims_qos/rx_aar.c
Modified: src/modules/ims_qos/rx_aar.h
---
Diff: https://github.com/kamailio/kamailio/commit/46ad9e6dacb7b6040e50ba0c53d7258…
Patch: https://github.com/kamailio/kamailio/commit/46ad9e6dacb7b6040e50ba0c53d7258…
---
diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c
index 7e0d50b2df..24a7a14531 100644
--- a/src/modules/ims_qos/ims_qos_mod.c
+++ b/src/modules/ims_qos/ims_qos_mod.c
@@ -1089,6 +1089,13 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int
saved_t_data->aar_update = 1; //this is an update aar - we set this so on async_aar we know this is an update and act accordingly
}
+ dlg = dlgb.get_dlg(msg);
+ if (!dlg) {
+ LM_ERR("Unable to find dialog and cannot do Rx without it\n");
+ goto error;
+ }
+ saved_t_data->dlg = dlg;
+
LM_DBG("Suspending SIP TM transaction\n");
if (tmb.t_suspend(msg, &saved_t_data->tindex, &saved_t_data->tlabel) != 0) {
LM_ERR("failed to suspend the TM processing\n");
diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c
index 2029035415..b1e8df51b8 100644
--- a/src/modules/ims_qos/rx_aar.c
+++ b/src/modules/ims_qos/rx_aar.c
@@ -176,8 +176,7 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
passed_rx_session_id->len = 0;
STR_SHM_DUP(*passed_rx_session_id, aaa->sessionId->data, "cb_passed_rx_session_id");
LM_DBG("passed rx session id [%.*s]", passed_rx_session_id->len, passed_rx_session_id->s);
-
- dlgb.register_dlgcb_nodlg(&data->callid, &data->ftag, &data->ttag, DLGCB_TERMINATED | DLGCB_DESTROY | DLGCB_EXPIRED | DLGCB_RESPONSE_WITHIN | DLGCB_CONFIRMED | DLGCB_FAILED, callback_dialog, (void*) (passed_rx_session_id), free_dialog_data);
+ dlgb.register_dlgcb_nodlg( data->dlg, DLGCB_TERMINATED | DLGCB_DESTROY | DLGCB_EXPIRED | DLGCB_RESPONSE_WITHIN | DLGCB_CONFIRMED | DLGCB_FAILED, callback_dialog, (void*) (passed_rx_session_id), free_dialog_data);
}
result = CSCF_RETURN_TRUE;
} else {
diff --git a/src/modules/ims_qos/rx_aar.h b/src/modules/ims_qos/rx_aar.h
index 10fa2cc059..550202fa40 100644
--- a/src/modules/ims_qos/rx_aar.h
+++ b/src/modules/ims_qos/rx_aar.h
@@ -72,6 +72,7 @@ typedef struct saved_transaction {
str ftag;
str ttag;
unsigned int aar_update;
+ struct dlg_cell* dlg;
} saved_transaction_t;
typedef struct saved_transaction_local {
Module: kamailio
Branch: 5.3
Commit: 8cee1675e95363462d20cdc2b8aaac1a6976eb9c
URL: https://github.com/kamailio/kamailio/commit/8cee1675e95363462d20cdc2b8aaac1…
Author: Peter Friedrich <peter.friedrich(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-30T19:08:17+02:00
ims_dialog: bugfix for registering dialog callbacks
- bugfix for registering dialog callbacks
- in Rx scenarios of parallel forking (several INVITEs with same CALLID
and FROMTAG sent to PCSCF) and INVITE for orig and term handled in
same PCSCF (means also INVITEs with identical CALLID and FROMTAG) the wrong
dialog is selected for registering the callback (i.e. the callback
for sending STR) when 200OK from terminator is processed.
- Root cause is that dialog is searched with callid-fromtag-totag but at
the time of dialog insertion (processing of INVITE) no totag is available.
- fix is to get ctx dialog at 200OK processing before suspending the
transaction - save dialog until AAA is received - use this dialog for
registering the STR callback.
(cherry picked from commit e2a1b967fd6e2cc92dc1447e1c033f6124aca446)
---
Modified: src/modules/ims_dialog/dlg_cb.c
Modified: src/modules/ims_dialog/dlg_cb.h
Modified: src/modules/ims_dialog/dlg_handlers.c
---
Diff: https://github.com/kamailio/kamailio/commit/8cee1675e95363462d20cdc2b8aaac1…
Patch: https://github.com/kamailio/kamailio/commit/8cee1675e95363462d20cdc2b8aaac1…
---
diff --git a/src/modules/ims_dialog/dlg_cb.c b/src/modules/ims_dialog/dlg_cb.c
index 1b7caa21ce..d4d0ee356c 100644
--- a/src/modules/ims_dialog/dlg_cb.c
+++ b/src/modules/ims_dialog/dlg_cb.c
@@ -100,15 +100,10 @@ void destroy_dlg_callbacks(unsigned int types)
}
}
-int register_dlgcb_nodlg(str *callid, str *ftag, str *ttag,
- int types, dialog_cb f,
+
+int register_dlgcb_nodlg(struct dlg_cell *dlg, int types, dialog_cb f,
void *param, param_free_cb ff )
{
- struct dlg_cell *dlg;
-
- unsigned int dir = DLG_DIR_NONE;
- dlg = get_dlg(callid, ftag, ttag, &dir); //increments ref count!
-
if (!dlg) {
LM_ERR("Can't find dialog to register callback\n");
return -1;
diff --git a/src/modules/ims_dialog/dlg_cb.h b/src/modules/ims_dialog/dlg_cb.h
index f0f9815c9c..13d76d5a74 100644
--- a/src/modules/ims_dialog/dlg_cb.h
+++ b/src/modules/ims_dialog/dlg_cb.h
@@ -51,8 +51,7 @@ typedef void (param_free_cb) (void *param);
typedef int (*ims_register_dlgcb_f)(struct dlg_cell* dlg, int cb_types,
dialog_cb f, void *param, param_free_cb ff);
-typedef int (*ims_register_dlgcb_nodlg_f)(str *callid, str *ftag, str *ttag,
- int cb_types, dialog_cb f, void *param, param_free_cb ff);
+typedef int (*ims_register_dlgcb_nodlg_f)(struct dlg_cell* dlg, int cb_types, dialog_cb f, void *param, param_free_cb ff);
/* method to set a variable within a dialog */
//typedef int (*set_dlg_variable_f)( struct dlg_cell* dlg,
@@ -103,7 +102,7 @@ void destroy_dlg_callbacks(unsigned int type);
void destroy_dlg_callbacks_list(struct dlg_callback *cb);
-int register_dlgcb_nodlg(str *callid, str *ftag, str *ttag, int types, dialog_cb f, void *param, param_free_cb ff );
+int register_dlgcb_nodlg(struct dlg_cell* dlg, int types, dialog_cb f, void *param, param_free_cb ff);
int register_dlgcb( struct dlg_cell* dlg, int types, dialog_cb f, void *param, param_free_cb ff);
void run_create_callbacks(struct dlg_cell *dlg, struct sip_msg *msg);
diff --git a/src/modules/ims_dialog/dlg_handlers.c b/src/modules/ims_dialog/dlg_handlers.c
index b0f5b491bb..3d8dee7ff3 100644
--- a/src/modules/ims_dialog/dlg_handlers.c
+++ b/src/modules/ims_dialog/dlg_handlers.c
@@ -1965,4 +1965,3 @@ struct dlg_cell *dlg_get_msg_dialog(sip_msg_t *msg) {
return dlg;
}
-
Module: kamailio
Branch: master
Commit: 2768f8ce1cf6da242674e7e40c8e76eb6c630f6b
URL: https://github.com/kamailio/kamailio/commit/2768f8ce1cf6da242674e7e40c8e76e…
Author: Peter Friedrich <peter.friedrich(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-30T19:02:29+02:00
ims_qos: bugfix for Rx register dialog callback
- bugfix for Rx register dialog callback
- In some scenarios like parallel forking several INVITE with identical
CALLID and FROMTAG sent to PCSCF which inserts dialogues for each INVITE.
- When 200OK is received in PCSCF the dialog callback must be registered
for the respective dialog. Currently sometimes the wrong dialog is selected
by searching with CALLID FROMTAG and TOTAG thus leading to problem
no STR is sent at BYE.
- Fix is to pickup the right dialog before suspending the transaction during
AAR/AAA processing and reuse this saved dialog.
---
Modified: src/modules/ims_qos/ims_qos_mod.c
Modified: src/modules/ims_qos/rx_aar.c
Modified: src/modules/ims_qos/rx_aar.h
---
Diff: https://github.com/kamailio/kamailio/commit/2768f8ce1cf6da242674e7e40c8e76e…
Patch: https://github.com/kamailio/kamailio/commit/2768f8ce1cf6da242674e7e40c8e76e…
---
diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c
index c2e2ae06a1..e58dd2c140 100644
--- a/src/modules/ims_qos/ims_qos_mod.c
+++ b/src/modules/ims_qos/ims_qos_mod.c
@@ -1095,6 +1095,13 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int
saved_t_data->aar_update = 1; //this is an update aar - we set this so on async_aar we know this is an update and act accordingly
}
+ dlg = dlgb.get_dlg(msg);
+ if (!dlg) {
+ LM_ERR("Unable to find dialog and cannot do Rx without it\n");
+ goto error;
+ }
+ saved_t_data->dlg = dlg;
+
LM_DBG("Suspending SIP TM transaction\n");
if (tmb.t_suspend(msg, &saved_t_data->tindex, &saved_t_data->tlabel) != 0) {
LM_ERR("failed to suspend the TM processing\n");
diff --git a/src/modules/ims_qos/rx_aar.c b/src/modules/ims_qos/rx_aar.c
index 2029035415..b1e8df51b8 100644
--- a/src/modules/ims_qos/rx_aar.c
+++ b/src/modules/ims_qos/rx_aar.c
@@ -176,8 +176,7 @@ void async_aar_callback(int is_timeout, void *param, AAAMessage *aaa, long elaps
passed_rx_session_id->len = 0;
STR_SHM_DUP(*passed_rx_session_id, aaa->sessionId->data, "cb_passed_rx_session_id");
LM_DBG("passed rx session id [%.*s]", passed_rx_session_id->len, passed_rx_session_id->s);
-
- dlgb.register_dlgcb_nodlg(&data->callid, &data->ftag, &data->ttag, DLGCB_TERMINATED | DLGCB_DESTROY | DLGCB_EXPIRED | DLGCB_RESPONSE_WITHIN | DLGCB_CONFIRMED | DLGCB_FAILED, callback_dialog, (void*) (passed_rx_session_id), free_dialog_data);
+ dlgb.register_dlgcb_nodlg( data->dlg, DLGCB_TERMINATED | DLGCB_DESTROY | DLGCB_EXPIRED | DLGCB_RESPONSE_WITHIN | DLGCB_CONFIRMED | DLGCB_FAILED, callback_dialog, (void*) (passed_rx_session_id), free_dialog_data);
}
result = CSCF_RETURN_TRUE;
} else {
diff --git a/src/modules/ims_qos/rx_aar.h b/src/modules/ims_qos/rx_aar.h
index 10fa2cc059..550202fa40 100644
--- a/src/modules/ims_qos/rx_aar.h
+++ b/src/modules/ims_qos/rx_aar.h
@@ -72,6 +72,7 @@ typedef struct saved_transaction {
str ftag;
str ttag;
unsigned int aar_update;
+ struct dlg_cell* dlg;
} saved_transaction_t;
typedef struct saved_transaction_local {
Module: kamailio
Branch: master
Commit: e2a1b967fd6e2cc92dc1447e1c033f6124aca446
URL: https://github.com/kamailio/kamailio/commit/e2a1b967fd6e2cc92dc1447e1c033f6…
Author: Peter Friedrich <peter.friedrich(a)kapsch.net>
Committer: Henning Westerholt <hw(a)skalatan.de>
Date: 2020-03-30T19:00:58+02:00
ims_dialog: bugfix for registering dialog callbacks
- bugfix for registering dialog callbacks
- in Rx scenarios of parallel forking (several INVITEs with same CALLID
and FROMTAG sent to PCSCF) and INVITE for orig and term handled in
same PCSCF (means also INVITEs with identical CALLID and FROMTAG) the wrong
dialog is selected for registering the callback (i.e. the callback
for sending STR) when 200OK from terminator is processed.
- Root cause is that dialog is searched with callid-fromtag-totag but at
the time of dialog insertion (processing of INVITE) no totag is available.
- fix is to get ctx dialog at 200OK processing before suspending the
transaction - save dialog until AAA is received - use this dialog for
registering the STR callback.
---
Modified: src/modules/ims_dialog/dlg_cb.c
Modified: src/modules/ims_dialog/dlg_cb.h
Modified: src/modules/ims_dialog/dlg_handlers.c
---
Diff: https://github.com/kamailio/kamailio/commit/e2a1b967fd6e2cc92dc1447e1c033f6…
Patch: https://github.com/kamailio/kamailio/commit/e2a1b967fd6e2cc92dc1447e1c033f6…
---
diff --git a/src/modules/ims_dialog/dlg_cb.c b/src/modules/ims_dialog/dlg_cb.c
index 1b7caa21ce..d4d0ee356c 100644
--- a/src/modules/ims_dialog/dlg_cb.c
+++ b/src/modules/ims_dialog/dlg_cb.c
@@ -100,15 +100,10 @@ void destroy_dlg_callbacks(unsigned int types)
}
}
-int register_dlgcb_nodlg(str *callid, str *ftag, str *ttag,
- int types, dialog_cb f,
+
+int register_dlgcb_nodlg(struct dlg_cell *dlg, int types, dialog_cb f,
void *param, param_free_cb ff )
{
- struct dlg_cell *dlg;
-
- unsigned int dir = DLG_DIR_NONE;
- dlg = get_dlg(callid, ftag, ttag, &dir); //increments ref count!
-
if (!dlg) {
LM_ERR("Can't find dialog to register callback\n");
return -1;
diff --git a/src/modules/ims_dialog/dlg_cb.h b/src/modules/ims_dialog/dlg_cb.h
index f0f9815c9c..13d76d5a74 100644
--- a/src/modules/ims_dialog/dlg_cb.h
+++ b/src/modules/ims_dialog/dlg_cb.h
@@ -51,8 +51,7 @@ typedef void (param_free_cb) (void *param);
typedef int (*ims_register_dlgcb_f)(struct dlg_cell* dlg, int cb_types,
dialog_cb f, void *param, param_free_cb ff);
-typedef int (*ims_register_dlgcb_nodlg_f)(str *callid, str *ftag, str *ttag,
- int cb_types, dialog_cb f, void *param, param_free_cb ff);
+typedef int (*ims_register_dlgcb_nodlg_f)(struct dlg_cell* dlg, int cb_types, dialog_cb f, void *param, param_free_cb ff);
/* method to set a variable within a dialog */
//typedef int (*set_dlg_variable_f)( struct dlg_cell* dlg,
@@ -103,7 +102,7 @@ void destroy_dlg_callbacks(unsigned int type);
void destroy_dlg_callbacks_list(struct dlg_callback *cb);
-int register_dlgcb_nodlg(str *callid, str *ftag, str *ttag, int types, dialog_cb f, void *param, param_free_cb ff );
+int register_dlgcb_nodlg(struct dlg_cell* dlg, int types, dialog_cb f, void *param, param_free_cb ff);
int register_dlgcb( struct dlg_cell* dlg, int types, dialog_cb f, void *param, param_free_cb ff);
void run_create_callbacks(struct dlg_cell *dlg, struct sip_msg *msg);
diff --git a/src/modules/ims_dialog/dlg_handlers.c b/src/modules/ims_dialog/dlg_handlers.c
index b0f5b491bb..3d8dee7ff3 100644
--- a/src/modules/ims_dialog/dlg_handlers.c
+++ b/src/modules/ims_dialog/dlg_handlers.c
@@ -1965,4 +1965,3 @@ struct dlg_cell *dlg_get_msg_dialog(sip_msg_t *msg) {
return dlg;
}
-
Hi All,
I'm trying to establish a topology with Kamailio which is located between Asterisk and Outside.
My issue is "transaction matching failed" (t_check_trans failed). That means Kamailio does not recognise ACK & BYE message to forwards. I had a check on email list and google but found nothing.
I'm using it with record_route.
SIP signalling and part of kamailio.cfg is below. Is there any suggestion?
route[WITHINDLG] {
if (!has_totag()) return;
if (loose_route()) {
route(DLGURI);
if (is_method("BYE")) {
setflag(FLT_ACC); # do accounting ...
setflag(FLT_ACCFAILED); # ... even if the transaction fails
}
else if ( is_method("ACK") ) {
xlog("ack is came: $si:$sp\n");
route(NATMANAGE);
}
else if ( is_method("NOTIFY") ) {
record_route();
}
route(RELAY);
exit;
}
if (is_method("SUBSCRIBE") && uri == myself) {
route(PRESENCE);
exit;
}
if ( is_method("ACK") ) {
if ( t_check_trans() ) {
route(RELAY);
exit;
} else {
exit;
}
}
sl_send_reply("404","Not here");
exit;
}
route[NATMANAGE] {
#!ifdef WITH_NAT
if (is_request()) {
if(has_totag()) {
if(check_route_param("nat=yes")) {
setbflag(FLB_NATB);
}
}
}
route(RTPPROXY);
if (!(isflagset(FLT_NATS) || isbflagset(FLB_NATB)))
return;
if (is_request()) {
if (!has_totag()) {
if(t_is_branch_route()) {
add_rr_param(";nat=yes");
}
}
}
if (is_reply()) {
if(isbflagset(FLB_NATB)) {
if(is_first_hop())
set_contact_alias();
}
}
#!endif
return;
}
Asterisk > Kamailio
INVITE sip:user@outside_ip SIP/2.0
Via: SIP/2.0/UDP asterisk_ip:5060;branch=z9hG4bK1b56cce0
Max-Forwards: 70
From: "KUYRUK" <sip:0553847<tel:+10553847>aaaa@asterisk_ip>;tag=as3dde7cdb
To: <sip:user@outside_ip>
Contact: <sip:0553847<tel:+10553847>aaaa@asterisk_ip:5060>
Call-ID: 62a480bf71d2a1aa0ec94b454cd98945@asterisk_ip:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.32.3
Kamailio > Outside
INVITE sip:user@outside_ip SIP/2.0
Record-Route: <sip:kamailio_ip;lr;nat=yes>
Via: SIP/2.0/UDP kamailio_ip;branch=z9hG4bK7b3f.8e4716eeea4b0dc45cc51d21b5aded57.0
Via: SIP/2.0/UDP asterisk_ip:5060;rport=5060;branch=z9hG4bK1b56cce0
From: "KUYRUK" <sip:0553847<tel:+10553847>aaaa@asterisk_ip>;tag=as3dde7cdb
To: <sip:user@outside_ip>
Contact: <sip:0553847<tel:+10553847>aaaa@asterisk_ip:5060;alias=asterisk_ip~5060~1>
Call-ID: 62a480bf71d2a1aa0ec94b454cd98945@asterisk_ip:5060
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.8.32.3
Outside > Kamailio
SIP/2.0 200 OK
Via: SIP/2.0/UDP kamailio_ip;branch=z9hG4bK7b3f.8e4716eeea4b0dc45cc51d21b5aded57.0
Via: SIP/2.0/UDP asterisk_ip:5060;rport=5060;branch=z9hG4bK1b56cce0
From: "KUYRUK" <sip:0553847<tel:+10553847>aaaa@asterisk_ip>;tag=as3dde7cdb
To: <sip:user@outside_ip>;tag=kv8iml6ur9
Call-ID: 62a480bf71d2a1aa0ec94b454cd98945@asterisk_ip:5060
CSeq: 102 INVITE
Record-Route: <sip:kamailio_ip;lr;nat=yes>
Contact: <sip:user@outside_ip:5060;alias=x.x.x.x~18005~6;transport=udp>
Kamailio > Asterisk
SIP/2.0 200 OK
Via: SIP/2.0/UDP asterisk_ip:5060;rport=5060;branch=z9hG4bK1b56cce0
From: "KUYRUK" <sip:0553847<tel:+10553847>aaaa@asterisk_ip>;tag=as3dde7cdb
To: <sip:user@outside_ip>;tag=kv8iml6ur9
Call-ID: 62a480bf71d2a1aa0ec94b454cd98945@asterisk_ip:5060
CSeq: 102 INVITE
Record-Route: <sip:kamailio_ip;lr;nat=yes>
Contact: <sip:user@outside_ip:5060;alias=x.x.x.x~18005~6;transport=udp>
Asterisk > Kamailio THIS ACK IS NOT ROUTED TO OUTSIDE BY KAMAILIO!!
ACK sip:user@outside_ip:5060;alias=x.x.x.x~18005~6;transport=udp SIP/2.0
Via: SIP/2.0/UDP asterisk_ip:5060;branch=z9hG4bK73366924
Route: <sip:kamailio_ip;lr;nat=yes>
From: "KUYRUK" <sip:0553847<tel:+10553847>aaaa@asterisk_ip>;tag=as3dde7cdb
To: <sip:user@outside_ip>;tag=kv8iml6ur9
Contact: <sip:0553847<tel:+10553847>aaaa@asterisk_ip:5060>
Call-ID: 62a480bf71d2a1aa0ec94b454cd98945@asterisk_ip:5060
CSeq: 102 ACK
User-Agent: Asterisk PBX 1.8.32.3
Get Outlook for Android<https://aka.ms/ghei36>