Dire need for Dictate() help - dialplan stops

Well, of course everyone who posts needs help badly… but… I am stumped. I have been researching, reading and posting for two weeks now. My office is ready to give up on Asterisk in favor of a $40k dictapone system and I am doing everything I can to prevent that.

I have a dialplan something like this:

exten => s,1,Playback(/var/lib/asterisk/sounds/custom/dd-other,skip)
exten => s,n,Wait(1)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/dd-enterid,skip)
exten => s,n,Read(USERID)
exten => s,n,Set(STAMP=${USERID}-${STRFTIME(,EST5EDT,%Y-%m-%d-%H.%M.%S)})
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/dd-record,skip)
exten => s,n,Dictate(/var/spool/asterisk/dictate/other/${STAMP})
exten => s,n,System(date > /var/spool/asterisk/dictate/other/Message.txt)
exten => s,n,System(mutt -s "Dictation from workgroup Other - User ID ${USERID}" -a /var/spool/asterisk/dictate/other/${STAMP}/*.raw dictation@grape.local < /var/spool/asterisk/dictate/other/Message.txt)
exten => s,n,System(rm -f /var/spool/asterisk/dictate/other/${STAMP}/*.raw)
exten => s,n,Playback(/var/lib/asterisk/sounds/custom/dd-confirmation,skip)

My problem is that (1) Dictate hangs up the call and none of the remainder of the dial plan works and (2) if someone hangs up prematurely (before keying out) the dial plan doesn’t finish. What to do? How do I get the remainder of my dialplan to execute? PLEASE HELP…

-James

Anyone… please? Even a suggested direction to look?

perhaps try adding this:

exten => h,1,System(date > /var/spool/asterisk/dictate/other/Message.txt) exten => h,n,System(mutt -s "Dictation from workgroup Other - User ID ${USERID}" -a /var/spool/asterisk/dictate/other/${STAMP}.wav dictation@grape.local < /var/spool/asterisk/dictate/other/Message.txt) exten => h,n,System(rm -f /var/spool/asterisk/dictate/other/${STAMP}.wav) exten => h,n,Playback(/var/lib/asterisk/sounds/custom/dd-confirmation,skip)

the ‘h’ extension is for performing actions after a hangup…so if the user hangs up instead of keying out, it should do all of those actions.

you’d need to put this entire set of commands in it’s own context (if you haven’t already) so that the h commands don’t get called for EVERY hangup, just the calls coming from your Dictate ‘application’.

hope this helps.

I tried this:

[custom-dic-dis] exten => s,1,Playback(/var/lib/asterisk/sounds/custom/dd-discharge,skip) exten => s,n,Wait(1) exten => s,n,Playback(/var/lib/asterisk/sounds/custom/dd-enterid,skip) exten => s,n,Read(USERID) exten => s,n,Set(STAMP=${USERID}-${STRFTIME(,EST5EDT,%Y-%m-%d-%H.%M.%S)}) exten => s,n,Playback(/var/lib/asterisk/sounds/custom/dd-record,skip) ;exten => s,n,Record(/var/spool/asterisk/dictate/discharge/${STAMP}.wav|0|3600|skip) exten => s,n,Dictate(/var/spool/asterisk/dictate/discharge/${STAMP}) exten => h,n,System(date > /var/spool/asterisk/dictate/discharge/Message.txt) ;exten => h,n,System(mutt -s "Dictation from workgroup Discharge - User ID ${USERID}" -a /var/spool/asterisk/dictate/discharge/${STAMP}.wav dictation@grape.local < /var/spool/asterisk/dictate/discharge/Message.txt) ;exten => h,n,System(rm -f /var/spool/asterisk/dictate/discharge/${STAMP}.wav) exten => h,n,Playback(/var/lib/asterisk/sounds/custom/dd-confirmation,skip) exten => h,n,Hangup

I tried this and it didn’t work. My output looked like this:

-- Executing Answer("IAX2/100-5", "") in new stack -- Executing Wait("IAX2/100-5", "1") in new stack -- Executing Set("IAX2/100-5", "TIMEOUT(digit)=3600") in new stack -- Digit timeout set to 3600 -- Executing Set("IAX2/100-5", "TIMEOUT(response)=3600") in new stack -- Response timeout set to 3600 -- Executing BackGround("IAX2/100-5", "custom/dd-main") in new stack -- Playing 'custom/dd-main' (language 'en') == CDR updated on IAX2/100-5 -- Executing Goto("IAX2/100-5", "custom-dic-dis|s|1") in new stack -- Goto (custom-dic-dis,s,1) -- Executing Playback("IAX2/100-5", "/var/lib/asterisk/sounds/custom/dd-discharge|skip") in new stack -- Playing '/var/lib/asterisk/sounds/custom/dd-discharge' (language 'en') -- Executing Wait("IAX2/100-5", "1") in new stack -- Executing Playback("IAX2/100-5", "/var/lib/asterisk/sounds/custom/dd-enterid|skip") in new stack -- Playing '/var/lib/asterisk/sounds/custom/dd-enterid' (language 'en') -- Executing Read("IAX2/100-5", "USERID") in new stack -- User entered '999' -- Executing Set("IAX2/100-5", "STAMP=999-2006-06-16-12.42.20") in new stack -- Executing Playback("IAX2/100-5", "/var/lib/asterisk/sounds/custom/dd-record|skip") in new stack -- Playing '/var/lib/asterisk/sounds/custom/dd-record' (language 'en') -- Executing Dictate("IAX2/100-5", "/var/spool/asterisk/dictate/discharge/999-2006-06-16-12.42.20") in new stack -- Playing 'dictate/enter_filename' (language 'en') -- Playing 'dictate/forhelp' (language 'en') -- Playing 'dictate/playback_mode' (language 'en') -- Playing 'dictate/paused' (language 'en') -- Playing 'dictate/record_mode' (language 'en') -- Playing 'dictate/record' (language 'en') -- Playing 'dictate/pause' (language 'en') -- Playing 'dictate/enter_filename' (language 'en') == Spawn extension (custom-dic-dis, s, 7) exited non-zero on 'IAX2/100-5' -- Hungup 'IAX2/100-5'

I had no luck with this. Nothing happens still after dictate() is done. Thank you for your help. I have spent so much time on this with no success. It’s so frustrating. It seems that the ‘h’ doesn’t help.

The above context was just a quick and dirty hack of another context to see if everything keeps moving. Once I confirm that the dialplan will keep executing, I will set it up to convert the raw file to wav and do some file manipulations.

Anyone?

i’m thinking it’s a bug/oversight in the dictate app…i hit the # key to change the filename and hit pound again, and it crashed the app (thankfully not asterisk)…

what are you trying to accomplish? i’m guessing that there is another way to do it…

Once the Dictate function is complete I want to post-process the raw files, converting them into .wav or some other more usable format. If I can keep the dialplan going past the dictate() function I will be set.

You are not hanging up on the channel - Just Before your h extensions start specify s,n,Hangup

No; that wasn’t it either. Thanks, though. I did as you said, but the same thing occurred. Is there a way that I could encapsulate the Dictate() function in a macro or something so that when the macro is called and it dies the call can continue? What about turning the call into a conference so that when the outside line hangs up the call session is still active? I think I am out of time. To many people bitching at me about it. I think they are ready to give up on it.