diff options
author | Mark Michelson <mmichelson@digium.com> | 2010-04-16 19:50:43 +0000 |
---|---|---|
committer | Mark Michelson <mmichelson@digium.com> | 2010-04-16 19:50:43 +0000 |
commit | ba81ee6d2867bc7f6702d15e597ec567ef3b34e2 (patch) | |
tree | 0eb0c3791ca5b4e628b9df6b24c8915bd6463ff8 /channels | |
parent | afedb856ae2a069c8a94317d9598730195d2ec9d (diff) |
Make sure to fail a monitor if we receive a negative response for a CC SUBSCRIBE.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@257646 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'channels')
-rw-r--r-- | channels/chan_sip.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 80a75193c..a59d5421e 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -18981,6 +18981,16 @@ static void handle_response(struct sip_pvt *p, int resp, const char *rest, struc ast_string_field_set(p, theirtag, tag); } + if (sipmethod == SIP_SUBSCRIBE && resp >= 400) { + struct sip_monitor_instance *monitor_instance = ao2_callback(sip_monitor_instances, + 0, find_sip_monitor_instance_by_subscription_pvt, p); + if (monitor_instance) { + ast_cc_monitor_failed(monitor_instance->core_id, monitor_instance->device_name, + "Received error response to our SUBSCRIBE"); + return; + } + } + switch(resp) { case 200: if (sipmethod == SIP_INVITE) { |