summaryrefslogtreecommitdiff
path: root/res
diff options
context:
space:
mode:
Diffstat (limited to 'res')
-rw-r--r--res/res_pjsip.c7
-rw-r--r--res/res_pjsip/pjsip_configuration.c1
2 files changed, 8 insertions, 0 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index b123a3706..2c15a798d 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -715,6 +715,13 @@
specified, then the <replaceable>context</replaceable> setting is used.
</para></description>
</configOption>
+ <configOption name="accountcode">
+ <synopsis>An accountcode to set automatically on any channels created for this endpoint.</synopsis>
+ <description><para>
+ If specified, any channel created for this endpoint will automatically
+ have this accountcode set on it.
+ </para></description>
+ </configOption>
</configObject>
<configObject name="auth">
<synopsis>Authentication type</synopsis>
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");