diff --git a/modules/usrloc/ucontact.c b/modules/usrloc/ucontact.c index aa489e7bc69..6d769605728 100644 --- a/modules/usrloc/ucontact.c +++ b/modules/usrloc/ucontact.c @@ -301,7 +301,7 @@ int mem_update_ucontact(ucontact_t* _c, ucontact_info_t* _ci) _c->next_hop.name.len, _c->next_hop.name.s); ul_raise_contact_event(ei_c_update_id, &_c->c, &_c->callid, - &_c->received, _c->cseq); + &_c->received, _c->aor, _c->cseq); return 0; } diff --git a/modules/usrloc/udomain.c b/modules/usrloc/udomain.c index 7a555b3bcc3..c78cd813879 100644 --- a/modules/usrloc/udomain.c +++ b/modules/usrloc/udomain.c @@ -140,6 +140,7 @@ static evi_params_p ul_event_params; static evi_param_p ul_aor_param; static evi_params_p ul_contact_event_params; static evi_param_p ul_c_addr_param, ul_c_callid_param; +static evi_param_p ul_c_aor_param; static evi_param_p ul_c_recv_param; static evi_param_p ul_c_cseq_param; @@ -203,6 +204,12 @@ int ul_event_init(void) return -1; } + ul_c_aor_param = evi_param_create(ul_contact_event_params, &ei_aor_name); + if (!ul_c_aor_param) { + LM_ERR("cannot create contact aor parameter\n"); + return -1; + } + ul_c_callid_param = evi_param_create(ul_contact_event_params, &ei_callid_name); if (!ul_c_callid_param) { LM_ERR("cannot create callid parameter\n"); @@ -242,7 +249,7 @@ static void ul_raise_event(event_id_t _e, struct urecord* _r) } void ul_raise_contact_event(event_id_t _e, str *addr, str *callid, str *recv, - int cseq) + str *aor, int cseq) { if (_e == EVI_ERROR) { LM_ERR("event not yet registered %d\n", _e); @@ -253,6 +260,11 @@ void ul_raise_contact_event(event_id_t _e, str *addr, str *callid, str *recv, return; } + if (evi_param_set_str(ul_c_aor_param, aor) < 0) { + LM_ERR("cannot set contact aor parameter\n"); + return; + } + if (evi_param_set_str(ul_c_callid_param, callid) < 0) { LM_ERR("cannot set callid parameter\n"); return; diff --git a/modules/usrloc/udomain.h b/modules/usrloc/udomain.h index 6623c901e56..105bf87e190 100644 --- a/modules/usrloc/udomain.h +++ b/modules/usrloc/udomain.h @@ -182,6 +182,6 @@ int delete_urecord(udomain_t* _d, str* _aor, struct urecord* _r, void ul_raise_contact_event(event_id_t _e, str *addr, str *callid, str *recv, - int cseq); + str *aor, int cseq); #endif /* UDOMAIN_H */ diff --git a/modules/usrloc/urecord.c b/modules/usrloc/urecord.c index 9e863b52590..9c4b4574958 100644 --- a/modules/usrloc/urecord.c +++ b/modules/usrloc/urecord.c @@ -177,7 +177,7 @@ ucontact_t* mem_insert_ucontact(urecord_t* _r, str* _c, ucontact_info_t* _ci) } ul_raise_contact_event(ei_c_ins_id, &c->c, &c->callid, &c->received, - c->cseq); + c->aor, c->cseq); return c; } @@ -199,7 +199,7 @@ void mem_remove_ucontact(urecord_t* _r, ucontact_t* _c) } } ul_raise_contact_event(ei_c_del_id, &_c->c, &_c->callid, &_c->received, - _c->cseq); + _c->aor, _c->cseq); }