[Asterisk-Dev] "Make phone call on demand" using AGI?

Steven Critchfield critch at basesys.com
Sun Mar 30 14:55:19 MST 2003


On Sun, 2003-03-30 at 15:36, Brian Capouch wrote:
> Steven Critchfield wrote:>
> > 
> > AGI is for dealing with inprogress calls. Construct a sample.call file
> > to call out and play the message you need. sample.call is in the
> > asterisk cvs checkout. You would want something that looks like below.
> > 
> > --Sample.call--
> > Channel: Zap/g1/9XXXXXX 
> > MaxRetries: 5
> > RetryTime: 60
> > WaitTime: 30
> > 
> > Application: Play
> > Data: DNS-down
> > ---------------
> > 
> 
> Hmm.  I set something up just about like that, viz:
> 
> **************
> Channel: Zap/1/12125551212
> MaxRetries: 2
> RetryTime: 60
> WaitTime: 30
> 
> Application: Playback
> Data: testMsg
> 
> *****************
> 
> And here is what asterisk does with it:
> 
>      -- Attempting call on Zap/1/12125551212 for application 
> Playback(hibob) (Retry 1)
>         > Channel Zap/1-1 was answered.
>         > Lauching Playback(hibob) on Zap/1-1
>      -- Playing 'testMsg'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
> WARNING[278543]: File file.c, Line 649 (ast_waitstream): Unexpected 
> control subclass '5'
>      -- Hungup 'Zap/1-1'
> 
> It looks to me like asterisk is playing the message for the amusement of 
> the dial tone!!

I'm guessing, you are using a X100P since you specified a specific
channel. I doubt you get the ability to know when the otherside answers.
Maybe what you should do then is use the ability to drop a call to an
extension that will wait a few seconds after the dial before playing
audio, and maybe loop through the audio until hangup. 
-- 
Steven Critchfield <critch at basesys.com>




More information about the asterisk-dev mailing list