From: Sean Bright Date: Tue, 17 Oct 2023 15:33:41 +0000 (-0400) Subject: res_pjsip_dtmf_info.c: Add 'INFO' to Allow header. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3af55f14fa351f9e9349289939f7a68df3696c9d;p=thirdparty%2Fasterisk.git res_pjsip_dtmf_info.c: Add 'INFO' to Allow header. Fixes #376 --- diff --git a/res/res_pjsip_dtmf_info.c b/res/res_pjsip_dtmf_info.c index bbc0640661..df7adf2697 100644 --- a/res/res_pjsip_dtmf_info.c +++ b/res/res_pjsip_dtmf_info.c @@ -163,6 +163,13 @@ static struct ast_sip_session_supplement dtmf_info_supplement = { static int load_module(void) { + static const pj_str_t STR_INFO = { "INFO", 4 }; + + if (pjsip_endpt_add_capability(ast_sip_get_pjsip_endpoint(), + NULL, PJSIP_H_ALLOW, NULL, 1, &STR_INFO) != PJ_SUCCESS) { + return AST_MODULE_LOAD_DECLINE; + } + ast_sip_session_register_supplement(&dtmf_info_supplement); return AST_MODULE_LOAD_SUCCESS; }