<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/18022">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Kevin Harwell: Looks good to me, approved
Benjamin Keith Ford: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_pubsub: provide a display name for RLS subscriptions<br><br>Whereas BLFs allow to show a display name for each RLS entry,<br>the asterisk provides only the extension now.<br>This is not end user friendly.<br><br>This commit adds a new resource_list option, resource_display_name,<br>to indicate whether display name of resource or the resource name being<br>provided for RLS entries.<br>If this option is enabled, the Display Name will be provided.<br>This option is disabled by default to remain the previous behavior.<br>If the 'event' set to 'presence' or 'dialog' the non-empty HINT name<br>will be set as the Display Name.<br>The 'message-summary' is not supported yet.<br><br>ASTERISK-29891 #close<br><br>Change-Id: Ic5306bd5a7c73d03f5477fe235e9b0f41c69c681<br>---<br>M configs/samples/pjsip.conf.sample<br>A contrib/ast-db-manage/config/versions/8f72185e437f_res_pjsip_pubsub_add_resource_list_.py<br>A doc/CHANGES-staging/rls_display_name.txt<br>M include/asterisk/res_pjsip_pubsub.h<br>M res/res_pjsip_exten_state.c<br>M res/res_pjsip_pubsub.c<br>6 files changed, 124 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/configs/samples/pjsip.conf.sample b/configs/samples/pjsip.conf.sample</span><br><span>index 6f0601d..8507b4e 100644</span><br><span>--- a/configs/samples/pjsip.conf.sample</span><br><span>+++ b/configs/samples/pjsip.conf.sample</span><br><span>@@ -1502,6 +1502,19 @@</span><br><span> ; Time Asterisk should wait, in milliseconds,</span><br><span> ; before sending notifications.</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+;resource_display_name=no ; Indicates whether display name of resource</span><br><span style="color: hsl(120, 100%, 40%);">+ ; or the resource name being reported.</span><br><span style="color: hsl(120, 100%, 40%);">+ ; If this option is enabled, the Display Name</span><br><span style="color: hsl(120, 100%, 40%);">+ ; will be reported as resource name.</span><br><span style="color: hsl(120, 100%, 40%);">+ ; If the event set to presence or dialog,</span><br><span style="color: hsl(120, 100%, 40%);">+ ; the HINT name will be set as the Display Name.</span><br><span style="color: hsl(120, 100%, 40%);">+ ; For example:</span><br><span style="color: hsl(120, 100%, 40%);">+ ; exten => 1234,hint,PJSIP/user1234(Alice)</span><br><span style="color: hsl(120, 100%, 40%);">+ ; If enabled the resource name will be 'Alice'.</span><br><span style="color: hsl(120, 100%, 40%);">+ ; If disabled the resource name will be '1234'.</span><br><span style="color: hsl(120, 100%, 40%);">+ ; The message-summary is not supported yet.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ;==========================INBOUND_PUBLICATION================================</span><br><span> ; See https://wiki.asterisk.org/wiki/display/AST/Exchanging+Device+and+Mailbox+State+Using+PJSIP</span><br><span> ; for more information.</span><br><span>diff --git a/contrib/ast-db-manage/config/versions/8f72185e437f_res_pjsip_pubsub_add_resource_list_.py b/contrib/ast-db-manage/config/versions/8f72185e437f_res_pjsip_pubsub_add_resource_list_.py</span><br><span>new file mode 100644</span><br><span>index 0000000..8af67bf</span><br><span>--- /dev/null</span><br><span>+++ b/contrib/ast-db-manage/config/versions/8f72185e437f_res_pjsip_pubsub_add_resource_list_.py</span><br><span>@@ -0,0 +1,29 @@</span><br><span style="color: hsl(120, 100%, 40%);">+"""res_pjsip_pubsub add resource_list option resource_display_name</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Revision ID: 8f72185e437f</span><br><span style="color: hsl(120, 100%, 40%);">+Revises: a06d8f8462d9</span><br><span style="color: hsl(120, 100%, 40%);">+Create Date: 2022-02-01 10:53:55.875438</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+"""</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+# revision identifiers, used by Alembic.</span><br><span style="color: hsl(120, 100%, 40%);">+revision = '8f72185e437f'</span><br><span style="color: hsl(120, 100%, 40%);">+down_revision = 'a06d8f8462d9'</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+from alembic import op</span><br><span style="color: hsl(120, 100%, 40%);">+import sqlalchemy as sa</span><br><span style="color: hsl(120, 100%, 40%);">+from sqlalchemy.dialects.postgresql import ENUM</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+AST_BOOL_NAME = 'ast_bool_values'</span><br><span style="color: hsl(120, 100%, 40%);">+AST_BOOL_VALUES = [ '0', '1',</span><br><span style="color: hsl(120, 100%, 40%);">+ 'off', 'on',</span><br><span style="color: hsl(120, 100%, 40%);">+ 'false', 'true',</span><br><span style="color: hsl(120, 100%, 40%);">+ 'no', 'yes' ]</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+def upgrade():</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_bool_values = ENUM(*AST_BOOL_VALUES, name=AST_BOOL_NAME, create_type=False)</span><br><span style="color: hsl(120, 100%, 40%);">+ op.add_column('ps_resource_list', sa.Column('resource_display_name', ast_bool_values))</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+def downgrade():</span><br><span style="color: hsl(120, 100%, 40%);">+ op.drop_column('ps_resource_list', 'resource_display_name')</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span>diff --git a/doc/CHANGES-staging/rls_display_name.txt b/doc/CHANGES-staging/rls_display_name.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..0d95b08</span><br><span>--- /dev/null</span><br><span>+++ b/doc/CHANGES-staging/rls_display_name.txt</span><br><span>@@ -0,0 +1,10 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: res_pjsip_pubsub</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+A new resource_list option, resource_display_name, indicates</span><br><span style="color: hsl(120, 100%, 40%);">+whether display name of resource or the resource name being</span><br><span style="color: hsl(120, 100%, 40%);">+provided for RLS entries.</span><br><span style="color: hsl(120, 100%, 40%);">+If this option is enabled, the Display Name will be provided.</span><br><span style="color: hsl(120, 100%, 40%);">+This option is disabled by default to remain the previous behavior.</span><br><span style="color: hsl(120, 100%, 40%);">+If the 'event' set to 'presence' or 'dialog' the non-empty HINT name</span><br><span style="color: hsl(120, 100%, 40%);">+will be set as the Display Name.</span><br><span style="color: hsl(120, 100%, 40%);">+The 'message-summary' is not supported yet.</span><br><span>diff --git a/include/asterisk/res_pjsip_pubsub.h b/include/asterisk/res_pjsip_pubsub.h</span><br><span>index 354b0b2..aca1141 100644</span><br><span>--- a/include/asterisk/res_pjsip_pubsub.h</span><br><span>+++ b/include/asterisk/res_pjsip_pubsub.h</span><br><span>@@ -292,6 +292,17 @@</span><br><span> * \return An ao2 object that can be used to create a NOTIFY body.</span><br><span> */</span><br><span> void *(*get_notify_data)(struct ast_sip_subscription *sub);</span><br><span style="color: hsl(120, 100%, 40%);">+ /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Supply Display Name for resource</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param endpoint The endpoint from which we received the SUBSCRIBE</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param resource The name of the resource to which the subscription is being made</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param display_name buffer for Display Name</span><br><span style="color: hsl(120, 100%, 40%);">+ * \param display_name_size size of display_name buffer</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval 0 Success</span><br><span style="color: hsl(120, 100%, 40%);">+ * \retval -1 Failure</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+ int (*get_resource_display_name)(struct ast_sip_endpoint *endpoint, const char *resource, char *display_name, int display_name_size);</span><br><span> };</span><br><span> </span><br><span> struct ast_sip_subscriber {</span><br><span>diff --git a/res/res_pjsip_exten_state.c b/res/res_pjsip_exten_state.c</span><br><span>index df9a35f..b51df87 100644</span><br><span>--- a/res/res_pjsip_exten_state.c</span><br><span>+++ b/res/res_pjsip_exten_state.c</span><br><span>@@ -117,6 +117,7 @@</span><br><span> static int new_subscribe(struct ast_sip_endpoint *endpoint, const char *resource);</span><br><span> static int subscription_established(struct ast_sip_subscription *sub);</span><br><span> static void *get_notify_data(struct ast_sip_subscription *sub);</span><br><span style="color: hsl(120, 100%, 40%);">+static int get_resource_display_name(struct ast_sip_endpoint *endpoint, const char *resource, char *display_name, int display_name_size);</span><br><span> static void to_ami(struct ast_sip_subscription *sub,</span><br><span> struct ast_str **buf);</span><br><span> static int publisher_start(struct ast_sip_outbound_publish *configuration,</span><br><span>@@ -128,6 +129,7 @@</span><br><span> .new_subscribe = new_subscribe,</span><br><span> .subscription_established = subscription_established,</span><br><span> .get_notify_data = get_notify_data,</span><br><span style="color: hsl(120, 100%, 40%);">+ .get_resource_display_name = get_resource_display_name,</span><br><span> };</span><br><span> </span><br><span> struct ast_sip_notifier dialog_notifier = {</span><br><span>@@ -135,6 +137,7 @@</span><br><span> .new_subscribe = new_subscribe,</span><br><span> .subscription_established = subscription_established,</span><br><span> .get_notify_data = get_notify_data,</span><br><span style="color: hsl(120, 100%, 40%);">+ .get_resource_display_name = get_resource_display_name,</span><br><span> };</span><br><span> </span><br><span> struct ast_sip_subscription_handler presence_handler = {</span><br><span>@@ -424,6 +427,27 @@</span><br><span> return 200;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static int get_resource_display_name(struct ast_sip_endpoint *endpoint,</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *resource, char *display_name, int display_name_size)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *context;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!endpoint || ast_strlen_zero(resource) || !display_name || display_name_size <= 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ context = S_OR(endpoint->subscription.context, endpoint->context);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!ast_get_hint(NULL, 0, display_name, display_name_size, NULL, context, resource)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_NOTICE, "Endpoint '%s': "</span><br><span style="color: hsl(120, 100%, 40%);">+ "Extension '%s' does not exist in context '%s' or has no associated hint\n",</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sorcery_object_get_id(endpoint), resource, context);</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return 0;</span><br><span style="color: hsl(120, 100%, 40%);">+}</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> static int subscription_established(struct ast_sip_subscription *sip_sub)</span><br><span> {</span><br><span> struct ast_sip_endpoint *endpoint = ast_sip_subscription_get_endpoint(sip_sub);</span><br><span>diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c</span><br><span>index 31394e2..60506db 100644</span><br><span>--- a/res/res_pjsip_pubsub.c</span><br><span>+++ b/res/res_pjsip_pubsub.c</span><br><span>@@ -210,6 +210,15 @@</span><br><span> many notifications.</para></span><br><span> </description></span><br><span> </configOption></span><br><span style="color: hsl(120, 100%, 40%);">+ <configOption name="resource_display_name" default="no"></span><br><span style="color: hsl(120, 100%, 40%);">+ <synopsis>Indicates whether display name of resource or the resource name being reported.</synopsis></span><br><span style="color: hsl(120, 100%, 40%);">+ <description></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>If this option is enabled, the Display Name will be reported as resource name.</span><br><span style="color: hsl(120, 100%, 40%);">+ If the <replaceable>event</replaceable> set to <literal>presence</literal> or <literal>dialog</literal>,</span><br><span style="color: hsl(120, 100%, 40%);">+ the non-empty HINT name will be set as the Display Name.</span><br><span style="color: hsl(120, 100%, 40%);">+ The <literal>message-summary</literal> is not supported yet.</para></span><br><span style="color: hsl(120, 100%, 40%);">+ </description></span><br><span style="color: hsl(120, 100%, 40%);">+ </configOption></span><br><span> </configObject></span><br><span> <configObject name="inbound-publication"></span><br><span> <synopsis>The configuration for inbound publications</synopsis></span><br><span>@@ -332,6 +341,8 @@</span><br><span> unsigned int full_state;</span><br><span> /*! Time, in milliseconds Asterisk waits before sending a batched notification.*/</span><br><span> unsigned int notification_batch_interval;</span><br><span style="color: hsl(120, 100%, 40%);">+ /*! Indicates whether display name of resource or the resource name being reported.*/</span><br><span style="color: hsl(120, 100%, 40%);">+ unsigned int resource_display_name;</span><br><span> };</span><br><span> </span><br><span> /*!</span><br><span>@@ -499,6 +510,8 @@</span><br><span> pjsip_sip_uri *uri;</span><br><span> /*! Data to be persisted with the subscription */</span><br><span> struct ast_json *persistence_data;</span><br><span style="color: hsl(120, 100%, 40%);">+ /*! Display Name of resource */</span><br><span style="color: hsl(120, 100%, 40%);">+ char *display_name;</span><br><span> /*! Name of resource being subscribed to */</span><br><span> char resource[0];</span><br><span> };</span><br><span>@@ -886,6 +899,7 @@</span><br><span> struct tree_node {</span><br><span> AST_VECTOR(, struct tree_node *) children;</span><br><span> unsigned int full_state;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *display_name;</span><br><span> char resource[0];</span><br><span> };</span><br><span> </span><br><span>@@ -929,7 +943,7 @@</span><br><span> * \retval NULL Allocation failure.</span><br><span> * \retval non-NULL The newly-allocated tree_node</span><br><span> */</span><br><span style="color: hsl(0, 100%, 40%);">-static struct tree_node *tree_node_alloc(const char *resource, struct resources *visited, unsigned int full_state)</span><br><span style="color: hsl(120, 100%, 40%);">+static struct tree_node *tree_node_alloc(const char *resource, struct resources *visited, unsigned int full_state, const char *display_name)</span><br><span> {</span><br><span> struct tree_node *node;</span><br><span> </span><br><span>@@ -944,6 +958,7 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> node->full_state = full_state;</span><br><span style="color: hsl(120, 100%, 40%);">+ node->display_name = ast_strdup(display_name);</span><br><span> </span><br><span> if (visited) {</span><br><span> AST_VECTOR_APPEND(visited, resource);</span><br><span>@@ -971,6 +986,7 @@</span><br><span> tree_node_destroy(AST_VECTOR_GET(&node->children, i));</span><br><span> }</span><br><span> AST_VECTOR_FREE(&node->children);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_free(node->display_name);</span><br><span> ast_free(node);</span><br><span> }</span><br><span> </span><br><span>@@ -1035,7 +1051,11 @@</span><br><span> if (!child_list) {</span><br><span> int resp = handler->notifier->new_subscribe(endpoint, resource);</span><br><span> if (PJSIP_IS_STATUS_IN_CLASS(resp, 200)) {</span><br><span style="color: hsl(0, 100%, 40%);">- current = tree_node_alloc(resource, visited, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ char display_name[AST_MAX_EXTENSION] = "";</span><br><span style="color: hsl(120, 100%, 40%);">+ if (list->resource_display_name && handler->notifier->get_resource_display_name) {</span><br><span style="color: hsl(120, 100%, 40%);">+ handler->notifier->get_resource_display_name(endpoint, resource, display_name, sizeof(display_name));</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ current = tree_node_alloc(resource, visited, 0, ast_strlen_zero(display_name) ? NULL : display_name);</span><br><span> if (!current) {</span><br><span> ast_debug(1,</span><br><span> "Subscription to leaf resource %s was successful, but encountered allocation error afterwards\n",</span><br><span>@@ -1053,7 +1073,7 @@</span><br><span> }</span><br><span> } else {</span><br><span> ast_debug(2, "Resource %s (child of %s) is a list\n", resource, parent->resource);</span><br><span style="color: hsl(0, 100%, 40%);">- current = tree_node_alloc(resource, visited, child_list->full_state);</span><br><span style="color: hsl(120, 100%, 40%);">+ current = tree_node_alloc(resource, visited, child_list->full_state, NULL);</span><br><span> if (!current) {</span><br><span> ast_debug(1, "Cannot build children of resource %s due to allocation failure\n", resource);</span><br><span> continue;</span><br><span>@@ -1139,7 +1159,7 @@</span><br><span> if (!has_eventlist_support || !(list = retrieve_resource_list(resource, handler->event_name))) {</span><br><span> ast_debug(2, "Subscription '%s->%s' is not to a list\n",</span><br><span> ast_sorcery_object_get_id(endpoint), resource);</span><br><span style="color: hsl(0, 100%, 40%);">- tree->root = tree_node_alloc(resource, NULL, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ tree->root = tree_node_alloc(resource, NULL, 0, NULL);</span><br><span> if (!tree->root) {</span><br><span> return 500;</span><br><span> }</span><br><span>@@ -1152,7 +1172,7 @@</span><br><span> return 500;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- tree->root = tree_node_alloc(resource, &visited, list->full_state);</span><br><span style="color: hsl(120, 100%, 40%);">+ tree->root = tree_node_alloc(resource, &visited, list->full_state, NULL);</span><br><span> if (!tree->root) {</span><br><span> AST_VECTOR_FREE(&visited);</span><br><span> return 500;</span><br><span>@@ -1207,6 +1227,7 @@</span><br><span> AST_VECTOR_FREE(&sub->children);</span><br><span> ao2_cleanup(sub->datastores);</span><br><span> ast_json_unref(sub->persistence_data);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_free(sub->display_name);</span><br><span> ast_free(sub);</span><br><span> }</span><br><span> </span><br><span>@@ -1229,7 +1250,7 @@</span><br><span> }</span><br><span> </span><br><span> static struct ast_sip_subscription *allocate_subscription(const struct ast_sip_subscription_handler *handler,</span><br><span style="color: hsl(0, 100%, 40%);">- const char *resource, struct sip_subscription_tree *tree)</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *resource, const char *display_name, struct sip_subscription_tree *tree)</span><br><span> {</span><br><span> struct ast_sip_subscription *sub;</span><br><span> pjsip_sip_uri *contact_uri;</span><br><span>@@ -1240,6 +1261,8 @@</span><br><span> }</span><br><span> strcpy(sub->resource, resource); /* Safe */</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+ sub->display_name = ast_strdup(display_name);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> sub->datastores = ast_datastores_alloc();</span><br><span> if (!sub->datastores) {</span><br><span> destroy_subscription(sub);</span><br><span>@@ -1288,7 +1311,7 @@</span><br><span> int i;</span><br><span> struct ast_sip_subscription *sub;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- sub = allocate_subscription(handler, resource, tree);</span><br><span style="color: hsl(120, 100%, 40%);">+ sub = allocate_subscription(handler, resource, current->display_name, tree);</span><br><span> if (!sub) {</span><br><span> return NULL;</span><br><span> }</span><br><span>@@ -1880,7 +1903,7 @@</span><br><span> return NULL;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- sub = allocate_subscription(handler, resource, sub_tree);</span><br><span style="color: hsl(120, 100%, 40%);">+ sub = allocate_subscription(handler, resource, NULL, sub_tree);</span><br><span> if (!sub) {</span><br><span> ao2_cleanup(sub_tree);</span><br><span> return NULL;</span><br><span>@@ -2088,6 +2111,8 @@</span><br><span> pjsip_evsub_state state;</span><br><span> /*! The actual body part that will be present in the multipart body */</span><br><span> pjsip_multipart_part *part;</span><br><span style="color: hsl(120, 100%, 40%);">+ /*! Display name for the resource */</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *display_name;</span><br><span> };</span><br><span> </span><br><span> /*!</span><br><span>@@ -2186,7 +2211,7 @@</span><br><span> for (i = 0; i < AST_VECTOR_SIZE(body_parts); ++i) {</span><br><span> const struct body_part *part = AST_VECTOR_GET(body_parts, i);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- add_rlmi_resource(pool, rlmi, part->cid, part->resource, part->uri, part->state);</span><br><span style="color: hsl(120, 100%, 40%);">+ add_rlmi_resource(pool, rlmi, part->cid, S_OR(part->display_name, part->resource), part->uri, part->state);</span><br><span> }</span><br><span> </span><br><span> rlmi_part = pjsip_multipart_create_part(pool);</span><br><span>@@ -2243,6 +2268,7 @@</span><br><span> bp->resource = sub->resource;</span><br><span> bp->state = sub->subscription_state;</span><br><span> bp->uri = sub->uri;</span><br><span style="color: hsl(120, 100%, 40%);">+ bp->display_name = sub->display_name;</span><br><span> </span><br><span> return bp;</span><br><span> }</span><br><span>@@ -4873,6 +4899,8 @@</span><br><span> "0", OPT_UINT_T, 0, FLDSET(struct resource_list, notification_batch_interval));</span><br><span> ast_sorcery_object_field_register_custom(sorcery, "resource_list", "list_item",</span><br><span> "", list_item_handler, list_item_to_str, NULL, 0, 0);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sorcery_object_field_register(sorcery, "resource_list", "resource_display_name", "no",</span><br><span style="color: hsl(120, 100%, 40%);">+ OPT_BOOL_T, 1, FLDSET(struct resource_list, resource_display_name));</span><br><span> </span><br><span> ast_sorcery_reload_object(sorcery, "resource_list");</span><br><span> </span><br><span></span><br></pre><div style="white-space:pre-wrap"></div><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/18022">change 18022</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.asterisk.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.asterisk.org/c/asterisk/+/18022"/><meta itemprop="name" content="View Change"/></div></div>
<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: 19 </div>
<div style="display:none"> Gerrit-Change-Id: Ic5306bd5a7c73d03f5477fe235e9b0f41c69c681 </div>
<div style="display:none"> Gerrit-Change-Number: 18022 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Alexei Gradinari <alex2grad@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Benjamin Keith Ford <bford@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: Kevin Harwell <kharwell@digium.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>