From d00c8a6abf1f9447bee468fc6206816b535df001 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Mon, 29 Jul 2013 16:06:56 -0500 Subject: [PATCH] FS-5641 --resolve --- libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c index a9fed48ffe..c5400dd4ca 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_client.c @@ -1062,11 +1062,15 @@ int nua_client_response(nua_client_request_t *cr, sip_method_t method = cr->cr_method; int terminated, graceful = 1; - if (status < 700) - terminated = sip_response_terminates_dialog(status, method, &graceful); - else - /* XXX - terminate usage by all internal error responses */ - terminated = 0, graceful = 1; + if (status < 700) { + terminated = sip_response_terminates_dialog(status, method, &graceful); + if (terminated && !cr->cr_initial) { + terminated = 0, graceful = 1; + } + } else { + /* XXX - terminate usage by all internal error responses */ + terminated = 0, graceful = 1; + } if (terminated < 0) cr->cr_terminated = terminated;