From fd94fea5996a0f8074de1c470337a8d5c25fff38 Mon Sep 17 00:00:00 2001 From: Matthew Jordan Date: Wed, 16 Jul 2014 14:03:51 +0000 Subject: res_pjsip: Support setting a default accountcode on endpoints Most channel drivers let you specify a default accountcode to be set on channels associated with a particular peer/endpoint/object. Prior to this patch, chan_pjsip/res_pjsip did not support such a setting. This patch adds a new setting to the res_pjsip endpoint object, 'accountcode'. When a channel is created that is associated with an endpoint with this value set, the channel will automatically have its accountcode property set to the value configured for the endpoint. Review: https://reviewboard.asterisk.org/r/3724/ ASTERISK-24000 #close Reported by: Matt Jordan ........ Merged revisions 418756 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@418757 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- res/res_pjsip/pjsip_configuration.c | 1 + 1 file changed, 1 insertion(+) (limited to 'res/res_pjsip') diff --git a/res/res_pjsip/pjsip_configuration.c b/res/res_pjsip/pjsip_configuration.c index ccd494932..59db4eb1e 100644 --- a/res/res_pjsip/pjsip_configuration.c +++ b/res/res_pjsip/pjsip_configuration.c @@ -1730,6 +1730,7 @@ int ast_res_pjsip_initialize_configuration(const struct ast_module_info *ast_mod ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "redirect_method", "user", redirect_handler, NULL, NULL, 0, 0); ast_sorcery_object_field_register_custom(sip_sorcery, "endpoint", "set_var", "", set_var_handler, set_var_to_str, set_var_to_vl, 0, 0); ast_sorcery_object_field_register(sip_sorcery, "endpoint", "message_context", "", OPT_STRINGFIELD_T, 1, STRFLDSET(struct ast_sip_endpoint, message_context)); + ast_sorcery_object_field_register(sip_sorcery, "endpoint", "accountcode", "", OPT_STRINGFIELD_T, 1, STRFLDSET(struct ast_sip_endpoint, accountcode)); if (ast_sip_initialize_sorcery_transport()) { ast_log(LOG_ERROR, "Failed to register SIP transport support with sorcery\n"); -- cgit v1.2.3