<p>Josh Soref has uploaded this change for <strong>review</strong>.</p><p><a href="https://gerrit.asterisk.org/c/asterisk/+/17172">View Change</a></p><pre style="font-family: monospace,monospace; white-space: pre-wrap;">spelling: right<br><br>Change-Id: Ife7aff07ddce3128472296c9a72a2b55a5052545<br>---<br>M apps/app_minivm.c<br>M apps/app_voicemail.c<br>M channels/chan_skinny.c<br>M codecs/ilbc/rfc3951.txt<br>M configs/samples/minivm.conf.sample<br>M contrib/ast-db-manage/voicemail/versions/a2e9769475e_create_tables.py<br>M include/asterisk/app.h<br>M main/pbx.c<br>M tests/test_voicemail_api.c<br>9 files changed, 75 insertions(+), 75 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;">git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/72/17172/1</pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/apps/app_minivm.c b/apps/app_minivm.c</span><br><span>index 0e5ee2e..c89f57b 100644</span><br><span>--- a/apps/app_minivm.c</span><br><span>+++ b/apps/app_minivm.c</span><br><span>@@ -2011,7 +2011,7 @@</span><br><span>                     S_COR(ast_channel_caller(chan)->id.number.valid, ast_channel_caller(chan)->id.number.str, NULL),</span><br><span>                       "Unknown");</span><br><span>                snprintf(logbuf, sizeof(logbuf),</span><br><span style="color: hsl(0, 100%, 40%);">-                        /* "Mailbox:domain:macrocontext:exten:priority:callerchan:callerid:origdate:origtime:duration:durationstatus:accountcode" */</span><br><span style="color: hsl(120, 100%, 40%);">+                        /* "Mailbox:domain:macrocontext:exten:priority:callerchan:callerid:origdate:orightime:duration:durationstatus:accountcode" */</span><br><span>                      "%s:%s:%s:%s:%d:%s:%s:%s:%s:%d:%s:%s\n",</span><br><span>                   username,</span><br><span>                    ast_channel_context(chan),</span><br><span>diff --git a/apps/app_voicemail.c b/apps/app_voicemail.c</span><br><span>index dc0520d..3f2e904 100644</span><br><span>--- a/apps/app_voicemail.c</span><br><span>+++ b/apps/app_voicemail.c</span><br><span>@@ -2390,7 +2390,7 @@</span><br><span>              fprintf(text_file_ptr, "context=%s\n", S_OR(buf, ""));</span><br><span>   }</span><br><span>    if (get_header_by_tag(header_content, "X-Asterisk-VM-Orig-time:", buf, sizeof(buf))) {</span><br><span style="color: hsl(0, 100%, 40%);">-                fprintf(text_file_ptr, "origtime=%s\n", S_OR(buf, ""));</span><br><span style="color: hsl(120, 100%, 40%);">+           fprintf(text_file_ptr, "orightime=%s\n", S_OR(buf, ""));</span><br><span>         }</span><br><span>    if (get_header_by_tag(header_content, "X-Asterisk-VM-Duration:", buf, sizeof(buf))) {</span><br><span>              fprintf(text_file_ptr, "duration=%s\n", S_OR(buf, ""));</span><br><span>@@ -4246,7 +4246,7 @@</span><br><span> </span><br><span>      snprintf(msgnums, sizeof(msgnums), "%d", smsg);</span><br><span>    snprintf(msgnumd, sizeof(msgnumd), "%d", dmsg);</span><br><span style="color: hsl(0, 100%, 40%);">-       snprintf(sql, sizeof(sql), "INSERT INTO %s (dir, msgnum, msg_id, context, macrocontext, callerid, origtime, duration, recording, flag, mailboxuser, mailboxcontext) SELECT ?,?,?,context,macrocontext,callerid,origtime,duration,recording,flag,?,? FROM %s WHERE dir=? AND msgnum=?", odbc_table, odbc_table);</span><br><span style="color: hsl(120, 100%, 40%);">+     snprintf(sql, sizeof(sql), "INSERT INTO %s (dir, msgnum, msg_id, context, macrocontext, callerid, orightime, duration, recording, flag, mailboxuser, mailboxcontext) SELECT ?,?,?,context,macrocontext,callerid,orightime,duration,recording,flag,?,? FROM %s WHERE dir=? AND msgnum=?", odbc_table, odbc_table);</span><br><span>  stmt = ast_odbc_prepare_and_execute(obj, generic_prepare, &gps);</span><br><span>         if (!stmt)</span><br><span>           ast_log(AST_LOG_WARNING, "SQL Execute error!\n[%s] (You probably don't have MySQL 4.1 or later installed)\n\n", sql);</span><br><span>@@ -4267,7 +4267,7 @@</span><br><span>  const char *context;</span><br><span>         const char *macrocontext;</span><br><span>    const char *callerid;</span><br><span style="color: hsl(0, 100%, 40%);">-   const char *origtime;</span><br><span style="color: hsl(120, 100%, 40%);">+ const char *orightime;</span><br><span>       const char *duration;</span><br><span>        const char *mailboxuser;</span><br><span>     const char *mailboxcontext;</span><br><span>@@ -4294,7 +4294,7 @@</span><br><span>  SQLBindParameter(stmt, 4, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->context), 0, (void *) data->context, 0, NULL);</span><br><span>   SQLBindParameter(stmt, 5, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->macrocontext), 0, (void *) data->macrocontext, 0, NULL);</span><br><span>         SQLBindParameter(stmt, 6, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->callerid), 0, (void *) data->callerid, 0, NULL);</span><br><span style="color: hsl(0, 100%, 40%);">-    SQLBindParameter(stmt, 7, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->origtime), 0, (void *) data->origtime, 0, NULL);</span><br><span style="color: hsl(120, 100%, 40%);">+  SQLBindParameter(stmt, 7, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->orightime), 0, (void *) data->orightime, 0, NULL);</span><br><span>       SQLBindParameter(stmt, 8, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->duration), 0, (void *) data->duration, 0, NULL);</span><br><span>         SQLBindParameter(stmt, 9, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->mailboxuser), 0, (void *) data->mailboxuser, 0, NULL);</span><br><span>   SQLBindParameter(stmt, 10, SQL_PARAM_INPUT, SQL_C_CHAR, SQL_CHAR, strlen(data->mailboxcontext), 0, (void *) data->mailboxcontext, 0, NULL);</span><br><span>@@ -4342,7 +4342,7 @@</span><br><span>    struct ast_config *cfg = NULL;</span><br><span>       struct odbc_obj *obj;</span><br><span>        struct insert_data idata = { .sql = sql, .msgnums = msgnums, .dir = dir, .mailboxuser = mailboxuser, .mailboxcontext = mailboxcontext,</span><br><span style="color: hsl(0, 100%, 40%);">-          .context = "", .macrocontext = "", .callerid = "", .origtime = "", .duration = "", .category = "", .flag = "", .msg_id = "" };</span><br><span style="color: hsl(120, 100%, 40%);">+                .context = "", .macrocontext = "", .callerid = "", .orightime = "", .duration = "", .category = "", .flag = "", .msg_id = "" };</span><br><span>      struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };</span><br><span> </span><br><span>         delete_file(dir, msgnum);</span><br><span>@@ -4384,8 +4384,8 @@</span><br><span>                    if (!(idata.callerid = ast_variable_retrieve(cfg, "message", "callerid"))) {</span><br><span>                             idata.callerid = "";</span><br><span>                       }</span><br><span style="color: hsl(0, 100%, 40%);">-                       if (!(idata.origtime = ast_variable_retrieve(cfg, "message", "origtime"))) {</span><br><span style="color: hsl(0, 100%, 40%);">-                                idata.origtime = "";</span><br><span style="color: hsl(120, 100%, 40%);">+                        if (!(idata.orightime = ast_variable_retrieve(cfg, "message", "orightime"))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                            idata.orightime = "";</span><br><span>                      }</span><br><span>                    if (!(idata.duration = ast_variable_retrieve(cfg, "message", "duration"))) {</span><br><span>                             idata.duration = "";</span><br><span>@@ -4416,12 +4416,12 @@</span><br><span>             idata.datalen = idata.indlen = fdlen;</span><br><span> </span><br><span>            if (!ast_strlen_zero(idata.category))</span><br><span style="color: hsl(0, 100%, 40%);">-                   snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext,flag,msg_id,category) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)", odbc_table);</span><br><span style="color: hsl(120, 100%, 40%);">+                 snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,orightime,duration,mailboxuser,mailboxcontext,flag,msg_id,category) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?)", odbc_table);</span><br><span>               else</span><br><span style="color: hsl(0, 100%, 40%);">-                    snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,origtime,duration,mailboxuser,mailboxcontext,flag,msg_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)", odbc_table);</span><br><span style="color: hsl(120, 100%, 40%);">+                    snprintf(sql, sizeof(sql), "INSERT INTO %s (dir,msgnum,recording,context,macrocontext,callerid,orightime,duration,mailboxuser,mailboxcontext,flag,msg_id) VALUES (?,?,?,?,?,?,?,?,?,?,?,?)", odbc_table);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-         if (ast_strlen_zero(idata.origtime)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                  idata.origtime = "0";</span><br><span style="color: hsl(120, 100%, 40%);">+               if (ast_strlen_zero(idata.orightime)) {</span><br><span style="color: hsl(120, 100%, 40%);">+                       idata.orightime = "0";</span><br><span>             }</span><br><span> </span><br><span>                if (ast_strlen_zero(idata.duration)) {</span><br><span>@@ -4704,7 +4704,7 @@</span><br><span>       struct ast_variable *tmp, *var = NULL;</span><br><span>       const char *origmailbox = "", *context = "", *macrocontext = "", *exten = "";</span><br><span>        const char *priority = "", *callerchan = "", *callerid = "", *origdate = "";</span><br><span style="color: hsl(0, 100%, 40%);">-    const char *origtime = "", *category = "", *duration = "";</span><br><span style="color: hsl(120, 100%, 40%);">+      const char *orightime = "", *category = "", *duration = "";</span><br><span> </span><br><span>        ast_filecopy(frompath, topath, NULL);</span><br><span>        snprintf(frompath2, sizeof(frompath2), "%s.txt", frompath);</span><br><span>@@ -4730,15 +4730,15 @@</span><br><span>                              callerid = tmp->value;</span><br><span>                    } else if (!strcasecmp(tmp->name, "origdate")) {</span><br><span>                                origdate = tmp->value;</span><br><span style="color: hsl(0, 100%, 40%);">-                       } else if (!strcasecmp(tmp->name, "origtime")) {</span><br><span style="color: hsl(0, 100%, 40%);">-                           origtime = tmp->value;</span><br><span style="color: hsl(120, 100%, 40%);">+                     } else if (!strcasecmp(tmp->name, "orightime")) {</span><br><span style="color: hsl(120, 100%, 40%);">+                                orightime = tmp->value;</span><br><span>                   } else if (!strcasecmp(tmp->name, "category")) {</span><br><span>                                category = tmp->value;</span><br><span>                    } else if (!strcasecmp(tmp->name, "duration")) {</span><br><span>                                duration = tmp->value;</span><br><span>                    }</span><br><span>            }</span><br><span style="color: hsl(0, 100%, 40%);">-               ast_store_realtime("voicemail_data", "filename", topath, "origmailbox", origmailbox, "context", context, "macrocontext", macrocontext, "exten", exten, "priority", priority, "callerchan", callerchan, "callerid", callerid, "origdate", origdate, "origtime", origtime, "category", category, "duration", duration, SENTINEL);</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_store_realtime("voicemail_data", "filename", topath, "origmailbox", origmailbox, "context", context, "macrocontext", macrocontext, "exten", exten, "priority", priority, "callerchan", callerchan, "callerid", callerid, "origdate", origdate, "orightime", orightime, "category", category, "duration", duration, SENTINEL);</span><br><span>  }</span><br><span>    copy(frompath2, topath2);</span><br><span>    ast_variables_destroy(var);</span><br><span>@@ -4905,7 +4905,7 @@</span><br><span>  char num[12];</span><br><span>        char fromdir[256], fromfile[256];</span><br><span>    struct ast_config *msg_cfg;</span><br><span style="color: hsl(0, 100%, 40%);">-     const char *origcallerid, *origtime;</span><br><span style="color: hsl(120, 100%, 40%);">+  const char *origcallerid, *orightime;</span><br><span>        char origcidname[80], origcidnum[80], origdate[80];</span><br><span>  int inttime;</span><br><span>         struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };</span><br><span>@@ -4943,7 +4943,7 @@</span><br><span>             pbx_builtin_setvar_helper(ast, "ORIG_VM_CIDNUM", origcidnum);</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if ((origtime = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(origtime, "%30d", &inttime) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+        if ((orightime = ast_variable_retrieve(msg_cfg, "message", "orightime")) && sscanf(orightime, "%30d", &inttime) == 1) {</span><br><span>            struct timeval tv = { inttime, };</span><br><span>            struct ast_tm tm;</span><br><span>            ast_localtime(&tv, &tm, NULL);</span><br><span>@@ -5344,7 +5344,7 @@</span><br><span> </span><br><span>                           /* You might be tempted to do origdate, except that a) it's in the wrong</span><br><span>                                  * format, and b) it's missing for IMAP recordings. */</span><br><span style="color: hsl(0, 100%, 40%);">-                              if ((v = ast_variable_retrieve(msg_cfg, "message", "origtime")) && sscanf(v, "%30d", &inttime) == 1) {</span><br><span style="color: hsl(120, 100%, 40%);">+                              if ((v = ast_variable_retrieve(msg_cfg, "message", "orightime")) && sscanf(v, "%30d", &inttime) == 1) {</span><br><span>                                    struct timeval tv = { inttime, };</span><br><span>                                    struct ast_tm tm;</span><br><span>                                    ast_localtime(&tv, &tm, NULL);</span><br><span>@@ -6424,7 +6424,7 @@</span><br><span>                       "callerchan=%s\n"</span><br><span>                  "callerid=%s\n"</span><br><span>                    "origdate=%s\n"</span><br><span style="color: hsl(0, 100%, 40%);">-                       "origtime=%ld\n"</span><br><span style="color: hsl(120, 100%, 40%);">+                    "orightime=%ld\n"</span><br><span>                  "category=%s\n"</span><br><span>                    "msg_id=%s\n"</span><br><span>                      "flag=\n" /* flags not supported in copy from file yet */</span><br><span>@@ -6579,7 +6579,7 @@</span><br><span>                          "callerchan", S_OR(recdata->call_callerchan, "Unknown"),</span><br><span>                              "callerid", S_OR(recdata->call_callerid, "Unknown"),</span><br><span>                          "origdate", date,</span><br><span style="color: hsl(0, 100%, 40%);">-                             "origtime", time(NULL),</span><br><span style="color: hsl(120, 100%, 40%);">+                             "orightime", time(NULL),</span><br><span>                           "category", S_OR(category, ""),</span><br><span>                          "filename", tmptxtfile,</span><br><span>                            "duration", duration,</span><br><span>@@ -6627,7 +6627,7 @@</span><br><span>      int greeting_only = 0;</span><br><span>       char tmpdur[16];</span><br><span>     char priority[16];</span><br><span style="color: hsl(0, 100%, 40%);">-      char origtime[16];</span><br><span style="color: hsl(120, 100%, 40%);">+    char orightime[16];</span><br><span>  char dir[PATH_MAX];</span><br><span>  char tmpdir[PATH_MAX];</span><br><span>       char fn[PATH_MAX];</span><br><span>@@ -6969,7 +6969,7 @@</span><br><span>           /* Store information in real-time storage */</span><br><span>                 if (ast_check_realtime("voicemail_data")) {</span><br><span>                        snprintf(priority, sizeof(priority), "%d", ast_channel_priority(chan));</span><br><span style="color: hsl(0, 100%, 40%);">-                       snprintf(origtime, sizeof(origtime), "%ld", (long) time(NULL));</span><br><span style="color: hsl(120, 100%, 40%);">+                     snprintf(orightime, sizeof(orightime), "%ld", (long) time(NULL));</span><br><span>                  get_date(date, sizeof(date));</span><br><span>                        ast_callerid_merge(callerid, sizeof(callerid),</span><br><span>                               S_COR(ast_channel_caller(chan)->id.name.valid, ast_channel_caller(chan)->id.name.str, NULL),</span><br><span>@@ -6984,7 +6984,7 @@</span><br><span>                           "callerchan", ast_channel_name(chan),</span><br><span>                              "callerid", callerid,</span><br><span>                              "origdate", date,</span><br><span style="color: hsl(0, 100%, 40%);">-                             "origtime", origtime,</span><br><span style="color: hsl(120, 100%, 40%);">+                               "orightime", orightime,</span><br><span>                            "category", S_OR(category, ""),</span><br><span>                          "filename", tmptxtfile,</span><br><span>                            SENTINEL);</span><br><span>@@ -7013,7 +7013,7 @@</span><br><span>                           "callerchan=%s\n"</span><br><span>                          "callerid=%s\n"</span><br><span>                            "origdate=%s\n"</span><br><span style="color: hsl(0, 100%, 40%);">-                               "origtime=%ld\n"</span><br><span style="color: hsl(120, 100%, 40%);">+                            "orightime=%ld\n"</span><br><span>                          "category=%s\n"</span><br><span>                            "msg_id=%s\n",</span><br><span>                             ext,</span><br><span>@@ -8648,14 +8648,14 @@</span><br><span>       return res;</span><br><span> }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *vmu, const char *origtime, const char *filename)</span><br><span style="color: hsl(120, 100%, 40%);">+static int play_message_datetime(struct ast_channel *chan, struct ast_vm_user *vmu, const char *orightime, const char *filename)</span><br><span> {</span><br><span>   int res = 0;</span><br><span>         struct vm_zone *the_zone = NULL;</span><br><span>     time_t t;</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if (ast_get_time_t(origtime, &t, 0, NULL)) {</span><br><span style="color: hsl(0, 100%, 40%);">-                ast_log(AST_LOG_WARNING, "Couldn't find origtime in %s\n", filename);</span><br><span style="color: hsl(120, 100%, 40%);">+   if (ast_get_time_t(orightime, &t, 0, NULL)) {</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_log(AST_LOG_WARNING, "Couldn't find orightime in %s\n", filename);</span><br><span>                 return 0;</span><br><span>    }</span><br><span> </span><br><span>@@ -8857,7 +8857,7 @@</span><br><span> {</span><br><span>   int res = 0;</span><br><span>         char filename[PATH_MAX], *cid;</span><br><span style="color: hsl(0, 100%, 40%);">-  const char *origtime, *context, *category, *duration, *flag;</span><br><span style="color: hsl(120, 100%, 40%);">+  const char *orightime, *context, *category, *duration, *flag;</span><br><span>        struct ast_config *msg_cfg;</span><br><span>  struct ast_flags config_flags = { CONFIG_FLAG_NOCACHE };</span><br><span> </span><br><span>@@ -8962,8 +8962,8 @@</span><br><span>                 return 0;</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime"))) {</span><br><span style="color: hsl(0, 100%, 40%);">-          ast_log(AST_LOG_WARNING, "No origtime?!\n");</span><br><span style="color: hsl(120, 100%, 40%);">+        if (!(orightime = ast_variable_retrieve(msg_cfg, "message", "orightime"))) {</span><br><span style="color: hsl(120, 100%, 40%);">+              ast_log(AST_LOG_WARNING, "No orightime?!\n");</span><br><span>              DISPOSE(vms->curdir, vms->curmsg);</span><br><span>             ast_config_destroy(msg_cfg);</span><br><span>                 return 0;</span><br><span>@@ -8980,7 +8980,7 @@</span><br><span>            res = play_message_category(chan, category);</span><br><span>         }</span><br><span>    if ((!res) && (ast_test_flag(vmu, VM_ENVELOPE))) {</span><br><span style="color: hsl(0, 100%, 40%);">-              res = play_message_datetime(chan, vmu, origtime, filename);</span><br><span style="color: hsl(120, 100%, 40%);">+           res = play_message_datetime(chan, vmu, orightime, filename);</span><br><span>         }</span><br><span>    if ((!res) && (ast_test_flag(vmu, VM_SAYCID))) {</span><br><span>             res = play_message_callerid(chan, vms, cid, context, 0, 0);</span><br><span>@@ -15320,7 +15320,7 @@</span><br><span>        int res = 0;</span><br><span>         char filename[PATH_MAX];</span><br><span>     struct ast_config *msg_cfg = NULL;</span><br><span style="color: hsl(0, 100%, 40%);">-      const char *origtime, *context;</span><br><span style="color: hsl(120, 100%, 40%);">+       const char *orightime, *context;</span><br><span>     char *name, *num;</span><br><span>    int retries = 0;</span><br><span>     char *cid;</span><br><span>@@ -15340,7 +15340,7 @@</span><br><span>                 return 0;</span><br><span>    }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if (!(origtime = ast_variable_retrieve(msg_cfg, "message", "origtime"))) {</span><br><span style="color: hsl(120, 100%, 40%);">+        if (!(orightime = ast_variable_retrieve(msg_cfg, "message", "orightime"))) {</span><br><span>             ast_config_destroy(msg_cfg);</span><br><span>                 return 0;</span><br><span>    }</span><br><span>@@ -15353,7 +15353,7 @@</span><br><span>  switch (option) {</span><br><span>    case 3: /* Play message envelope */</span><br><span>          if (!res) {</span><br><span style="color: hsl(0, 100%, 40%);">-                     res = play_message_datetime(chan, vmu, origtime, filename);</span><br><span style="color: hsl(120, 100%, 40%);">+                   res = play_message_datetime(chan, vmu, orightime, filename);</span><br><span>                 }</span><br><span>            if (!res) {</span><br><span>                  res = play_message_callerid(chan, vms, cid, context, 0, 1);</span><br><span>@@ -15887,8 +15887,8 @@</span><br><span>                if ((value = ast_variable_retrieve(msg_cfg, "message", "origdate"))) {</span><br><span>                   ast_string_field_set(msg_snapshot, origdate, value);</span><br><span>                 }</span><br><span style="color: hsl(0, 100%, 40%);">-               if ((value = ast_variable_retrieve(msg_cfg, "message", "origtime"))) {</span><br><span style="color: hsl(0, 100%, 40%);">-                      ast_string_field_set(msg_snapshot, origtime, value);</span><br><span style="color: hsl(120, 100%, 40%);">+          if ((value = ast_variable_retrieve(msg_cfg, "message", "orightime"))) {</span><br><span style="color: hsl(120, 100%, 40%);">+                   ast_string_field_set(msg_snapshot, orightime, value);</span><br><span>                }</span><br><span>            if ((value = ast_variable_retrieve(msg_cfg, "message", "duration"))) {</span><br><span>                   ast_string_field_set(msg_snapshot, duration, value);</span><br><span>@@ -15912,7 +15912,7 @@</span><br><span>                       break;</span><br><span>               case AST_VM_SNAPSHOT_SORT_BY_TIME:</span><br><span>                   AST_LIST_TRAVERSE_SAFE_BEGIN(&mailbox_snapshot->snapshots[snapshot_index], msg_snapshot_tmp, msg) {</span><br><span style="color: hsl(0, 100%, 40%);">-                              int val = strcmp(msg_snapshot->origtime, msg_snapshot_tmp->origtime);</span><br><span style="color: hsl(120, 100%, 40%);">+                           int val = strcmp(msg_snapshot->orightime, msg_snapshot_tmp->orightime);</span><br><span>                                if (descending && val >= 0) {</span><br><span>                                     AST_LIST_INSERT_BEFORE_CURRENT(msg_snapshot, msg);</span><br><span>                                   inserted = 1;</span><br><span>diff --git a/channels/chan_skinny.c b/channels/chan_skinny.c</span><br><span>index 5b95026..66a6f2b 100644</span><br><span>--- a/channels/chan_skinny.c</span><br><span>+++ b/channels/chan_skinny.c</span><br><span>@@ -1411,8 +1411,8 @@</span><br><span>   int cfwd_sched;</span><br><span>      int dialType;</span><br><span>        int getforward;</span><br><span style="color: hsl(0, 100%, 40%);">- char *origtonum;</span><br><span style="color: hsl(0, 100%, 40%);">-        char *origtoname;</span><br><span style="color: hsl(120, 100%, 40%);">+     char *orightonum;</span><br><span style="color: hsl(120, 100%, 40%);">+     char *orightoname;</span><br><span> </span><br><span>       AST_LIST_ENTRY(skinny_subchannel) list;</span><br><span>      struct skinny_subchannel *related;</span><br><span>@@ -2466,7 +2466,7 @@</span><br><span> </span><br><span> //static void transmit_callinfo(struct skinny_subchannel *sub)</span><br><span> static void transmit_callinfo(struct skinny_device *d, int instance, int callid,</span><br><span style="color: hsl(0, 100%, 40%);">-    char *fromname, char *fromnum, char *toname, char *tonum, int calldirection, char *origtonum, char *origtoname)</span><br><span style="color: hsl(120, 100%, 40%);">+       char *fromname, char *fromnum, char *toname, char *tonum, int calldirection, char *orightonum, char *orightoname)</span><br><span> {</span><br><span>       struct skinny_req *req;</span><br><span> </span><br><span>@@ -2477,24 +2477,24 @@</span><br><span>        ast_copy_string(req->data.callinfo.callingParty, fromnum, sizeof(req->data.callinfo.callingParty));</span><br><span>    ast_copy_string(req->data.callinfo.calledPartyName, toname, sizeof(req->data.callinfo.calledPartyName));</span><br><span>       ast_copy_string(req->data.callinfo.calledParty, tonum, sizeof(req->data.callinfo.calledParty));</span><br><span style="color: hsl(0, 100%, 40%);">-   if (origtoname) {</span><br><span style="color: hsl(0, 100%, 40%);">-               ast_copy_string(req->data.callinfo.originalCalledPartyName, origtoname, sizeof(req->data.callinfo.originalCalledPartyName));</span><br><span style="color: hsl(120, 100%, 40%);">+    if (orightoname) {</span><br><span style="color: hsl(120, 100%, 40%);">+            ast_copy_string(req->data.callinfo.originalCalledPartyName, orightoname, sizeof(req->data.callinfo.originalCalledPartyName));</span><br><span>  }</span><br><span style="color: hsl(0, 100%, 40%);">-       if (origtonum) {</span><br><span style="color: hsl(0, 100%, 40%);">-                ast_copy_string(req->data.callinfo.originalCalledParty, origtonum, sizeof(req->data.callinfo.originalCalledParty));</span><br><span style="color: hsl(120, 100%, 40%);">+     if (orightonum) {</span><br><span style="color: hsl(120, 100%, 40%);">+             ast_copy_string(req->data.callinfo.originalCalledParty, orightonum, sizeof(req->data.callinfo.originalCalledParty));</span><br><span>   }</span><br><span> </span><br><span>        req->data.callinfo.instance = htolel(instance);</span><br><span>   req->data.callinfo.reference = htolel(callid);</span><br><span>    req->data.callinfo.type = htolel(calldirection);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">- SKINNY_DEBUG(DEBUG_PACKET, 3, "Transmitting CALL_INFO_MESSAGE to %s, to %s(%s) from %s(%s), origto %s(%s) (dir=%d) on %s(%d)\n",</span><br><span style="color: hsl(0, 100%, 40%);">-              d->name, toname, tonum, fromname, fromnum, origtoname, origtonum, calldirection, d->name, instance);</span><br><span style="color: hsl(120, 100%, 40%);">+    SKINNY_DEBUG(DEBUG_PACKET, 3, "Transmitting CALL_INFO_MESSAGE to %s, to %s(%s) from %s(%s), orighto %s(%s) (dir=%d) on %s(%d)\n",</span><br><span style="color: hsl(120, 100%, 40%);">+           d->name, toname, tonum, fromname, fromnum, orightoname, orightonum, calldirection, d->name, instance);</span><br><span>         transmit_response(d, req);</span><br><span> }</span><br><span> </span><br><span> static void transmit_callinfo_variable(struct skinny_device *d, int instance, int callreference,</span><br><span style="color: hsl(0, 100%, 40%);">- char *fromname, char *fromnum, char *toname, char *tonum, int calldirection, char *origtonum, char *origtoname)</span><br><span style="color: hsl(120, 100%, 40%);">+       char *fromname, char *fromnum, char *toname, char *tonum, int calldirection, char *orightonum, char *orightoname)</span><br><span> {</span><br><span>       struct skinny_req *req;</span><br><span>      char *strptr;</span><br><span>@@ -2519,7 +2519,7 @@</span><br><span>        thestrings[1] = "";                     /* Appears to be origfrom */</span><br><span>       if (calldirection == SKINNY_OUTGOING) {</span><br><span>              thestrings[2] = tonum;</span><br><span style="color: hsl(0, 100%, 40%);">-          thestrings[3] = origtonum;</span><br><span style="color: hsl(120, 100%, 40%);">+            thestrings[3] = orightonum;</span><br><span>  } else {</span><br><span>             thestrings[2] = "";</span><br><span>                thestrings[3] = "";</span><br><span>@@ -2532,7 +2532,7 @@</span><br><span>        thestrings[8] = "";</span><br><span>        thestrings[9] = fromname;</span><br><span>    thestrings[10] = toname;</span><br><span style="color: hsl(0, 100%, 40%);">-        thestrings[11] = origtoname;</span><br><span style="color: hsl(120, 100%, 40%);">+  thestrings[11] = orightoname;</span><br><span>        thestrings[12] = "";</span><br><span> </span><br><span>   strptr = req->data.callinfomessagevariable.calldetails;</span><br><span>@@ -2551,8 +2551,8 @@</span><br><span> </span><br><span>       req->len = req->len - (callinfostrleft & ~0x3);</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   SKINNY_DEBUG(DEBUG_PACKET, 3, "Transmitting CALL_INFO_MESSAGE_VARIABLE to %s, to %s(%s) from %s(%s), origto %s(%s) (dir=%d) on %s(%d)\n",</span><br><span style="color: hsl(0, 100%, 40%);">-             d->name, toname, tonum, fromname, fromnum, origtoname, origtonum, calldirection, d->name, instance);</span><br><span style="color: hsl(120, 100%, 40%);">+    SKINNY_DEBUG(DEBUG_PACKET, 3, "Transmitting CALL_INFO_MESSAGE_VARIABLE to %s, to %s(%s) from %s(%s), orighto %s(%s) (dir=%d) on %s(%d)\n",</span><br><span style="color: hsl(120, 100%, 40%);">+          d->name, toname, tonum, fromname, fromnum, orightoname, orightonum, calldirection, d->name, instance);</span><br><span>         transmit_response(d, req);</span><br><span> }</span><br><span> </span><br><span>@@ -2597,9 +2597,9 @@</span><br><span>  }</span><br><span> </span><br><span>        if (d->protocolversion < 17) {</span><br><span style="color: hsl(0, 100%, 40%);">-            transmit_callinfo(d, l->instance, sub->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->origtonum, sub->origtoname);</span><br><span style="color: hsl(120, 100%, 40%);">+         transmit_callinfo(d, l->instance, sub->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->orightonum, sub->orightoname);</span><br><span>      } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                transmit_callinfo_variable(d, l->instance, sub->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->origtonum, sub->origtoname);</span><br><span style="color: hsl(120, 100%, 40%);">+                transmit_callinfo_variable(d, l->instance, sub->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->orightonum, sub->orightoname);</span><br><span>     }</span><br><span> }</span><br><span> </span><br><span>@@ -2644,9 +2644,9 @@</span><br><span>   }</span><br><span> </span><br><span>        if (d->protocolversion < 17) {</span><br><span style="color: hsl(0, 100%, 40%);">-            transmit_callinfo(subline->line->device, subline->line->instance, subline->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->origtonum, sub->origtoname);</span><br><span style="color: hsl(120, 100%, 40%);">+            transmit_callinfo(subline->line->device, subline->line->instance, subline->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->orightonum, sub->orightoname);</span><br><span>         } else {</span><br><span style="color: hsl(0, 100%, 40%);">-                transmit_callinfo_variable(subline->line->device, subline->line->instance, subline->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->origtonum, sub->origtoname);</span><br><span style="color: hsl(120, 100%, 40%);">+           transmit_callinfo_variable(subline->line->device, subline->line->instance, subline->callid, fromname, fromnum, toname, tonum, sub->calldirection, sub->orightonum, sub->orightoname);</span><br><span>        }</span><br><span> }</span><br><span> </span><br><span>@@ -3535,11 +3535,11 @@</span><br><span>                 return;</span><br><span>      }</span><br><span> </span><br><span style="color: hsl(0, 100%, 40%);">-   if (sub->calldirection == SKINNY_OUTGOING && !sub->origtonum) {</span><br><span style="color: hsl(0, 100%, 40%);">-           /* Do not set origtonum before here or origtoname won't be set */</span><br><span style="color: hsl(0, 100%, 40%);">-           sub->origtonum = ast_strdup(sub->exten);</span><br><span style="color: hsl(120, 100%, 40%);">+        if (sub->calldirection == SKINNY_OUTGOING && !sub->orightonum) {</span><br><span style="color: hsl(120, 100%, 40%);">+                /* Do not set orightonum before here or orightoname won't be set */</span><br><span style="color: hsl(120, 100%, 40%);">+               sub->orightonum = ast_strdup(sub->exten);</span><br><span>              if (ast_channel_connected(c)->id.name.valid) {</span><br><span style="color: hsl(0, 100%, 40%);">-                       sub->origtoname = ast_strdup(ast_channel_connected(c)->id.name.str);</span><br><span style="color: hsl(120, 100%, 40%);">+                    sub->orightoname = ast_strdup(ast_channel_connected(c)->id.name.str);</span><br><span>          }</span><br><span>    }</span><br><span> </span><br><span>@@ -5003,8 +5003,8 @@</span><br><span>        skinny_set_owner(sub, NULL);</span><br><span>         ast_channel_tech_pvt_set(ast, NULL);</span><br><span>         destroy_rtp(sub);</span><br><span style="color: hsl(0, 100%, 40%);">-       ast_free(sub->origtonum);</span><br><span style="color: hsl(0, 100%, 40%);">-    ast_free(sub->origtoname);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_free(sub->orightonum);</span><br><span style="color: hsl(120, 100%, 40%);">+ ast_free(sub->orightoname);</span><br><span>       ast_free(sub);</span><br><span>       ast_module_unref(ast_module_info->self);</span><br><span>  return 0;</span><br><span>diff --git a/codecs/ilbc/rfc3951.txt b/codecs/ilbc/rfc3951.txt</span><br><span>index 7883f3a..de8a65b 100644</span><br><span>--- a/codecs/ilbc/rfc3951.txt</span><br><span>+++ b/codecs/ilbc/rfc3951.txt</span><br><span>@@ -10715,7 +10715,7 @@</span><br><span> </span><br><span>    Alan Duric</span><br><span>    Telio AS</span><br><span style="color: hsl(0, 100%, 40%);">-   Stoperigt. 2</span><br><span style="color: hsl(120, 100%, 40%);">+   Stoperight. 2</span><br><span>    Oslo, N-0250</span><br><span>    Norway</span><br><span> </span><br><span>diff --git a/configs/samples/minivm.conf.sample b/configs/samples/minivm.conf.sample</span><br><span>index b7f3810..9291aaa 100644</span><br><span>--- a/configs/samples/minivm.conf.sample</span><br><span>+++ b/configs/samples/minivm.conf.sample</span><br><span>@@ -34,7 +34,7 @@</span><br><span> ;</span><br><span> ;Turn on logfile with the following syntax. One line per voicemail received</span><br><span> ;with minivmRecord()</span><br><span style="color: hsl(0, 100%, 40%);">-; Mailbox:domain:macrocontext:exten:priority:callerchan:callerid:origdate:origtime:duration:durationstatus:accountcode</span><br><span style="color: hsl(120, 100%, 40%);">+; Mailbox:domain:macrocontext:exten:priority:callerchan:callerid:origdate:orightime:duration:durationstatus:accountcode</span><br><span> ;logfile=/var/log/asterisk/minivm.log</span><br><span> ; Who the e-mail notification should appear to come from</span><br><span> serveremail=asterisk</span><br><span>diff --git a/contrib/ast-db-manage/voicemail/versions/a2e9769475e_create_tables.py b/contrib/ast-db-manage/voicemail/versions/a2e9769475e_create_tables.py</span><br><span>index 3dc4d47..aebcaaa 100644</span><br><span>--- a/contrib/ast-db-manage/voicemail/versions/a2e9769475e_create_tables.py</span><br><span>+++ b/contrib/ast-db-manage/voicemail/versions/a2e9769475e_create_tables.py</span><br><span>@@ -40,7 +40,7 @@</span><br><span>         sa.Column('context', sa.String(80)),</span><br><span>         sa.Column('macrocontext', sa.String(80)),</span><br><span>         sa.Column('callerid', sa.String(80)),</span><br><span style="color: hsl(0, 100%, 40%);">-        sa.Column('origtime', sa.Integer),</span><br><span style="color: hsl(120, 100%, 40%);">+        sa.Column('orightime', sa.Integer),</span><br><span>         sa.Column('duration', sa.Integer),</span><br><span>         sa.Column('recording', sa.LargeBinary),</span><br><span>         sa.Column('flag', sa.String(30)),</span><br><span>diff --git a/include/asterisk/app.h b/include/asterisk/app.h</span><br><span>index 560f852..fa5543c 100644</span><br><span>--- a/include/asterisk/app.h</span><br><span>+++ b/include/asterisk/app.h</span><br><span>@@ -321,7 +321,7 @@</span><br><span>            AST_STRING_FIELD(callerchan);</span><br><span>                AST_STRING_FIELD(exten);</span><br><span>             AST_STRING_FIELD(origdate);</span><br><span style="color: hsl(0, 100%, 40%);">-             AST_STRING_FIELD(origtime);</span><br><span style="color: hsl(120, 100%, 40%);">+           AST_STRING_FIELD(orightime);</span><br><span>                 AST_STRING_FIELD(duration);</span><br><span>          AST_STRING_FIELD(folder_name);</span><br><span>               AST_STRING_FIELD(flag);</span><br><span>diff --git a/main/pbx.c b/main/pbx.c</span><br><span>index cfc6059..e64872b 100644</span><br><span>--- a/main/pbx.c</span><br><span>+++ b/main/pbx.c</span><br><span>@@ -4891,7 +4891,7 @@</span><br><span> }</span><br><span> </span><br><span> /*!</span><br><span style="color: hsl(0, 100%, 40%);">- * \note This function locks contexts list by &conlist, search for the rigt context</span><br><span style="color: hsl(120, 100%, 40%);">+ * \note This function locks contexts list by &conlist, search for the right context</span><br><span>  * structure, leave context list locked and call ast_context_remove_switch2</span><br><span>  * which removes switch, unlock contexts list and return ...</span><br><span>  */</span><br><span>diff --git a/tests/test_voicemail_api.c b/tests/test_voicemail_api.c</span><br><span>index faf99bc..7767f7f 100644</span><br><span>--- a/tests/test_voicemail_api.c</span><br><span>+++ b/tests/test_voicemail_api.c</span><br><span>@@ -158,7 +158,7 @@</span><br><span>                       VM_API_STRING_FIELD_VERIFY((expected)->callerchan, msg->callerchan); \</span><br><span>                         VM_API_STRING_FIELD_VERIFY((expected)->exten, msg->exten); \</span><br><span>                   VM_API_STRING_FIELD_VERIFY((expected)->origdate, msg->origdate); \</span><br><span style="color: hsl(0, 100%, 40%);">-                        VM_API_STRING_FIELD_VERIFY((expected)->origtime, msg->origtime); \</span><br><span style="color: hsl(120, 100%, 40%);">+                      VM_API_STRING_FIELD_VERIFY((expected)->orightime, msg->orightime); \</span><br><span>                   VM_API_STRING_FIELD_VERIFY((expected)->duration, msg->duration); \</span><br><span>                     VM_API_STRING_FIELD_VERIFY((expected)->folder_name, msg->folder_name); \</span><br><span>                       VM_API_STRING_FIELD_VERIFY((expected)->flag, msg->flag); \</span><br><span>@@ -497,7 +497,7 @@</span><br><span>               "callerchan=%s\n"</span><br><span>          "callerid=%s\n"</span><br><span>            "origdate=%s\n"</span><br><span style="color: hsl(0, 100%, 40%);">-               "origtime=%s\n"</span><br><span style="color: hsl(120, 100%, 40%);">+             "orightime=%s\n"</span><br><span>           "category=%s\n"</span><br><span>            "msg_id=%s\n"</span><br><span>              "flag=%s\n"</span><br><span>@@ -511,7 +511,7 @@</span><br><span>          snapshot->callerchan,</span><br><span>             snapshot->callerid,</span><br><span>               snapshot->origdate,</span><br><span style="color: hsl(0, 100%, 40%);">-          snapshot->origtime,</span><br><span style="color: hsl(120, 100%, 40%);">+                snapshot->orightime,</span><br><span>              "",</span><br><span>                snapshot->msg_id,</span><br><span>                 snapshot->flag,</span><br><span>@@ -666,7 +666,7 @@</span><br><span>     /* Set the basic properties on each */</span><br><span>       ast_string_field_set(msg_one, callerchan, "SIP/2000-00000000");</span><br><span>    ast_string_field_set(msg_one, origdate, "Mon Mar 19 04:14:21 PM UTC 2012");</span><br><span style="color: hsl(0, 100%, 40%);">-   ast_string_field_set(msg_one, origtime, "1332173661");</span><br><span style="color: hsl(120, 100%, 40%);">+      ast_string_field_set(msg_one, orightime, "1332173661");</span><br><span>    ast_string_field_set(msg_one, duration, "8");</span><br><span>      ast_string_field_set(msg_one, folder_name, "Old");</span><br><span>         msg_one->msg_number = 0;</span><br><span>@@ -674,7 +674,7 @@</span><br><span> </span><br><span>        ast_string_field_set(msg_two, callerchan, "SIP/8000-00000001");</span><br><span>    ast_string_field_set(msg_two, origdate, "Mon Mar 19 06:16:13 PM UTC 2012");</span><br><span style="color: hsl(0, 100%, 40%);">-   ast_string_field_set(msg_two, origtime, "1332180973");</span><br><span style="color: hsl(120, 100%, 40%);">+      ast_string_field_set(msg_two, orightime, "1332180973");</span><br><span>    ast_string_field_set(msg_two, duration, "24");</span><br><span>     ast_string_field_set(msg_two, folder_name, "INBOX");</span><br><span>       msg_two->msg_number = 0;</span><br><span>@@ -682,7 +682,7 @@</span><br><span> </span><br><span>        ast_string_field_set(msg_three, callerchan, "IAX/2000-000000a3");</span><br><span>  ast_string_field_set(msg_three, origdate, "Thu Mar 22 23:13:03 PM UTC 2012");</span><br><span style="color: hsl(0, 100%, 40%);">- ast_string_field_set(msg_three, origtime, "1332181251");</span><br><span style="color: hsl(120, 100%, 40%);">+    ast_string_field_set(msg_three, orightime, "1332181251");</span><br><span>  ast_string_field_set(msg_three, duration, "25");</span><br><span>   ast_string_field_set(msg_three, folder_name, "INBOX");</span><br><span>     msg_three->msg_number = 0;</span><br><span>@@ -690,7 +690,7 @@</span><br><span> </span><br><span>      ast_string_field_set(msg_four, callerchan, "DAHDI/3000-00000010");</span><br><span>         ast_string_field_set(msg_four, origdate, "Fri Mar 23 03:01:03 AM UTC 2012");</span><br><span style="color: hsl(0, 100%, 40%);">-  ast_string_field_set(msg_four, origtime, "1332181362");</span><br><span style="color: hsl(120, 100%, 40%);">+     ast_string_field_set(msg_four, orightime, "1332181362");</span><br><span>   ast_string_field_set(msg_four, duration, "13");</span><br><span>    ast_string_field_set(msg_four, folder_name, "INBOX");</span><br><span>      msg_three->msg_number = 1;</span><br><span>@@ -750,7 +750,7 @@</span><br><span>                                  ast_string_field_set(test_snapshots[i], callerchan, msg->callerchan);</span><br><span>                                     ast_string_field_set(test_snapshots[i], exten, msg->exten);</span><br><span>                                       ast_string_field_set(test_snapshots[i], origdate, msg->origdate);</span><br><span style="color: hsl(0, 100%, 40%);">-                                    ast_string_field_set(test_snapshots[i], origtime, msg->origtime);</span><br><span style="color: hsl(120, 100%, 40%);">+                                  ast_string_field_set(test_snapshots[i], orightime, msg->orightime);</span><br><span>                                       ast_string_field_set(test_snapshots[i], duration, msg->duration);</span><br><span>                                         ast_string_field_set(test_snapshots[i], folder_name, msg->folder_name);</span><br><span>                                   ast_string_field_set(test_snapshots[i], flag, msg->flag);</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.asterisk.org/c/asterisk/+/17172">change 17172</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/+/17172"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: asterisk </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: Ife7aff07ddce3128472296c9a72a2b55a5052545 </div>
<div style="display:none"> Gerrit-Change-Number: 17172 </div>
<div style="display:none"> Gerrit-PatchSet: 1 </div>
<div style="display:none"> Gerrit-Owner: Josh Soref <jsoref@gmail.com> </div>
<div style="display:none"> Gerrit-CC: Friendly Automation </div>
<div style="display:none"> Gerrit-MessageType: newchange </div>