浏览代码

ims_qos: Rx AAR get identity from request for MT

- Rx AAR for Terminating direction get identity
  from request message if dialog is missing.
Aleksandar Yosifov 5 年之前
父节点
当前提交
2fa4b0dbca
共有 1 个文件被更改,包括 15 次插入9 次删除
  1. 15 9
      src/modules/ims_qos/ims_qos_mod.c

+ 15 - 9
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);
 										}