[asterisk-users] cal recording with email

Joe Dennick joe at dennick.net
Fri Dec 8 08:57:59 MST 2006


I think you need quotes around the file-name, but I could be wrong.
It's what I would try, though.

Good luck!

Joe

On Fri, 2006-12-08 at 09:46 -0600, Jeronimo Romero wrote:
> 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.  
> 
>  
> 
>  
> 
>  
> 
> 
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users



More information about the asterisk-users mailing list