mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 07:48:14 +00:00
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
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user