Hi there, I'm having some trouble with getting Asterisk to make a call, I think it should be quite easy, but anyway... Using the following file contents: ## Channel: Zap/3/<TEL NUMBER HERE> MaxRetries: 2 RetryTime: 60 WaitTime: 30 Context: phones Extension: 502 Priority: 1 ## Extension 502 is simply one that plays a sound back. When I dump this file into /var/spool/asterisk/outgoing, it does call the number, but when I pick up the phone, I just get a dial tone as if Asterisk has maybe hung up before playing the sound. Can anyone see what I'm doing wrong here? The extension does work correctly when called normally. Regards, Steve -- Steve Foy | http://www.unite.net UNITE Solutions | Tel: 028 9077 7338
On Wed, Jan 21, 2004 at 06:09:26PM +0100, Philipp von Klitzing wrote:> > Extension 502 is simply one that plays a sound back. When I dump this file > > into /var/spool/asterisk/outgoing, it does call the number, but when I pick > > up the phone, I just get a dial tone as if Asterisk has maybe hung up before > > playing the sound. > > Did you do "Answer" before you call "Playback()" in your extensions.conf?Yep, the extension looks like this: exten => 502,1,Answer exten => 502,2,Playback(nagios/hostdown) exten => 502,3,Hangup -- Steve Foy | http://www.unite.net UNITE Solutions | Tel: 028 9077 7338
On Wed, 21 Jan 2004, Steve Foy waxed:> Hi there, I'm having some trouble with getting Asterisk to make a call, I > think it should be quite easy, but anyway... > > Using the following file contents: > > ## > Channel: Zap/3/<TEL NUMBER HERE> > > MaxRetries: 2 > RetryTime: 60 > WaitTime: 30 > > Context: phones > Extension: 502 > Priority: 1 > ## > > Extension 502 is simply one that plays a sound back. When I dump this file > into /var/spool/asterisk/outgoing, it does call the number, but when I pick > up the phone, I just get a dial tone as if Asterisk has maybe hung up before > playing the sound. > > Can anyone see what I'm doing wrong here? The extension does work correctly > when called normally. > > Regards, > SteveTry putting a Wait(2) in at extension 502, priority 1; and move the Playback(sndfile) down to priority 2. Maybe it's a real short sound ? Take a look at what's happening on the * console with "sudo asterisk -r" --Chris -- Chris Maj <cmaj_hat_freedomcorpse_hot_info> Pronunciation Guide: Maj == May Fingerprint: 43D6 799C F6CF F920 6623 DC85 C8A3 CFFE F0DE C146
On Wed, Jan 21, 2004 at 08:07:55PM +0100, Philipp von Klitzing wrote:> You could also insert a Wait(1) to make sure that the VoIP connection has > been correctly established. If your soundfile is short, then maybe it was > indeed played before the RTP stream was properly set up. For testing > change 3,Hangup into 3,MusicOnHold or something similar that does give > sound feedback for quite a while.It seems to start playing the file before the call is answered by the 'callee'. I'm calling a cell phone, not sure if it would work better with a land line, but it shouldn't matter. Has anyone else experienced this or have any suggestions as to how I could fix it!? Cheers :) -- Steve Foy | http://www.unite.net UNITE Solutions | Tel: 028 9077 7338