<p>Friendly Automation <strong>submitted</strong> this change.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/16253">View Change</a></p><div style="white-space:pre-wrap">Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
Friendly Automation: Approved for Submit
</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">res_pjsip_header_funcs: Add PJSIP_HEADERS() ability to read header by pattern<br><br>PJSIP currently does not provide a function to replace SIP_HEADERS() function to get a list of headers from INVITE request.<br>It may be used to get all X- headers in case the actual set and names of headers unknown.<br><br>ASTERISK-29389<br><br>Change-Id: Ic09d395de71a0021e0d6c5c29e1e19d689079f8b<br>---<br>A doc/CHANGES-staging/pjsip_read_headers.txt<br>M res/res_pjsip_header_funcs.c<br>2 files changed, 188 insertions(+), 9 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/doc/CHANGES-staging/pjsip_read_headers.txt b/doc/CHANGES-staging/pjsip_read_headers.txt</span><br><span>new file mode 100644</span><br><span>index 0000000..4dc641c</span><br><span>--- /dev/null</span><br><span>+++ b/doc/CHANGES-staging/pjsip_read_headers.txt</span><br><span>@@ -0,0 +1,5 @@</span><br><span style="color: hsl(120, 100%, 40%);">+Subject: chan_pjsip</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Add function PJSIP_HEADERS() to get list of headers by pattern in the same way as SIP_HEADERS() do.</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+Add ability to read header by pattern using PJSIP_HEADER().</span><br><span>diff --git a/res/res_pjsip_header_funcs.c b/res/res_pjsip_header_funcs.c</span><br><span>index 798a1cd..4b12079 100644</span><br><span>--- a/res/res_pjsip_header_funcs.c</span><br><span>+++ b/res/res_pjsip_header_funcs.c</span><br><span>@@ -46,7 +46,10 @@</span><br><span> <parameter name="action" required="true"></span><br><span> <enumlist></span><br><span> <enum name="read"><para>Returns instance <replaceable>number</replaceable></span><br><span style="color: hsl(0, 100%, 40%);">- of header <replaceable>name</replaceable>.</para></enum></span><br><span style="color: hsl(120, 100%, 40%);">+ of header <replaceable>name</replaceable>. A <literal>*</literal></span><br><span style="color: hsl(120, 100%, 40%);">+ may be appended to <replaceable>name</replaceable> to iterate over all </span><br><span style="color: hsl(120, 100%, 40%);">+ headers <emphasis>beginning with</emphasis> <replaceable>name</replaceable>.</span><br><span style="color: hsl(120, 100%, 40%);">+ </para></enum></span><br><span> </span><br><span> <enum name="add"><para>Adds a new header <replaceable>name</replaceable></span><br><span> to this session.</para></enum></span><br><span>@@ -88,6 +91,9 @@</span><br><span> <para>; Set 'via2' to the value of the 2nd 'Via' header.</para></span><br><span> <para>exten => 1,1,Set(via2=${PJSIP_HEADER(read,Via,2)})</para></span><br><span> <para>;</para></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>; Set 'xhdr' to the value of the 1sx X-header.</para></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>exten => 1,1,Set(xhdr=${PJSIP_HEADER(read,X-*,1)})</para></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>;</para></span><br><span> <para>; Add an 'X-Myheader' header with the value of 'myvalue'.</para></span><br><span> <para>exten => 1,1,Set(PJSIP_HEADER(add,X-MyHeader)=myvalue)</para></span><br><span> <para>;</para></span><br><span>@@ -139,6 +145,29 @@</span><br><span> </note></span><br><span> </description></span><br><span> </function></span><br><span style="color: hsl(120, 100%, 40%);">+ <function name="PJSIP_HEADERS" language="en_US"></span><br><span style="color: hsl(120, 100%, 40%);">+ <synopsis></span><br><span style="color: hsl(120, 100%, 40%);">+ Gets the list of SIP header names from an INVITE message.</span><br><span style="color: hsl(120, 100%, 40%);">+ </synopsis></span><br><span style="color: hsl(120, 100%, 40%);">+ <syntax></span><br><span style="color: hsl(120, 100%, 40%);">+ <parameter name="prefix"></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>If specified, only the headers matching the given prefix are returned.</para></span><br><span style="color: hsl(120, 100%, 40%);">+ </parameter></span><br><span style="color: hsl(120, 100%, 40%);">+ </syntax></span><br><span style="color: hsl(120, 100%, 40%);">+ <description></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>Returns a comma-separated list of header names (without values) from the</span><br><span style="color: hsl(120, 100%, 40%);">+ INVITE message. Multiple headers with the same name are included in the list only once.</span><br><span style="color: hsl(120, 100%, 40%);">+ </para></span><br><span style="color: hsl(120, 100%, 40%);">+ <para>For example, <literal>${PJSIP_HEADERS(Co)}</literal> might return</span><br><span style="color: hsl(120, 100%, 40%);">+ <literal>Contact,Content-Length,Content-Type</literal>. As a practical example,</span><br><span style="color: hsl(120, 100%, 40%);">+ you may use <literal>${PJSIP_HEADERS(X-)}</literal> to enumerate optional extended</span><br><span style="color: hsl(120, 100%, 40%);">+ headers.</para></span><br><span style="color: hsl(120, 100%, 40%);">+ </description></span><br><span style="color: hsl(120, 100%, 40%);">+ <see-also></span><br><span style="color: hsl(120, 100%, 40%);">+ <ref type="function">PJSIP_HEADER</ref></span><br><span style="color: hsl(120, 100%, 40%);">+ </see-also></span><br><span style="color: hsl(120, 100%, 40%);">+ </function></span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> ***/</span><br><span> </span><br><span> /*! \brief Linked list for accumulating headers */</span><br><span>@@ -240,6 +269,92 @@</span><br><span> return hdr;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+/*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \internal</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Implements PJSIP_HEADERS by searching for the requested header prefix.</span><br><span style="color: hsl(120, 100%, 40%);">+ *</span><br><span style="color: hsl(120, 100%, 40%);">+ * Retrieve the header_datastore.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Search for the all matching headers.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Validate the pjsip_hdr found.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Parse pjsip_hdr into a name and copy to the buffer.</span><br><span style="color: hsl(120, 100%, 40%);">+ * Return the value.</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+static int read_headers(void *obj)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ struct header_data *data = obj;</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t len = strlen(data->header_name);</span><br><span style="color: hsl(120, 100%, 40%);">+ pjsip_hdr *hdr = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *pj_hdr_string;</span><br><span style="color: hsl(120, 100%, 40%);">+ int pj_hdr_string_len;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *p;</span><br><span style="color: hsl(120, 100%, 40%);">+ char *pos;</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t plen, wlen = 0;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct hdr_list_entry *le;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct hdr_list *list;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ RAII_VAR(struct ast_datastore *, datastore,</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_sip_session_get_datastore(data->channel->session, header_datastore.type),</span><br><span style="color: hsl(120, 100%, 40%);">+ ao2_cleanup);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!datastore || !datastore->data) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(1, "There was no datastore from which to read headers.\n");</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%);">+ list = datastore->data;</span><br><span style="color: hsl(120, 100%, 40%);">+ pj_hdr_string = ast_alloca(data->len);</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_LIST_TRAVERSE(list, le, nextptr) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (pj_strnicmp2(&le->hdr->name, data->header_name, len) == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ /* Found matched header, append to buf */</span><br><span style="color: hsl(120, 100%, 40%);">+ hdr = le->hdr;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ pj_hdr_string_len = pjsip_hdr_print_on(hdr, pj_hdr_string, data->len - 1);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (pj_hdr_string_len == -1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(AST_LOG_ERROR,</span><br><span style="color: hsl(120, 100%, 40%);">+ "Not enought buffer space in pjsip_hdr_print_on\n");</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%);">+ pj_hdr_string[pj_hdr_string_len] = '\0';</span><br><span style="color: hsl(120, 100%, 40%);">+ p = strchr(pj_hdr_string, ':');</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!p) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(AST_LOG_WARNING,</span><br><span style="color: hsl(120, 100%, 40%);">+ "A malformed header was returned from pjsip_hdr_print_on\n");</span><br><span style="color: hsl(120, 100%, 40%);">+ continue;</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%);">+ pj_hdr_string[p - pj_hdr_string] = '\0';</span><br><span style="color: hsl(120, 100%, 40%);">+ p = ast_strip(pj_hdr_string);</span><br><span style="color: hsl(120, 100%, 40%);">+ plen = strlen(p);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (wlen + plen + 1 > data->len) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(AST_LOG_ERROR,</span><br><span style="color: hsl(120, 100%, 40%);">+ "Buffer isn't big enough to hold header value. %zu > %zu\n", plen + 1,</span><br><span style="color: hsl(120, 100%, 40%);">+ data->len);</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%);">+ pos = strstr(data->buf, p);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (pos && pos[1] == ',') {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (pos == data->buf) {</span><br><span style="color: hsl(120, 100%, 40%);">+ continue;</span><br><span style="color: hsl(120, 100%, 40%);">+ } else if (pos[-1] == ',') {</span><br><span style="color: hsl(120, 100%, 40%);">+ continue;</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%);">+ ast_copy_string(data->buf + wlen, p, data->len - wlen);</span><br><span style="color: hsl(120, 100%, 40%);">+ wlen += plen;</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_copy_string(data->buf + wlen, ",", data->len - wlen);</span><br><span style="color: hsl(120, 100%, 40%);">+ wlen++;</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%);">+ if (wlen == 0) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_debug(1, "There was no header named %s.\n", data->header_name);</span><br><span style="color: hsl(120, 100%, 40%);">+ return -1;</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ data->buf[wlen-1] = '\0';</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> </span><br><span> /*!</span><br><span> * \internal</span><br><span>@@ -254,11 +369,15 @@</span><br><span> static int read_header(void *obj)</span><br><span> {</span><br><span> struct header_data *data = obj;</span><br><span style="color: hsl(120, 100%, 40%);">+ size_t len = strlen(data->header_name);</span><br><span> pjsip_hdr *hdr = NULL;</span><br><span> char *pj_hdr_string;</span><br><span style="color: hsl(0, 100%, 40%);">- size_t pj_hdr_string_len;</span><br><span style="color: hsl(120, 100%, 40%);">+ int pj_hdr_string_len;</span><br><span> char *p;</span><br><span> size_t plen;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct hdr_list_entry *le;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct hdr_list *list;</span><br><span style="color: hsl(120, 100%, 40%);">+ int i = 1;</span><br><span> RAII_VAR(struct ast_datastore *, datastore,</span><br><span> ast_sip_session_get_datastore(data->channel->session, header_datastore.type),</span><br><span> ao2_cleanup);</span><br><span>@@ -268,8 +387,20 @@</span><br><span> return -1;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- hdr = find_header((struct hdr_list *) datastore->data, data->header_name,</span><br><span style="color: hsl(0, 100%, 40%);">- data->header_number);</span><br><span style="color: hsl(120, 100%, 40%);">+ list = datastore->data;</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_LIST_TRAVERSE(list, le, nextptr) {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (data->header_name[len - 1] == '*') {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (pj_strnicmp2(&le->hdr->name, data->header_name, len - 1) == 0 && i++ == data->header_number) {</span><br><span style="color: hsl(120, 100%, 40%);">+ hdr = le->hdr;</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</span><br><span style="color: hsl(120, 100%, 40%);">+ }</span><br><span style="color: hsl(120, 100%, 40%);">+ } else {</span><br><span style="color: hsl(120, 100%, 40%);">+ if (pj_stricmp2(&le->hdr->name, data->header_name) == 0 && i++ == data->header_number) {</span><br><span style="color: hsl(120, 100%, 40%);">+ hdr = le->hdr;</span><br><span style="color: hsl(120, 100%, 40%);">+ break;</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> </span><br><span> if (!hdr) {</span><br><span> ast_debug(1, "There was no header named %s.\n", data->header_name);</span><br><span>@@ -277,7 +408,13 @@</span><br><span> }</span><br><span> </span><br><span> pj_hdr_string = ast_alloca(data->len);</span><br><span style="color: hsl(0, 100%, 40%);">- pj_hdr_string_len = pjsip_hdr_print_on(hdr, pj_hdr_string, data->len);</span><br><span style="color: hsl(120, 100%, 40%);">+ pj_hdr_string_len = pjsip_hdr_print_on(hdr, pj_hdr_string, data->len - 1);</span><br><span style="color: hsl(120, 100%, 40%);">+ if (pj_hdr_string_len == -1) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(AST_LOG_ERROR,</span><br><span style="color: hsl(120, 100%, 40%);">+ "Not enought buffer space in pjsip_hdr_print_on\n");</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> pj_hdr_string[pj_hdr_string_len] = '\0';</span><br><span> </span><br><span> p = strchr(pj_hdr_string, ':');</span><br><span>@@ -435,12 +572,43 @@</span><br><span> }</span><br><span> </span><br><span> /*!</span><br><span style="color: hsl(120, 100%, 40%);">+ * \brief Read list of unique SIP headers</span><br><span style="color: hsl(120, 100%, 40%);">+ */</span><br><span style="color: hsl(120, 100%, 40%);">+static int func_read_headers(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len)</span><br><span style="color: hsl(120, 100%, 40%);">+{</span><br><span style="color: hsl(120, 100%, 40%);">+ struct ast_sip_channel_pvt *channel = chan ? ast_channel_tech_pvt(chan) : NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ struct header_data header_data;</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_DECLARE_APP_ARGS(args,</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_APP_ARG(header_pattern);</span><br><span style="color: hsl(120, 100%, 40%);">+ );</span><br><span style="color: hsl(120, 100%, 40%);">+ AST_STANDARD_APP_ARGS(args, data);</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ if (!chan || strncmp(ast_channel_name(chan), "PJSIP/", 6)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(LOG_ERROR, "This function requires a PJSIP channel.\n");</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%);">+ if (ast_strlen_zero(args.header_pattern)) {</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_log(AST_LOG_ERROR, "This function requires a pattern.\n");</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%);">+ header_data.channel = channel;</span><br><span style="color: hsl(120, 100%, 40%);">+ header_data.header_name = args.header_pattern;</span><br><span style="color: hsl(120, 100%, 40%);">+ header_data.header_value = NULL;</span><br><span style="color: hsl(120, 100%, 40%);">+ header_data.buf = buf;</span><br><span style="color: hsl(120, 100%, 40%);">+ header_data.len = len;</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+ return ast_sip_push_task_wait_serializer(channel->session->serializer, read_headers, &header_data);</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%);">+/*!</span><br><span> * \brief Implements function 'read' callback.</span><br><span> *</span><br><span> * Valid actions are 'read' and 'remove'.</span><br><span> */</span><br><span style="color: hsl(0, 100%, 40%);">-static int func_read_header(struct ast_channel *chan, const char *function, char *data,</span><br><span style="color: hsl(0, 100%, 40%);">- char *buf, size_t len)</span><br><span style="color: hsl(120, 100%, 40%);">+static int func_read_header(struct ast_channel *chan, const char *function, char *data, char *buf, size_t len)</span><br><span> {</span><br><span> struct ast_sip_channel_pvt *channel = chan ? ast_channel_tech_pvt(chan) : NULL;</span><br><span> struct header_data header_data;</span><br><span>@@ -480,8 +648,7 @@</span><br><span> header_data.len = len;</span><br><span> </span><br><span> if (!strcasecmp(args.action, "read")) {</span><br><span style="color: hsl(0, 100%, 40%);">- return ast_sip_push_task_wait_serializer(channel->session->serializer,</span><br><span style="color: hsl(0, 100%, 40%);">- read_header, &header_data);</span><br><span style="color: hsl(120, 100%, 40%);">+ return ast_sip_push_task_wait_serializer(channel->session->serializer, read_header, &header_data);</span><br><span> } else if (!strcasecmp(args.action, "remove")) {</span><br><span> return ast_sip_push_task_wait_serializer(channel->session->serializer,</span><br><span> remove_header, &header_data);</span><br><span>@@ -561,6 +728,11 @@</span><br><span> .write = func_write_header,</span><br><span> };</span><br><span> </span><br><span style="color: hsl(120, 100%, 40%);">+static struct ast_custom_function pjsip_headers_function = {</span><br><span style="color: hsl(120, 100%, 40%);">+ .name = "PJSIP_HEADERS",</span><br><span style="color: hsl(120, 100%, 40%);">+ .read = func_read_headers</span><br><span style="color: hsl(120, 100%, 40%);">+};</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span> /*!</span><br><span> * \internal</span><br><span> * \brief Session supplement callback for outgoing INVITE requests</span><br><span>@@ -604,6 +776,7 @@</span><br><span> {</span><br><span> ast_sip_session_register_supplement(&header_funcs_supplement);</span><br><span> ast_custom_function_register(&pjsip_header_function);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_custom_function_register(&pjsip_headers_function);</span><br><span> </span><br><span> return AST_MODULE_LOAD_SUCCESS;</span><br><span> }</span><br><span>@@ -611,6 +784,7 @@</span><br><span> static int unload_module(void)</span><br><span> {</span><br><span> ast_custom_function_unregister(&pjsip_header_function);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_custom_function_unregister(&pjsip_headers_function);</span><br><span> ast_sip_session_unregister_supplement(&header_funcs_supplement);</span><br><span> return 0;</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/+/16253">change 16253</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/+/16253"/><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: Ic09d395de71a0021e0d6c5c29e1e19d689079f8b </div>
<div style="display:none"> Gerrit-Change-Number: 16253 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: Igor Goncharovsky <igor.goncharovsky@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Friendly Automation </div>
<div style="display:none"> Gerrit-Reviewer: George Joseph <gjoseph@digium.com> </div>
<div style="display:none"> Gerrit-Reviewer: Joshua Colp <jcolp@sangoma.com> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>