[asterisk-commits] mmichelson: trunk r257646 - /trunk/channels/chan_sip.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Apr 16 14:50:45 CDT 2010
Author: mmichelson
Date: Fri Apr 16 14:50:43 2010
New Revision: 257646
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=257646
Log:
Make sure to fail a monitor if we receive a negative response for a CC SUBSCRIBE.
Modified:
trunk/channels/chan_sip.c
Modified: trunk/channels/chan_sip.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_sip.c?view=diff&rev=257646&r1=257645&r2=257646
==============================================================================
--- trunk/channels/chan_sip.c (original)
+++ trunk/channels/chan_sip.c Fri Apr 16 14:50:43 2010
@@ -18981,6 +18981,16 @@
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) {
More information about the asterisk-commits
mailing list