From 8bae18ab9301a2e38fd414460fde8d6236f2162e Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Fri, 10 Apr 2015 17:56:47 +0000 Subject: res_pjsip: Add an 'auto' option for DTMF Mode This patch adds support for automatically detecting the type of DTMF that a PJSIP endpoint supports. When the 'dtmf_mode' endpoint option is set to 'auto', the channel created for an endpoint will attempt to determine if RFC 4733 DTMF is supported. If so, it will use that DTMF type. If not, the DTMF type for the channel will be set to inband. Review: https://reviewboard.asterisk.org/r/4438 ASTERISK-24706 #close Reported by: yaron nahum patches: yaron_patch_3_Feb.diff submitted by yaron nahum (License 6676) ........ Merged revisions 434637 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@434638 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- include/asterisk/dsp.h | 3 +++ include/asterisk/res_pjsip.h | 2 ++ 2 files changed, 5 insertions(+) (limited to 'include') diff --git a/include/asterisk/dsp.h b/include/asterisk/dsp.h index 16262c05d..7e84ebe9c 100644 --- a/include/asterisk/dsp.h +++ b/include/asterisk/dsp.h @@ -138,6 +138,9 @@ void ast_dsp_digitreset(struct ast_dsp *dsp); /*! \brief Select feature set */ void ast_dsp_set_features(struct ast_dsp *dsp, int features); +/*! \brief Get features */ +int ast_dsp_get_features(struct ast_dsp *dsp); + /*! \brief Get pending DTMF/MF digits */ int ast_dsp_getdigits(struct ast_dsp *dsp, char *buf, int max); diff --git a/include/asterisk/res_pjsip.h b/include/asterisk/res_pjsip.h index 6e3a9ea93..2358a7281 100644 --- a/include/asterisk/res_pjsip.h +++ b/include/asterisk/res_pjsip.h @@ -252,6 +252,8 @@ enum ast_sip_dtmf_mode { AST_SIP_DTMF_INBAND, /*! Use SIP INFO DTMF (blech) */ AST_SIP_DTMF_INFO, + /*! Use SIP 4733 if supported by the other side or INBAND if not */ + AST_SIP_DTMF_AUTO, }; /*! -- cgit v1.2.3