<?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[Elastix Call Recording]]></title><description><![CDATA[<p dir="auto">Hi All,</p>
<p dir="auto">I have recently built a new Elastix box (2.4.0) running FOP2 2.27 and I cannot get call recordings to display in the Elastix admin tab.</p>
<p dir="auto">I can see that the call is being recorded -</p>
<p dir="auto">127.0.0.1            -&gt; Action: SetVar<br />
127.0.0.1            -&gt; Channel: SIP/7026-0000b975<br />
127.0.0.1            -&gt; Variable: MONITOR_EXEC<br />
127.0.0.1            -&gt; Value: /usr/local/fop2/recording_elastix.pl</p>
<p dir="auto">127.0.0.1            -&gt; Action: Setvar<br />
127.0.0.1            -&gt; Channel: SIP/7026-0000b975<br />
127.0.0.1            -&gt; Variable: MONITOR_EXEC_ARGS<br />
127.0.0.1            -&gt; Value: 1382969176.168878</p>
<p dir="auto">127.0.0.1            -&gt; Mix: 1<br />
127.0.0.1            -&gt; Action: Monitor<br />
127.0.0.1            -&gt; Async: 1<br />
127.0.0.1            -&gt; File: /var/spool/asterisk/monitor/7026_7026_140619_1382969176.168878<br />
127.0.0.1            -&gt; Channel: SIP/7026-0000b975<br />
127.0.0.1            -&gt; Format: wav<br />
127.0.0.1            -&gt; ActionID: 181</p>
<p dir="auto">fop2.cfg is set to call recording_elastix.pl with the following parameters</p>
<p dir="auto">monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}<em>${DEST_EXTENSION}</em>%h%i%s_${UNIQUEID}<br />
monitor_format=wav<br />
monitor_mix=true<br />
monitor_exec=/usr/local/fop2/recording_elastix.pl</p>
<p dir="auto">I presume that recording_elastix.pl is being executed as the file reported above disappears shortly after recording has stopped.</p>
<p dir="auto">However, i think the mysql database connection fails as I do not see any data in the fop2.fop2recordings table.</p>
<p dir="auto">I am settings the $MYSQLPASS variable in recording_elastix.pl correctly. If I connect to the mysql server with the user fop2 , I cannot access the asteriskcdrdb database.</p>
<h1>mysql -u fop2 -p</h1>
<p dir="auto">Enter password:<br />
Welcome to the MySQL monitor.  Commands end with ; or \g.</p>
<p dir="auto">mysql&gt; use asteriskcdrdb;<br />
ERROR 1044 (42000): Access denied for user 'fop2'@'localhost' to database 'asteriskcdrdb'</p>
<p dir="auto">I cant find any reference in the setup guides to allow the fop2 access to the asteriskcdrdb database however?</p>
]]></description><link>http://localhost:4567/topic/1629/elastix-call-recording</link><generator>RSS for Node</generator><lastBuildDate>Tue, 27 Oct 2026 04:06:04 GMT</lastBuildDate><atom:link href="http://localhost:4567/topic/1629.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 28 Oct 2013 14:33:51 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Elastix Call Recording on Wed, 30 Oct 2013 13:07:56 GMT]]></title><description><![CDATA[<p dir="auto">Hi Nicolas,</p>
<p dir="auto">I have fixed the problem</p>
<p dir="auto">The issues were;</p>
<p dir="auto">1/ Elastix FOP2 config files being in /etc/elastix/fop2 (Removed these and symlinked to /usr/local/fop2)<br />
2/ Asterisk mysql_so not loading , fixed by uninstalling/reinstalling asterisk-add*<br />
2a/ Incorrect line in /etc/asterisk/<em>cdr</em> files , modified to enable cdr logging<br />
3/ Incorrect passwords in /etc/asterisk/<em>mysql</em> files - auto generated and fixed by manually changing passwords</p>
<p dir="auto">Many thanks for all your help - finally got there and call recording is working and data is displayed in Elastix Recordings tab again.</p>
<p dir="auto">Gavin</p>
]]></description><link>http://localhost:4567/post/7004</link><guid isPermaLink="true">http://localhost:4567/post/7004</guid><dc:creator><![CDATA[gavinlew]]></dc:creator><pubDate>Wed, 30 Oct 2013 13:07:56 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Wed, 30 Oct 2013 11:51:20 GMT]]></title><description><![CDATA[<p dir="auto">If you use Elastix that forces https, then you need either disable websockets in /var/www/html/fop2/js/presence.js OR set the ssl certificates in fop2.cfg so your browser accepts secure websocket connections.</p>
<p dir="auto">The fop2.cfg bundled with 2.27 has commented out the lines to enable the certificates, and I think the locations of the commented files are indeed the ones used by Elastix and other Centos based distributions.</p>
<pre><code>; If you access fop2 via https, browsers will try to use wss (Secure 
; web sockets) and for that it requires a certificate file and key file,
; the same ones you have in your web server configuration:
;
;ssl_certificate_file=/etc/pki/tls/certs/localhost.crt
;ssl_certificate_key_file=/etc/pki/tls/private/localhost.key
</code></pre>
<p dir="auto">Best regards,</p>
]]></description><link>http://localhost:4567/post/7003</link><guid isPermaLink="true">http://localhost:4567/post/7003</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Wed, 30 Oct 2013 11:51:20 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 19:27:32 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Ok - there was the first problem, elastix calling the config file from /etc/asterisk/fop2 , I have moved the config files from /usr/local/fop2 into /etc/asterisk/fop2</p>
<p dir="auto">However, now I have a problem where fop2 will start and no longer accepts connections - I will take some time to remove all the configuration and rebuild.</p>
]]></description><link>http://localhost:4567/post/7002</link><guid isPermaLink="true">http://localhost:4567/post/7002</guid><dc:creator><![CDATA[gavinlew]]></dc:creator><pubDate>Tue, 29 Oct 2013 19:27:32 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 18:27:56 GMT]]></title><description><![CDATA[<p dir="auto">Hi Gavin,</p>
<p dir="auto">It does not make much sense, the config AND the events you posted are showing the correct format for the filname. Where is your fop2.cfg file located? Perhaps you are modifying the incorrect one .. elastix stores the file in /etc/asterisk/fop2 and the tarball install in /usr/local/fop2</p>
<p dir="auto">The gXXX is the "old" name for Elastix, your config looks right:</p>
<p dir="auto">monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}<em>${DEST_EXTENSION}</em>%h%i%s_${UNIQUEID}</p>
<p dir="auto">there is no g at the start of the filename...</p>
]]></description><link>http://localhost:4567/post/7001</link><guid isPermaLink="true">http://localhost:4567/post/7001</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 29 Oct 2013 18:27:56 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 16:19:08 GMT]]></title><description><![CDATA[<p dir="auto">Hi Nicolas,</p>
<p dir="auto">fop2.conf ;</p>
<p dir="auto">; For elastix Monitoring Tab:<br />
;monitor_filename=g${DEST_EXTENSION}-${UNIQUEID}</p>
<p dir="auto">monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}<em>${DEST_EXTENSION}</em>%h%i%s_${UNIQUEID}</p>
<p dir="auto">; For fop2 recording interface<br />
;monitor_filename=/var/spool/asterisk/monitor/${ORIG_EXTENSION}<em>${DEST_EXTENSION}</em>%h%i%s_${UNIQUEID}</p>
<p dir="auto">Which results in the following files being created ;</p>
<p dir="auto">-rw-r--r-- 1 asterisk asterisk  312364 Oct 29 12:35 g7046-1383046959.12073-out.wav<br />
-rw-r--r-- 1 asterisk asterisk  312364 Oct 29 12:35 g7046-1383046959.12073-in.wav</p>
]]></description><link>http://localhost:4567/post/7000</link><guid isPermaLink="true">http://localhost:4567/post/7000</guid><dc:creator><![CDATA[gavinlew]]></dc:creator><pubDate>Tue, 29 Oct 2013 16:19:08 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 14:52:11 GMT]]></title><description><![CDATA[<p dir="auto">Hmm, the Execute line is not obeying what it was told (or what you posted as AMI events received) as the monitor filename:</p>
<p dir="auto">/var/spool/asterisk/monitor/7026_7026_140619_1382969176.168878</p>
<p dir="auto">The monitor filename should look like that. The script will split the name and get fields for the database queries, the filename you posted on your last mail is not following that convention. So, not sure if you changed the monitor_filename entry in fop2.cfg or something else is happening down the pipe.</p>
]]></description><link>http://localhost:4567/post/6999</link><guid isPermaLink="true">http://localhost:4567/post/6999</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 29 Oct 2013 14:52:11 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 11:57:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi Nicolas,</p>
<p dir="auto">I have tried passing this<br />
/usr/local/fop2/recording_elastix.pl g7046-1383046959.12073-in.wav g7046-1383046959.12073-out.wav 1383046959.12073.wav 1383046959.12073<br />
Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.</p>
<p dir="auto">and also</p>
<h1>/usr/local/fop2/recording_elastix.pl g7046-1383046959.12073-in.wav g7046-1383046959.12073-out.wav 1383046959.12073.wav 1383046959</h1>
<p dir="auto">Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.</p>
<p dir="auto">and also</p>
<h1>/usr/local/fop2/recording_elastix.pl g7046-1383046959.12073-in.wav g7046-1383046959.12073-out.wav g7046-1383046959.12073.wav 1383046959</h1>
<p dir="auto">Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.</p>
<p dir="auto">All giving the same error on line 173</p>
<p dir="auto">$uniqueid =~ s/.wav//g;</p>
]]></description><link>http://localhost:4567/post/6998</link><guid isPermaLink="true">http://localhost:4567/post/6998</guid><dc:creator><![CDATA[gavinlew]]></dc:creator><pubDate>Tue, 29 Oct 2013 11:57:03 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 11:35:39 GMT]]></title><description><![CDATA[<p dir="auto">Yes, the sql work is at the end. The command line is missing the uniqueid that must come as the 4th parameter...</p>
]]></description><link>http://localhost:4567/post/6997</link><guid isPermaLink="true">http://localhost:4567/post/6997</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 29 Oct 2013 11:35:39 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 09:26:03 GMT]]></title><description><![CDATA[<p dir="auto">Hi Nicolas,</p>
<p dir="auto">If I run the script from the command line I get the following errors ;</p>
<p dir="auto">$ /usr/local/fop2/recording_elastix.pl g7046-1383038562.8061-in.wav g7046-1383038562.8061-out.wav 1383038562.8061.wav<br />
Use of uninitialized value in substitution (s///) at /usr/local/fop2/recording_elastix.pl line 173.<br />
Use of uninitialized value in concatenation (.) or string at /usr/local/fop2/recording_elastix.pl line 202.</p>
<p dir="auto">Is the script mixing the files together, then die'ing before doing the SQL work?</p>
<p dir="auto">Many Thanks,</p>
]]></description><link>http://localhost:4567/post/6996</link><guid isPermaLink="true">http://localhost:4567/post/6996</guid><dc:creator><![CDATA[gavinlew]]></dc:creator><pubDate>Tue, 29 Oct 2013 09:26:03 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Tue, 29 Oct 2013 01:24:02 GMT]]></title><description><![CDATA[<p dir="auto">The .pl script will override any manual mysql credentials with the ones set in amportal.conf or freepbx.conf files:</p>
<p dir="auto">if(-f "/etc/amportal.conf") {<br />
my $ampconf = parse_amportal_conf( "/etc/amportal.conf" );<br />
$MYSQLUSER   = $ampconf-&gt;{"AMPDBUSER"};<br />
$MYSQLPASS   = $ampconf-&gt;{"AMPDBPASS"};<br />
$MYSQLHOST   = $ampconf-&gt;{"AMPDBHOST"};<br />
} elsif(-f "/etc/freepbx/freepbx.conf") {<br />
my $ampconf = parse_amportal_conf( "/etc/freepbx/freepbx.conf" );<br />
$MYSQLUSER   = $ampconf-&gt;{"AMPDBUSER"};<br />
$MYSQLPASS   = $ampconf-&gt;{"AMPDBPASS"};<br />
$MYSQLHOST   = $ampconf-&gt;{"AMPDBHOST"};<br />
}</p>
<p dir="auto">Try to grep for AMPDB in /etc/amportal.conf and try to connect to mysql asteriskcdrdb database with those. Does that work?</p>
<p dir="auto">In any case, to troubleshot you should enable full debug in Asterisk itself and check the /var/log/asterisk/full log for the execution of the post monitor script. The full command, including all parameters, will be logged, something like</p>
<p dir="auto">Executing /usr/local/fop2/recording_elastix.pl some-in.wav some-out.wav some.wav 123123123123.123</p>
<p dir="auto">Then you can "su asterisk" in the command line and run the exact same command you see in the log wit the same parameters and see if you get an error or something. You might want to comment the unlink lines from the script so the original sound files are in place by the time you run the script by hand (otherwise the files will be removed and the script will fail for a file not found, and not because something else happened). So, look for this:</p>
<p dir="auto">if ( -f $LEFT . "-tmp.wav" ) {<br />
unlink $LEFT . "-tmp.wav";<br />
}</p>
<p dir="auto">if ( -f $RIGHT . "-tmp.wav" ) {<br />
unlink $RIGHT . "-tmp.wav";<br />
}</p>
<p dir="auto">if ( -f $OUT ) {<br />
unlink $LEFT;<br />
unlink $RIGHT;<br />
}</p>
<p dir="auto">and just prefix all the unlinks with a # symbol when doing tests.</p>
]]></description><link>http://localhost:4567/post/6995</link><guid isPermaLink="true">http://localhost:4567/post/6995</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Tue, 29 Oct 2013 01:24:02 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Mon, 28 Oct 2013 21:29:20 GMT]]></title><description><![CDATA[<p dir="auto">Hi Nicholas,</p>
<p dir="auto">It appears that the database table isn't getting updated, the credentials work fine from the CLI, could you suggest how I could trap the error, i see from the notes in recording_elastix.pl not to modify certain lines.</p>
]]></description><link>http://localhost:4567/post/6994</link><guid isPermaLink="true">http://localhost:4567/post/6994</guid><dc:creator><![CDATA[gavinlew]]></dc:creator><pubDate>Mon, 28 Oct 2013 21:29:20 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Mon, 28 Oct 2013 21:05:21 GMT]]></title><description><![CDATA[<p dir="auto">I do not follow elastix development, so I do not know if their interface have changed in any way. The recording script task is to update the cdr table and set the userfield field in the table to "audio:xxxxx". The filename is not relevant. Check the cdr table and see if userfields are being populated or not on the respective entries.</p>
]]></description><link>http://localhost:4567/post/6993</link><guid isPermaLink="true">http://localhost:4567/post/6993</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Mon, 28 Oct 2013 21:05:21 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Mon, 28 Oct 2013 18:58:15 GMT]]></title><description><![CDATA[<p dir="auto">Hi,</p>
<p dir="auto">Many thanks - I've updated that now the cdrdb table can be read.</p>
<p dir="auto">Does the filename formatting look correct ;<br />
-rw-r--r-- 1 asterisk asterisk  210924 Oct 28 18:24 g7027-1382984590.175456.wav<br />
-rw-r--r-- 1 asterisk asterisk  787564 Oct 28 18:33 g7027-1382985002.175481.wav</p>
<p dir="auto">I still cannot see recorded calls via the webui/extension page logged in as the user (in above example extension 7027).</p>
<p dir="auto">Gavin</p>
]]></description><link>http://localhost:4567/post/6992</link><guid isPermaLink="true">http://localhost:4567/post/6992</guid><dc:creator><![CDATA[gavinlew]]></dc:creator><pubDate>Mon, 28 Oct 2013 18:58:15 GMT</pubDate></item><item><title><![CDATA[Reply to Elastix Call Recording on Mon, 28 Oct 2013 17:32:19 GMT]]></title><description><![CDATA[<p dir="auto">If you use the mysql fop2 user in the script, then you must grant access to the table in mysql, something similar to this:</p>
<p dir="auto">mysql -u root -p -e "grant all privileges on asteriskcdrdb.* to fop2@localhost identified by 'yourpassword'"</p>
<p dir="auto">Or you can use another user like the one that is set in FreePBX in the .pl script instead of the fop2 user.. it is up to you. (Ex: grep AMPDB /etc/amportal.conf)</p>
]]></description><link>http://localhost:4567/post/6991</link><guid isPermaLink="true">http://localhost:4567/post/6991</guid><dc:creator><![CDATA[nicolas]]></dc:creator><pubDate>Mon, 28 Oct 2013 17:32:19 GMT</pubDate></item></channel></rss>