[sr-dev] git:master:2fa4b0db: ims_qos: Rx AAR get identity from request for MT

Henning Westerholt hw at skalatan.de
Tue Feb 11 21:16:46 CET 2020


Module: kamailio
Branch: master
Commit: 2fa4b0dbca4dad08707f12217165d2fd489b2cb5
URL: https://github.com/kamailio/kamailio/commit/2fa4b0dbca4dad08707f12217165d2fd489b2cb5

Author: Aleksandar Yosifov <alexyosifov at gmail.com>
Committer: Henning Westerholt <hw at skalatan.de>
Date: 2020-02-11T21:16:39+01:00

ims_qos: Rx AAR get identity from request for MT

- Rx AAR for Terminating direction get identity
  from request message if dialog is missing.

---

Modified: src/modules/ims_qos/ims_qos_mod.c

---

Diff:  https://github.com/kamailio/kamailio/commit/2fa4b0dbca4dad08707f12217165d2fd489b2cb5.diff
Patch: https://github.com/kamailio/kamailio/commit/2fa4b0dbca4dad08707f12217165d2fd489b2cb5.patch

---

diff --git a/src/modules/ims_qos/ims_qos_mod.c b/src/modules/ims_qos/ims_qos_mod.c
index 6f68b39be1..27964f5b64 100644
--- a/src/modules/ims_qos/ims_qos_mod.c
+++ b/src/modules/ims_qos/ims_qos_mod.c
@@ -936,17 +936,23 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int
 												//get dialog and get the req URI from there
 												dlg = dlgb.get_dlg(msg);
 												if (!dlg) {
-														LM_ERR("Unable to find dialog and cannot do Rx without it\n");
+													if (!cscf_get_to_uri(orig_sip_request_msg, &uri)) {
+														LM_ERR("Error assigning P-Asserted-Identity using To hdr in req");
 														goto error;
+													}
+													LM_DBG("going to remove parameters if any from identity: [%.*s]\n", uri.len, uri.s);
+													get_identifier(&uri);
+													LM_DBG("identifier from uri : [%.*s]\n", identifier.len, identifier.s);
+												}else{
+													LM_DBG("dlg req uri : [%.*s] going to remove parameters if any\n", dlg->req_uri.len, dlg->req_uri.s);
+
+													if (get_identifier(&dlg->req_uri) != 0) {
+															dlgb.release_dlg(dlg);
+															goto error;
+													}
+													dlgb.release_dlg(dlg);
+													LM_DBG("identifier from dlg req uri : [%.*s]\n", identifier.len, identifier.s);
 												}
-												LM_DBG("dlg req uri : [%.*s] going to remove parameters if any\n", dlg->req_uri.len, dlg->req_uri.s);
-
-												if (get_identifier(&dlg->req_uri) != 0) {
-														dlgb.release_dlg(dlg);
-														goto error;
-												}
-												dlgb.release_dlg(dlg);
-												LM_DBG("identifier from dlg req uri : [%.*s]\n", identifier.len, identifier.s);
 										} else {
 												get_identifier(&uri);
 										}




More information about the sr-dev mailing list