summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip/pjsip_configuration.c13
1 files changed, 12 insertions, 1 deletions
diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c
index d382fefaf..d8e781a56 100644
--- a/res/res_pjsip/pjsip_configuration.c
+++ b/res/res_pjsip/pjsip_configuration.c
@@ -520,8 +520,19 @@ static int dtls_handler(const struct aco_option *opt,
struct ast_variable *var, void *obj)
{
struct ast_sip_endpoint *endpoint = obj;
+ char *name = ast_strdupa(var->name);
+ char *front, *buf = name;
- return ast_rtp_dtls_cfg_parse(&endpoint->media.rtp.dtls_cfg, var->name, var->value);
+ /* strip out underscores in the name */
+ front = strtok(buf, "_");
+ while (front) {
+ int size = strlen(front);
+ ast_copy_string(buf, front, size + 1);
+ buf += size;
+ front = strtok(NULL, "_");
+ }
+
+ return ast_rtp_dtls_cfg_parse(&endpoint->media.rtp.dtls_cfg, name, var->value);
}
static int t38udptl_ec_handler(const struct aco_option *opt,