diff options
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 4789c553f..dd3f2723f 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -11985,13 +11985,15 @@ static int reqprep(struct sip_request *req, struct sip_pvt *p, int sipmethod, ui add_header(req, "Via", p->via); /* - * Use the learned route set unless this is a CANCEL on an ACK for a non-2xx + * Use the learned route set unless this is a CANCEL or an ACK for a non-2xx * final response. For a CANCEL or ACK, we have to send to the same destination * as the original INVITE. + * Send UPDATE to the same destination as CANCEL, if call is not in final state. */ if (!sip_route_empty(&p->route) && !(sipmethod == SIP_CANCEL || - (sipmethod == SIP_ACK && (p->invitestate == INV_COMPLETED || p->invitestate == INV_CANCELLED)))) { + (sipmethod == SIP_ACK && (p->invitestate == INV_COMPLETED || p->invitestate == INV_CANCELLED)) || + (sipmethod == SIP_UPDATE && (p->invitestate == INV_PROCEEDING || p->invitestate == INV_EARLY_MEDIA)))) { if (p->socket.type != AST_TRANSPORT_UDP && p->socket.tcptls_session) { /* For TCP/TLS sockets that are connected we won't need * to do any hostname/IP lookups */ |