From: Mark Michelson Date: Wed, 19 Mar 2014 17:27:57 +0000 (+0000) Subject: PJSIP: Allow for identify sections to be specified in sorcery.conf. X-Git-Tag: 13.0.0-beta1~419 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57239bfe37d61977ef6eec82eca0cb6631e1d4ef;p=thirdparty%2Fasterisk.git PJSIP: Allow for identify sections to be specified in sorcery.conf. "identify" is a special type of configuration object in PJSIP because unlike the other objects, it is not provided by the base res_pjsip module. Instead, it is provided by the res_pjsip_endpoint_identifier_ip module. If using the default sorcery wizard (config,criteria=type=identify) then things work because the module that applies the default wizard is the correct module. However, if attempting to use sorcery.conf to apply an alternate wizard, it was not possible. If you attempted to specify the identify object type in the res_pjsip section, then the object could not be registered since the object was undocumented for the res_pjsip module. There was no alternate configuration section defined for it, so you were out of luck if you wanted to override the default wizard. With this change, the identify section will properly have a sorcery.conf-based wizard applied when the identify definition is within the res_pjsip_endpoint_identifier_ip section. ........ Merged revisions 410933 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@410934 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_pjsip_endpoint_identifier_ip.c b/res/res_pjsip_endpoint_identifier_ip.c index cc9bc35345..b4b7e9a9c2 100644 --- a/res/res_pjsip_endpoint_identifier_ip.c +++ b/res/res_pjsip_endpoint_identifier_ip.c @@ -382,6 +382,7 @@ static struct ast_sip_cli_formatter_entry *cli_formatter; static int load_module(void) { + ast_sorcery_apply_config(ast_sip_get_sorcery(), "res_pjsip_endpoint_identifier_ip"); ast_sorcery_apply_default(ast_sip_get_sorcery(), "identify", "config", "pjsip.conf,criteria=type=identify"); if (ast_sorcery_object_register(ast_sip_get_sorcery(), "identify", ip_identify_alloc, NULL, NULL)) {