[asterisk-users] cal recording with email
Jeronimo Romero
jromero at eusnetworks.com
Fri Dec 8 08:46:49 MST 2006
I'm trying to set on-demand call recording. Here's a snippet of the
pertinent dialplan. The purpose of this is to allow one user in
particular to be able to receive an email recording of the call
everytime he dials *91 + number. The problem is that the email is not
going out or being generated when I use the ${CALLFILENAME} variable.
When I use the actual file name of the gsm recording, the emails go out
without a problem.
[rec-tt-trunkdial]
exten=>_*91NXX.,1,SetVar(CALLFILENAME=${TIMESTAMP}:${CALLERIDNUM})
exten=>_*91NXX.,n,Monitor(gsm,/var/spool/asterisk/monitor/${CALLFILENAME
},m)
exten=>_*91NXX.,n,Set(CALLERID(num)=7188233325)
exten=>_*91NXX.,n,Dial(IAX2/${VOICEPULSE_GATEWAY_OUT_A}/${EXTEN:2},,gtTr
)
exten=>_*91NXX.,n,Wait(5)
exten=>_*91NXX.,n,System(cat /etc/macro-text | mailx -a
/var/spool/asterisk/monitor/ ${CALLFILENAME}.gsm -s "Recorded"
jromero at euscorp.com)
exten=>_*91NXX.,n,Hangup()
This is my asterisk console output:
Connected to Asterisk 1.2.12.1 currently running on pbx (pid = 1999)
Verbosity is at least 3
-- Hungup 'IAX2/voicepulse02-8'
-- Executing Wait("SIP/1001-081d9b80", "2") in new stack
-- Executing System("SIP/1001-081d9b80", "cat /etc/macro-text |
mailx -a /var/spool/asterisk/monitor/20061208-103611:1001.gsm -s
"hello" jromero at euscorp.com") in new stack
-- Executing Hangup("SIP/1001-081d9b80", "") in new stack
== Spawn extension (rec-tt-trunkdial, *912126245943, 7) exited
non-zero on 'SIP/1001-081d9b80'
Nothing actually happens. For testing I replaced the ${CALLFILENAME}
variable in the System() command with the actual recording name:
Like this in extensions.conf:
exten=>_*91NXX.,n,System(cat /etc/macro-text | mailx -a
/var/spool/asterisk/monitor/20061208-103611:1001.gsm -s "Recorded"
jromero at euscorp.com)
This worked fine so I'm guessing that there's something wrong I'm doing
when passing the ${CALLFILENAME} variable to the linux shell in
System().
Any help would be appreciated. Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20061208/00c7c549/attachment.htm
More information about the asterisk-users
mailing list