[Asterisk-Users] DIALSTATUS for Originate

Geoff Karl geoff.karl at gmail.com
Sun Aug 28 12:45:02 MST 2005


On 28 Aug 2005 10:35:34 -0000, saket  setu <saketsetu at rediffmail.com> wrote:
> 
> 
>    
>  Hi all,
>  I am from India and has been recently using asterisk for testing and enahncing my telephony knowledge. I am trying to use the originate Command from the Asterisk manager on both SIP and ZAP. The command works successfully but does not return any DIALSTATUS such as BUSY,ANSWER,NOANSWER as in case of command DIAL when used from the dial plan. Can some one guide me how to get the vaue of $DIALSTUATUS on originate or is there some other way to trap the status both on SIP and ZAP.
>  
>  I have also tried to write a dial plan in a manner such that i originate a call to my internal extension and jump to a context in the dial plan and execute the Dial command and trap all the statuses but this also does not work and it straight away bridges my internal extension to the external call without returning any dial status.
>  
>  Here is the example of what i did:
>  1. Originate:
>  Action: Originate
>  Channel: SIP/201 (Internal extension)
>  Context: Airtel
>  Extension: 26191341(External PSTN Number)
>  Priority: 1
>  
>  2. Dial Plan :
>  [AIRTEL]
>  exten => _XX.,1,Dial(SIP/${ETEN},15,t)
>  exten => _XX.,2,NoOp(${DIALSTATUS})
>  exten => _XX.,3,Goto(_XX.-${DIALSTATUS},1)
>  exten => _XX.-Busy,1,Hangup
>  exten => _XX.-NOANSWER,1,Hangup
>  exten => _XX.-ANSWER,1,Goto(s,1)
>  exten => s,1,Queue(Airtel|r|||300)
>  
>  thanks
>  Saket 

Stefan Tichy Wrote:

Response: Success
Message: Originate successfully queued

Indeed this response to a originate manager command is not what you
may have expected. You can listen to the events provided by the
manager interface and wait for something like this:

Event: Newstate
Channel: SIP/201-....
State: Up

----------------------------------


If you are using Async and the action ID for some reason the Event:
Newstate doesn't respond with the ActionID, but only a automatically
generated "Uniqueid".

Any ideas on how to determine which ActionID is being returned?

Thanks,

Geoff



More information about the asterisk-users mailing list