aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_sip.c
diff options
context:
space:
mode:
Diffstat (limited to 'channels/chan_sip.c')
-rwxr-xr-xchannels/chan_sip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c
index 82780e027..0074eee75 100755
--- a/channels/chan_sip.c
+++ b/channels/chan_sip.c
@@ -6726,9 +6726,10 @@ static void handle_response(struct sip_pvt *p, int resp, char *rest, struct sip_
break;
case 501: /* Not Implemented */
- if (!strcasecmp(msg, "INVITE"))
- ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
- else
+ if (!strcasecmp(msg, "INVITE")) {
+ if (p->owner)
+ ast_queue_control(p->owner, AST_CONTROL_CONGESTION);
+ } else
ast_log(LOG_WARNING, "Host '%s' does not implement '%s'\n", ast_inet_ntoa(iabuf, sizeof(iabuf), p->sa.sin_addr), msg);
break;
default: