Problem in generating automated calls

i am using manager API foe automated calls
when i call on sip/user and play some thing it works
exten => 1000,1,Wait()
exten => 1000,2,Answer()
exten => 1000,3,Background(enter-ext-of-person)
exten => 1000,4,Hangup()

but when i call on zap/4/number on same extension it hangs up and problem it displays on CLI> is
my whole execution on CLI> is given as under
== Manager ‘M3’ logged on from
> Channel Zap/4-1 was answered.
– Executing Wait(“Zap/4-1”, “”) in new stack
– Executing Answer(“Zap/4-1”, “”) in new stack
– Executing BackGround(“Zap/4-1”, “enter-ext-of-person”) in new stack
– Playing ‘enter-ext-of-person’ (language ‘en’)
Aug 24 14:36:02 NOTICE[11638]: channel.c:2432 __ast_request_and_dial: Unable to request channel ZAP/4/8003335382907
– Executing Hangup(“Zap/4-1”, “”) in new stack
== Spawn extension (LED, 1000, 4) exited non-zero on 'Zap/4-1’
plzz help me out

system is doing exactly what it’s supposed to - you have it set to play a file and hang up…that’s exactly what the system is doing.

Post your script block that is attempting the dial that gives you the error.

We don’t have ESP.

heheh…i do, but i choose to use my powers for evil instead of good.

/got nuthin.

it is just showing the things problem is when i use

exten =>1,1,Answer() ;my mobile starts ringing
exten =>1,2,Wait(1) ;it drops the call after 1 sec and there i see a missed call on my mobile phone then it starts executing
exten => 1,3,Playback(vm-goodbye) ;which i cant listen because the call is already dropped
exten => 1,4,Hangup() ;thats the whole thing it is executing

i have solved the problem by changing Wait(1) to Wait(20) now what happens . my mobile starts ringing i picked up the phone and wait 20 sec to listen good bye message
how can i solve this problem and do like when i picked up the call then at the same time it speaks the message please help me out

you mention dialing zap/4 it errors… your script doesnt show any dialing at all. How about you post the entire script that is being executed. How is your cell phone ringing? What places the call to it? What moves you to the context that you are posting? What is the output on the CLI from the context posted. These are all things you need to answer if you want help.

Actually i am generating automated calls and there is an ans (automatic notification service) running on windows on an other PC attached wilth local network ,
with the help of manager API i am generating call
there i have mention
originate : “zap/4/MobileNo.” to which i have to make call
context : “LED” the context where the extension is given to be executed when my manager API origiinate call
extension : “1000” here is the extension which is executed when manager API generates call
the problem is my manager API generates call and come to the extension which i have mentioned before and my mobile rings ,but before i pick it up it executes the whole thing in the mentioned extension and hangup
i removed the Hangup() option from my dial plane but it runs in the same way when i mention wait(30) (increas the length of wait ) now it rings uptill 30 seconds if i recieve the call in just 3 seconds i have to wait for 27 more seconds to listen what i have written in Playback
i want that when i pick up my phone ,it should then execute playback(filename) not before or after a long time , because it is possible that my users pick up the phone in 2 seconds, or may be after two minutes so Playback should be executed on when he/she attends the call
there is a problem in this asterisk that when the bell is ringing on my mobile phone , it sets the variable of DIALSTATUS to ANSWERED not on picking up , that is why for this asterisk if i cancel the call or attend the call the behaviour of the log file i-e. CDR is same ,
the application i want to search is common , every telecom company use this but unfortunately i am unable to find it out yet even in this forum
telecom company check the attended call response in billing process , when the phone is just ringing , no one charge the users , they charge the users only when the other peson picks up the phone , so there should be some way of checking the response of the users that is he/she attended the call or not
i think it is now clear what i want , and may be ur interest in this problem can solve the problem of many other people , as i am not the only person working on it in the world
i am just a student
thnx for ur previous response

Umer Arfi

hi world
is there no one who can help me out in this problem it is such a big forum and great people are sitting here
no one can solve a problem of a student like me

in layman’s terms, put what you are trying to do in words - that would be easier than trying to figure out what your code is trying to do.

in other words, from the sounds of it, you want a script that will dial out to a phone, wait for an answer, then play back a file, correct?

if so, i have a script built already that does just that, but it requires the person being called to press a button to ‘acknowledge’ the call…which, from what i can tell, is exactly what you want.

again, please post what you are trying to do, it will help everyone here out.

thnx buddy
can u please send me that script