Skip to content

Commit

Permalink
Parsing Call-ID before looking up for contact_id
Browse files Browse the repository at this point in the history
  • Loading branch information
italorossi committed Jul 17, 2018
1 parent a4d2b08 commit 222125a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions modules/mid_registrar/lookup.c
Expand Up @@ -187,6 +187,12 @@ int mid_reg_lookup(struct sip_msg* req, char* _t, char* _f, char* _s)
}

if (reg_mode != MID_REG_THROTTLE_AOR) {

if ( (!req->callid && parse_headers(req, HDR_CALLID_F,0)<0) || !req->callid ) {
LM_ERR("bad request or missing Call-ID hdr\n");
return -1;
}

if (parse_uri(uri.s, uri.len, &puri) < 0) {
LM_ERR("failed to parse R-URI <%.*s>, ci: %.*s\n", uri.len,
uri.s, req->callid->body.len, req->callid->body.s);
Expand Down

0 comments on commit 222125a

Please sign in to comment.