|
|
@ -12389,7 +12389,6 @@ static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *t
|
|
|
|
/* Go ahead and lock it (and its owner) before returning */
|
|
|
|
/* Go ahead and lock it (and its owner) before returning */
|
|
|
|
sip_pvt_lock(sip_pvt_ptr);
|
|
|
|
sip_pvt_lock(sip_pvt_ptr);
|
|
|
|
if (sip_cfg.pedanticsipchecking) {
|
|
|
|
if (sip_cfg.pedanticsipchecking) {
|
|
|
|
const char *pvt_fromtag, *pvt_totag;
|
|
|
|
|
|
|
|
unsigned char frommismatch = 0, tomismatch = 0;
|
|
|
|
unsigned char frommismatch = 0, tomismatch = 0;
|
|
|
|
|
|
|
|
|
|
|
|
if (ast_strlen_zero(fromtag)) {
|
|
|
|
if (ast_strlen_zero(fromtag)) {
|
|
|
@ -12406,30 +12405,20 @@ static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *t
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (sip_pvt_ptr->outgoing_call == TRUE) {
|
|
|
|
frommismatch = !!strcmp(fromtag, sip_pvt_ptr->theirtag);
|
|
|
|
/* Outgoing call tags : from is "our", to is "their" */
|
|
|
|
tomismatch = !!strcmp(totag, sip_pvt_ptr->tag);
|
|
|
|
pvt_fromtag = sip_pvt_ptr->tag ;
|
|
|
|
|
|
|
|
pvt_totag = sip_pvt_ptr->theirtag ;
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
/* Incoming call tags : from is "their", to is "our" */
|
|
|
|
|
|
|
|
pvt_fromtag = sip_pvt_ptr->theirtag ;
|
|
|
|
|
|
|
|
pvt_totag = sip_pvt_ptr->tag ;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
frommismatch = !!strcmp(fromtag, pvt_fromtag);
|
|
|
|
|
|
|
|
tomismatch = !!strcmp(totag, pvt_totag);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (frommismatch || tomismatch) {
|
|
|
|
if (frommismatch || tomismatch) {
|
|
|
|
sip_pvt_unlock(sip_pvt_ptr);
|
|
|
|
sip_pvt_unlock(sip_pvt_ptr);
|
|
|
|
if (frommismatch) {
|
|
|
|
if (frommismatch) {
|
|
|
|
ast_debug(4, "Matched %s call for callid=%s - pedantic from tag check fails; their tag is %s our tag is %s\n",
|
|
|
|
ast_debug(4, "Matched %s call for callid=%s - pedantic from tag check fails; their tag is %s our tag is %s\n",
|
|
|
|
sip_pvt_ptr->outgoing_call == TRUE ? "OUTGOING": "INCOMING", sip_pvt_ptr->callid,
|
|
|
|
sip_pvt_ptr->outgoing_call == TRUE ? "OUTGOING": "INCOMING", sip_pvt_ptr->callid,
|
|
|
|
fromtag, pvt_fromtag);
|
|
|
|
fromtag, sip_pvt_ptr->theirtag);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (tomismatch) {
|
|
|
|
if (tomismatch) {
|
|
|
|
ast_debug(4, "Matched %s call for callid=%s - pedantic to tag check fails; their tag is %s our tag is %s\n",
|
|
|
|
ast_debug(4, "Matched %s call for callid=%s - pedantic to tag check fails; their tag is %s our tag is %s\n",
|
|
|
|
sip_pvt_ptr->outgoing_call == TRUE ? "OUTGOING": "INCOMING", sip_pvt_ptr->callid,
|
|
|
|
sip_pvt_ptr->outgoing_call == TRUE ? "OUTGOING": "INCOMING", sip_pvt_ptr->callid,
|
|
|
|
totag, pvt_totag);
|
|
|
|
totag, sip_pvt_ptr->tag);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|