Module: kamailio Branch: master Commit: c28a887d3a51b471e0bcc111e6af65e17fc36a1b URL: https://github.com/kamailio/kamailio/commit/c28a887d3a51b471e0bcc111e6af65e1...
Author: Richard Good richard.good@smilecoms.com Committer: Richard Good richard.good@smilecoms.com Date: 2015-03-30T11:54:10+02:00
modules/ims_qos: check for called party id in request if P-Asserted-Id not present
---
Modified: modules/ims_qos/mod.c
---
Diff: https://github.com/kamailio/kamailio/commit/c28a887d3a51b471e0bcc111e6af65e1... Patch: https://github.com/kamailio/kamailio/commit/c28a887d3a51b471e0bcc111e6af65e1...
---
diff --git a/modules/ims_qos/mod.c b/modules/ims_qos/mod.c index 6d0486b..c5cf544 100644 --- a/modules/ims_qos/mod.c +++ b/modules/ims_qos/mod.c @@ -544,6 +544,8 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int int must_free_asserted_identity = 0; sdp_session_cell_t* sdp_session; str s_id; + + struct hdr_field *h=0;
cfg_action_t* cfg_action = 0; saved_transaction_t* saved_t_data = 0; //data specific to each contact's AAR async call @@ -719,8 +721,13 @@ static int w_rx_aar(struct sip_msg *msg, char *route, char* dir, char *c_id, int } else { LM_DBG("terminating direction\n"); if ((identifier = cscf_get_asserted_identity(msg, 0)).len == 0) { - LM_DBG("No P-Asserted-Identity hdr found in response. Using To hdr in resp"); - identifier = cscf_get_public_identity(msg); //get public identity from to header + LM_DBG("No P-Asserted-Identity hdr found in response. Using Called party id in resp"); + //get identity from called party id + //getting called asserted identity + if ((identifier = cscf_get_public_identity_from_called_party_id(t->uas.request, &h)).len == 0) { + LM_DBG("No P-Called-Identity hdr found. Using request URI for called_asserted_identity"); + identifier = cscf_get_public_identity(msg); //get public identity from to header + } } } if (strncasecmp(identifier.s,"tel:",4)==0) {