[Asterisk-Users] Problems with dial status...

2006-06-30 Thread Marcin Lukasik

Hello for the first time :-)

I have a huge problem trying to create some sort of call back system.

What am I trying to do?
I call Asterisk, press 1 to call someone back and play announcement. Hanging
up.
Then I'm creating a file:-

Channel: Zap/2-1/07966011122
Context: call-them-back
Extension: s
Priority: 1

And moving it into /var/spool/asterisk/outgoing

The asterisk gets the file and goes to context 'call-them-back', which is:-

[call-them-back]
exten = s,1,Answer
exten = s,n,Wait(1)
exten = s,n,Playback(IVR/premium/calling-back)
exten = s,n,Hangup()


But the problem is asterisk executes Playback() before the call is actually
connected.
(On the console it says that Zap/2-1 answered while it's actually trying to
ring on my mobile).

How can I resolve this problem? I'm based in the UK if it matters.

Thanks a lot for any help!

Martin

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Problems with dial status...

2006-06-30 Thread Doug Lytle

Marcin Lukasik wrote:
But the problem is asterisk executes Playback() before the call is 
actually

connected.
(On the console it says that Zap/2-1 answered while it's actually 
trying to

ring on my mobile).



This has been covered on the list many times, search the archives, the 
Wiki and Google are your friend.


On a zap channel, Asterisk can't tell when a call has been answered, so 
starts the playback immediately.  Setup a loop asking the caller to 
press a key.  I have the following setup:


[voice-mail-callback]

; 
; Set timeouts
; 

exten = s,1,Set(TIMEOUT(response)=6)
exten = s,2,Set(TIMEOUT(digit)=3)
exten = s,3,Wait(5)
exten = s,4,Set(COUNT=0)

; ***
; Play, your attention is required, press 1 to
; collect voice mail
; ***

exten = s,5,Background(attention-required)
exten = s,6,Background(press-1)
exten = s,7,Background(to-collect-voicemail)

; *
; If 1 is pressed, then play transfer and
; then jump to voice-mail context.
; *

exten = 1,1,Playback(pbx-transfer)
exten = 1,2,Goto(voice-mail,s,1)

; 
; Setup a variable to count the number of
; times the message has been played, when
; $COUNT reaches  5, play you've taken
; to long to dial and hangup.
; 

exten = t,1,Set(COUNT=$[${COUNT} + 1])
exten = t,2,NoOP(${COUNT})
exten = t,3,GotoIf($[ ${COUNT}  5 ]?103)
exten = t,4,Goto(voice-mail-callback,s,5)
exten = t,103,Playback(local/tolong-todial)
exten = t,104,Playback(goodbye)
exten = t,105,Hangup()

exten = i,1,Playback(local/sorry-invalid-choice)
exten = i,2,Set(COUNT=$[${COUNT} + 1])
exten = i,3,NoOP(${COUNT})
exten = i,4,Goto(voice-mail-callback,s,5)

exten = h,1,NoOP(Hungup)


Doug

--

Ben Franklin quote:

Those who would give up Essential Liberty to purchase a little Temporary Safety, 
deserve neither Liberty nor Safety.


___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Problems with dial status...

2006-06-30 Thread Marcin Lukasik
This has been covered on the list many times, search the archives, the 
Wiki and Google are your friend.


On a zap channel, Asterisk can't tell when a call has been answered, so 
starts the playback immediately.  Setup a loop asking the caller to press 
a key.  I have the following setup:


Doug,

Thank you. I am using my friends, and I know it's.. well... not 
possible...
But when I use Dial() to call on my mobile, it is not saying that call has 
been connected unless you actually answer it. So it makes me wonder why... 
that's why I'm asking.


Thanks,
Martin

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Problems with dial status...

2006-06-30 Thread Marcin Lukasik
On a zap channel, Asterisk can't tell when a call has been answered, so 
starts the playback immediately.  Setup a loop asking the caller to press 
a key.  I have the following setup:

[..]

I'm still wondering how to do it and I thought about BackgroundDetect(). Is 
there any way to use it to detect non-silence and non-beeps (calling signal) 
but speech?


Martin

___
--Bandwidth and Colocation provided by Easynews.com --

Asterisk-Users mailing list
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users