<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Problem with Voicemail origtime Field]]></title><description><![CDATA[<p dir="auto">We are experiencing a problem with the origtime field in the vmaildetail response. When voicemail data is returned, the fields look correct except for the origtime field which is returned as 1. I checked the database and the field contents appears correct there.</p>
<p dir="auto">Here is an example:</p>
<p dir="auto">16,vmaildetail=INBOX!eyJJTkJPWCI6IFt7Im1haWxib3h1c2VyIjogIjQxNTY4NDk4MTMiLCJtc2dudW0iOiAiMCIsImZsYWciOiAiIiwiZHVyYXRpb24iOiAiMTYiLCJtYWNyb2NvbnRleHQiOiAiZXh0LWxvY2FsIiwiZGlyIjogIi92YXIvc3Bvb2wvYXN0ZXJpc2svdm9pY2VtYWlsL2RlZmF1bHQvNDE1Njg0OTgxMy9JTkJPWCIsImNhbGxlcmlkIjogIlwiQ29sbGluZyxXaWxsaWFtXCIgPDk1MTc4MDc3MzY+IiwibWFpbGJveGNvbnRleHQiOiAiZGVmYXVsdCIsIm9yaWd0aW1lIjogIjEiLCJjb250ZXh0IjogIm1hY3JvLXZtIiwiaWQiOiAiNjM1MyJ9XX0= en slot 0</p>
<p dir="auto">vmaildetail returns the following (I commented out the phone numbers so people do not call me):<br />
{"INBOX": [{"mailboxuser": "415nnnnnnn","msgnum": "0","flag": "","duration": "16","macrocontext": "ext-local","dir": "/var/spool/asterisk/voicemail/default/4156849813/INBOX","callerid": ""Colling,William" &lt;951nnnnnnn&gt;","mailboxcontext": "default","origtime": "1","context": "macro-vm","id": "6353"}]}</p>
<p dir="auto">But the database shows:</p>
<p dir="auto">SELECT origtime from  voicemail.voicemessages where id = 6353;<br />
'1453737132'</p>
<p dir="auto">Would you please explain how the fop2 server retrieves the origtime so we can check to see if we have an error on our side.</p>
<p dir="auto">fop2_server version 2.29.02</p>
]]></description><link>http://localhost:4567/topic/2152/problem-with-voicemail-origtime-field</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 05:13:56 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/2152.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 25 Jan 2016 16:43:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem with Voicemail origtime Field on Fri, 26 Feb 2016 19:16:07 GMT]]></title><description><![CDATA[<p dir="auto">Problem <em>is</em> due to casting to avoid issues with some systems.. in yours cast for that field is returning 1 char out of the whole bunch. I am changing the query to cast char(50) in the hope that it will cast all digits. There is a new binary server file on your test server you can test it out. I think it works fine now.</p>
]]></description><link>http://localhost:4567/post/9479</link><guid isPermaLink="true">http://localhost:4567/post/9479</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Fri, 26 Feb 2016 19:16:07 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with Voicemail origtime Field on Fri, 05 Feb 2016 14:45:39 GMT]]></title><description><![CDATA[<p dir="auto">I did some more checking and I don't think this is related to ODBC. Assuming that FOP2 is written in perl, I wrote the following test program that retrieves the row contents with ODBC.</p>
<p dir="auto">#!/usr/bin/perl -w<br />
use strict;<br />
use DBI;<br />
my $dbh = DBI-&gt; connect('dbi:ODBC:voicemail');</p>
<p dir="auto">my $sql = qq/select id, msgnum, dir, context, macrocontext, origtime, duration from voicemail where id='6353'/;<br />
my $sth = $dbh-&gt;prepare($sql) or die "Unable to prepare $sql ".$dbh-&gt;errstr;</p>
<p dir="auto">$sth-&gt;execute() or die "Unable to execute query $sql " . $sth-&gt;errstr;<br />
my ($id, $msgnum, $dir, $context, $macrocontext, $origtime, $duration);<br />
$sth-&gt;bind_col(1, $id);<br />
$sth-&gt;bind_col(2, $msgnum);<br />
$sth-&gt;bind_col(3, $dir);<br />
$sth-&gt;bind_col(4, $context);<br />
$sth-&gt;bind_col(5, $macrocontext);<br />
$sth-&gt;bind_col(6, $origtime);<br />
$sth-&gt;bind_col(7, $duration);</p>
<p dir="auto">while ($sth-&gt;fetch()) {<br />
print ("$id\t,$msgnum\t,$dir\t,$context\t,$macrocontext\t,$origtime\t,$duration\n");<br />
}<br />
$sth-&gt;finish();<br />
$dbh-&gt;disconnect();</p>
<p dir="auto">When I ran it, the results were:</p>
<p dir="auto">6353    ,0      ,/var/spool/asterisk/voicemail/default/4156849813/INBOX ,macro-vm       ,ext-local      ,1453737132     ,16</p>
<p dir="auto">which returned the correct values for each field, including the origtime field.</p>
]]></description><link>http://localhost:4567/post/9478</link><guid isPermaLink="true">http://localhost:4567/post/9478</guid><dc:creator><![CDATA[wcolling]]></dc:creator><pubDate>Fri, 05 Feb 2016 14:45:39 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with Voicemail origtime Field on Fri, 05 Feb 2016 13:03:35 GMT]]></title><description><![CDATA[<p dir="auto">The origtime field is defined as varchar(40) with a latin1 character set. Do you think this may be a problem and it should be redefined as datetime or timestamp?</p>
]]></description><link>http://localhost:4567/post/9477</link><guid isPermaLink="true">http://localhost:4567/post/9477</guid><dc:creator><![CDATA[wcolling]]></dc:creator><pubDate>Fri, 05 Feb 2016 13:03:35 GMT</pubDate></item><item><title><![CDATA[Reply to Problem with Voicemail origtime Field on Fri, 29 Jan 2016 18:43:18 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">I have seen in different setups that field casting in ODBC is "shady". I cannot say for sure, but I have seen many fields being kind of truncated with what appears to be wide characters or utf8 kind of encoding.. something really strange.. Just the other day working on a similar problem, I seend that the id field that is just an integer, was retrieved with this strange chars, ending up truncating the field... like the id was 234234 but the reeturned field was 234^00 (being the last part some kind of wide character or just noise), so it truncated it to 234. Solution in this case was to explicitely cast to char even if its a numeric value and convert the result on the server. Maybe, must maybe, origtime issues you are having is similar/related.</p>
]]></description><link>http://localhost:4567/post/9476</link><guid isPermaLink="true">http://localhost:4567/post/9476</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Fri, 29 Jan 2016 18:43:18 GMT</pubDate></item></channel></rss>