I have the following dialplan: ; calls prefix by '8' are recorded exten = _8[01]./_251,1,Set(something=shortened) exten = _8[01]./_251,n,Set(WAV=filename) exten = _8[01]./_251,n,Monitor(wav,${WAV},mb) exten = _8[01]./_251,n,Dial(mISDN/2/${EXTEN:1},,g) exten = _8[01]./_251,n,System(send-recorded-conversation ${WAV}.wav ${EXTEN:1} emailaddr) exten = _8[01]./_251,n,Hangup() The idea is that the caller may opt to record a conversation by prefixing the dialled number with '8'. The wav file would then be emailed to him when the call finishes. The recording works fine, but the emailing doesn't - only when the called party hangs up first, but if the caller hangs up, the System(script) isn't called. What am I missing here? /Per Jessen, Z?rich -- http://www.spamchek.com/ - your spam is our business.
On Thu, 4 Feb 2010, Per Jessen wrote:> ; calls prefix by '8' are recorded > exten = _8[01]./_251,1,Set(something=shortened) > exten = _8[01]./_251,n,Set(WAV=filename) > exten = _8[01]./_251,n,Monitor(wav,${WAV},mb) > exten = _8[01]./_251,n,Dial(mISDN/2/${EXTEN:1},,g) > exten = _8[01]./_251,n,System(send-recorded-conversation ${WAV}.wav > ${EXTEN:1} emailaddr) > exten = _8[01]./_251,n,Hangup() > > The idea is that the caller may opt to record a conversation by > prefixing the dialled number with '8'. The wav file would then be > emailed to him when the call finishes. The recording works fine, but the > emailing doesn't - only when the called party hangs up first, but if the > caller hangs up, the System(script) isn't called. What am I missing > here?Check out the "h" exten. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
Danny Nicholas
2010-Feb-04 20:52 UTC
[asterisk-users] Can an agent Login to a queue and be paused
Just a thought; give them a penalty on login so unless the queue is full, they will go a cycle without a call. -----Original Message----- From: asterisk-users-bounces at lists.digium.com [mailto:asterisk-users-bounces at lists.digium.com] On Behalf Of Robert Grignon Sent: Thursday, February 04, 2010 2:28 PM To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: [asterisk-users] Can an agent Login to a queue and be paused I thought there was an option for this but cant find it.... We have a busy callcenter and I would like the agents to log in and be in a paused state upon login... Right now they login and they are instantly receiving a call.... Thanks for the input... -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Why dont you use the MixMonitor application which allows for a system command to be passed in as an argument that is executed once the recording is finished??? - MixMonitor(<file>.<ext>[|<options>[|<command>]]) <command> will be executed when the recording is over. Any strings matching ^{X} will be unescaped to ${X} and all variables will be evaluated at the time the application is called. Where <command> is a system (Linux shell) command, see Asterisk cmd System for example values. The variable MIXMONITOR_FILENAME will contain the name of the file used for recordings. Note do NOT include the dialplan command System(blah), just blah. If you don't specify a full path of the sound file, the file will be stored in the "monitor" subdir of the path specified with astspooldir in asterisk.conf (so default will be /var/spool/asterisk/monitor). Note that no environment variables are given to <command> ? you must pass these on via command-line arguments. The audio file is closed and processing of <command> is started *after* the 'h' extension priorities have been run. Cheers, Ben
Per Jessen wrote:> I have the following dialplan: > > ; calls prefix by '8' are recorded > exten = _8[01]./_251,1,Set(something=shortened) > exten = _8[01]./_251,n,Set(WAV=filename) > exten = _8[01]./_251,n,Monitor(wav,${WAV},mb) > exten = _8[01]./_251,n,Dial(mISDN/2/${EXTEN:1},,g) > exten = _8[01]./_251,n,System(send-recorded-conversation ${WAV}.wav > ${EXTEN:1} emailaddr) > exten = _8[01]./_251,n,Hangup() > > The idea is that the caller may opt to record a conversation by > prefixing the dialled number with '8'. The wav file would then be > emailed to him when the call finishes. > The recording works fine, but the emailing doesn't - only when the > called party hangs up first, but if the caller hangs up, the > System(script) isn't called. What am I missing here? > > > /Per Jessen, Z?rich >Sorry, Monitor also has the "flag" param which allows you to execute a command post recording if you want to stick with Monitor and not MixMonitor. Cheers, Ben
On Fri, 5 Feb 2010, Ben Dinnerville wrote:> Why dont you use the MixMonitor application which allows for a system > command to be passed in as an argument that is executed once the > recording is finished??? -[snip]> Note that no environment variables are given to <command> ? you must > pass these on via command-line arguments.I get a somewhat minimal set of standard shell environment variables (BASH*, HOSTNAME, PWD, TERM, etc) including the same PATH environment variable I passed to Asterisk when it was started. -- Thanks in advance, ------------------------------------------------------------------------- Steve Edwards sedwards at sedwards.com Voice: +1-760-468-3867 PST Newline Fax: +1-760-731-3000
> I get a somewhat minimal set of standard shell environment variables > (BASH*, HOSTNAME, PWD, TERM, etc) including the same PATH environment > variable I passed to Asterisk when it was started. >That just means that you cant rely on environment variables in the script that you execute and you must make sure your script is fully aware of anything it needs to know about itself. IE, dont rely on a path being setup and enter full paths to all commands / executables or any other variables and explicitly define them in the script - no different to running jobs from Cron etc that dont have a full shell environment.