[Asterisk-Users] Background() App From AGI

Douglas Garstang dgarstang at oneeighty.com
Mon Mar 27 08:58:40 MST 2006


I have the following python AGI script.
I know it's been abstracted, but it's still pretty easy to 
see what's happening.

        self.agi.channelAnswer()
        self.agi.wait(1)
        self.agi.execCmd("background","enter-conf-call-number","")
        self.agi.execCmd("Read","confNum|||","")
        confNum = self.agi.getVar("confNum")

I enter DTMF digits, and read the result with Read() while 
the sound file is still playing. I always lose the first 
digit. The docs aren't clear but it appears that Background() 
is designed to grab the first DTMF digit it sees. I don't 
want Background() to chomp my first DTMF digit! I want to 
read them all with Read(). How can I play a sound file, while 
still waiting for DTMF input and get all the DTMF digits entered?

Thanks,
Doug.



More information about the asterisk-users mailing list