summaryrefslogtreecommitdiff
path: root/res/res_pjsip/pjsip_configuration.c
diff options
context:
space:
mode:
authorTorrey Searle <torrey@voxbone.com>2017-06-15 10:12:41 +0200
committerGeorge Joseph <gjoseph@digium.com>2017-06-29 07:57:01 -0600
commitfb7247c57c532f2d5e174ef12d6f82e576d65d10 (patch)
tree66e503620f1082490a757f34c84beb2ba4bf211a /res/res_pjsip/pjsip_configuration.c
parent45df25a579edd5423c9d319758d109a74fe8ef33 (diff)
res_pjsip: Add DTMF INFO Failback mode
The existing auto dtmf mode reverts to inband if 4733 fails to be negotiated. This patch adds a new mode auto_info which will switch to INFO instead of inband if 4733 is not available. ASTERISK-27066 #close Change-Id: Id185b11e84afd9191a2f269e8443019047765e91
Diffstat (limited to 'res/res_pjsip/pjsip_configuration.c')
-rw-r--r--res/res_pjsip/pjsip_configuration.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index 56a8419a8..372b01bc8 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -371,6 +371,8 @@ static int dtmf_handler(const struct aco_option *opt, struct ast_variable *var,
endpoint->dtmf = AST_SIP_DTMF_RFC_4733;
} else if (!strcasecmp(var->value, "inband")) {
endpoint->dtmf = AST_SIP_DTMF_INBAND;
+ } else if (!strcasecmp(var->value, "auto_info")) {
+ endpoint->dtmf = AST_SIP_DTMF_AUTO_INFO;
} else if (!strcasecmp(var->value, "info")) {
endpoint->dtmf = AST_SIP_DTMF_INFO;
} else if (!strcasecmp(var->value, "auto")) {
@@ -395,8 +397,11 @@ static int dtmf_to_str(const void *obj, const intptr_t *args, char **buf)
*buf = "inband"; break;
case AST_SIP_DTMF_INFO :
*buf = "info"; break;
- case AST_SIP_DTMF_AUTO :
+ case AST_SIP_DTMF_AUTO :
*buf = "auto"; break;
+ case AST_SIP_DTMF_AUTO_INFO :
+ *buf = "auto_info";
+ break;
default:
*buf = "none";
}