[asterisk-commits] file: branch group/pimp_my_sip r380409 - /team/group/pimp_my_sip/res/res_sip/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Jan 29 14:34:12 CST 2013


Author: file
Date: Tue Jan 29 14:34:01 2013
New Revision: 380409

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=380409
Log:
OPTIONS is now a supported method.

Modified:
    team/group/pimp_my_sip/res/res_sip/sip_options.c

Modified: team/group/pimp_my_sip/res/res_sip/sip_options.c
URL: http://svnview.digium.com/svn/asterisk/team/group/pimp_my_sip/res/res_sip/sip_options.c?view=diff&rev=380409&r1=380408&r2=380409
==============================================================================
--- team/group/pimp_my_sip/res/res_sip/sip_options.c (original)
+++ team/group/pimp_my_sip/res/res_sip/sip_options.c Tue Jan 29 14:34:01 2013
@@ -298,8 +298,16 @@
 	}
 
 	if (!reload) {
+		const pj_str_t STR_OPTIONS = { "OPTIONS", 7 };
+
 		if (ast_sip_register_service(&options_module)) {
 			ao2_t_ref(scheduled_qualifies, -1, "Remove scheduled qualifies on off nominal path");
+			return -1;
+		}
+
+		if (pjsip_endpt_add_capability(ast_sip_get_pjsip_endpoint(), NULL, PJSIP_H_ALLOW, NULL, 1, &STR_OPTIONS) != PJ_SUCCESS) {
+			ao2_t_ref(scheduled_qualifies, -1, "Remove scheduled qualifies on off nominal path");
+			ast_sip_unregister_service(&options_module);
 			return -1;
 		}
 




More information about the asterisk-commits mailing list