summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--channels/chan_sip.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 0b24b1756..15468fe2d 100644
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -4390,7 +4390,7 @@ int __sip_ack(struct sip_pvt *p, uint32_t seqno, int resp, int sipmethod)
If obforcing is set, we will keep the outbound proxy during the whole
dialog, regardless of what the SIP rfc says
*/
- if (p->outboundproxy && !p->outboundproxy->force){
+ if (p->outboundproxy && !p->outboundproxy->force) {
ref_proxy(p, NULL);
}
@@ -6454,6 +6454,10 @@ void __sip_destroy(struct sip_pvt *p, int lockowner, int lockdialoglist)
p->options = NULL;
}
+ if (p->outboundproxy) {
+ ref_proxy(p, NULL);
+ }
+
if (p->notify) {
ast_variables_destroy(p->notify->headers);
ast_free(p->notify->content);