From fb7247c57c532f2d5e174ef12d6f82e576d65d10 Mon Sep 17 00:00:00 2001 From: Torrey Searle Date: Thu, 15 Jun 2017 10:12:41 +0200 Subject: 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 --- res/res_pjsip/pjsip_configuration.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'res/res_pjsip/pjsip_configuration.c') 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"; } -- cgit v1.2.3