diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 64c9e9ec3a9b5c6aae9b310683c6997fb311f904..cc861e76ccce3b703490de93ad8d1e4131c05220 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -17280,6 +17280,13 @@ static int handle_request_options(struct sip_pvt *p, struct sip_request *req) \todo Fix handle_request_options device handling with optional authentication (this needs to be fixed in 1.4 as well) */ + + if (p->lastinvite) { + /* if this is a request in an active dialog, just confirm that the dialog exists. */ + transmit_response_with_allow(p, "200 OK", req, 0); + return 0; + } + res = get_destination(p, req); build_contact(p); @@ -17295,8 +17302,7 @@ static int handle_request_options(struct sip_pvt *p, struct sip_request *req) /* Destroy if this OPTIONS was the opening request, but not if it's in the middle of a normal call flow. */ - if (!p->lastinvite) - sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); + sip_scheddestroy(p, DEFAULT_TRANS_TIMEOUT); return res; }