diff --git a/channels/chan_sip.c b/channels/chan_sip.c index a960e9deb1..3cc0a93f2e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -9471,7 +9471,7 @@ static struct sip_pvt *get_sip_pvt_byid_locked(const char *callid, const char *t (With a forking SIP proxy, several call legs share the call id, but have different tags) */ - if (pedanticsipchecking && (strcmp(fromtag, sip_pvt_ptr->theirtag) || strcmp(totag, ourtag))) + if (pedanticsipchecking && (strcmp(fromtag, sip_pvt_ptr->theirtag) || (!ast_strlen_zero(totag) && strcmp(totag, ourtag)))) match = 0; if (!match) {