Post Call Recording Script

I posted a bug report on this early this week but have not heard back.

I found the Post Call Recording Script in Advanced Settings and unlocked it.

In 2.7 I ran this in Run after record /var/lib/asterisk/bin/sortcalls1.sh ^{CALLFILENAME}.^{MIXMON_FORMAT} ^{MIXMON_DIR}

and it worked perfectly.

Now I get these errors on an amportal restart when I try it with and without the $ referenced in the hover help on the 2.9 screen:

amportal restart

Please wait…
/usr/local/sbin/amportal: line 46: export: \^\$\{CALLFILENAME\},\^\$\{MIXMON_FORMAT\}': not a valid identifier /usr/local/sbin/amportal: line 46: export:^${MIXMON_DIR}’: not a valid identifier

/var/lib/asterisk/bin/freepbx_engine: line 98: export: \^\$\{CALLFILENAME\},\^\$\{MIXMON_FORMAT\}': not a valid identifier /var/lib/asterisk/bin/freepbx_engine: line 98: export:^${MIXMON_DIR}’: not a valid identifier

amportal restart

Please wait…
/usr/local/sbin/amportal: line 46: export: \^\{CALLFILENAME\},\^\{MIXMON_FORMAT\}': not a valid identifier /usr/local/sbin/amportal: line 46: export:^{MIXMON_DIR}’: not a valid identifier

/var/lib/asterisk/bin/freepbx_engine: line 98: export: \^\{CALLFILENAME\},\^\{MIXMON_FORMAT\}': not a valid identifier /var/lib/asterisk/bin/freepbx_engine: line 98: export:^{MIXMON_DIR}’: not a valid identifier

Thanks for the help. Trying to move this system to production.

I am able to stop the errors on an amportal restart by entering the script in GUI Post Call Recording Script field three
different ways.

this:
/var/lib/asterisk/bin/sortcalls1.sh^{CALLFILENAME}^{MIXMON_FORMAT}^{MIXMON_DIR}
(no spaces, no $, no periods)

produces faulty execution of sortcalls1.sh on a tail of /var/log/asterisk/full/ like this:

== Executing
[/var/lib/asterisk/bin/sortcalls1.shOUT2000-20110918-191930-1316398769.0wav]

this:

/var/lib/asterisk/bin/sortcalls1.sh^{CALLFILENAME}.^{MIXMON_FORMAT}^{MIXMON_DIR}
(no spaces, no $, but a period after CALLFIILENAME)

produces this:

== Executing
[/var/lib/asterisk/bin/sortcalls1.shOUT2000-20110918-193905-1316399945.0.wav]

this:

/var/lib/asterisk/bin/sortcalls1.sh^{CALLFILENAME}.^{MIXMON_FORMAT}.^{MIXMON_DIR}
(two periods)

produces this:

== Executing
[/var/lib/asterisk/bin/sortcalls1.shOUT2000-20110918-194452-1316400292.2.wav.]

When it should look like this:

= Executing [/var/lib/asterisk/bin/sortcalls1.sh
OUT2000-20110918-192840-1316399320.858.wav /var/spool/asterisk/monitor/]

There has to be a bug. FreePBX 2.9 will not let me call my script with the arguments like it did in 2.7. Can someone help? Thanks.

I am finally able to make my heretofore functioning script do its job by putting this in the Post Call Recording Script window:
/var/lib/asterisk/bin/sortcalls1.sh ^{CALLFILENAME}.${MIXMON_FORMAT}
/var/spool/asterisk/monitor/
(that’s a space between the } /var)

It produces this on a tail -f /var/log/asterisk/full:
== Executing [/var/lib/asterisk/bin/sortcalls1.sh
OUT2000-20110919-172352-1316478232.6.wav /var/spool/asterisk/monitor/]

And then this in the subfolders of /var/spool/asterisk/monitor/:

[email protected] 20110919]# ls
20110919-172352-_2000-<tendigphn#>.wav
20110919-173012-_2000-<tendigphn#>.wav

I still get bitching on an amportal restart, though
Please wait…
/usr/local/sbin/amportal: line 46: export: \^\{CALLFILENAME\}.\$\{MIXMON_FORMAT\}': not a valid identifier /usr/local/sbin/amportal: line 46: export:/var/spool/asterisk/monitor/’: not a valid identifier

/var/lib/asterisk/bin/freepbx_engine: line 98: export: \^\{CALLFILENAME\}.\$\{MIXMON_FORMAT\}': not a valid identifier /var/lib/asterisk/bin/freepbx_engine: line 98: export:/var/spool/asterisk/monitor/’: not a valid identifier

STOPPING ASTERISK
All calls will be dropped once the timer hits 0. To cancel, press CTL-C
Asterisk Stoppedrisk to Stop 120

STOPPING FOP SERVER
SETTING FILE PERMISSIONS
Permissions OK

STARTING ASTERISK