[Asterisk-Users] Re: DIALSTATUS for Originate Command

Stefan Tichy asterisk at pi4tel.de
Sun Aug 28 07:27:13 MST 2005


On Sun, Aug 28, 2005 at 10:45:18AM -0000, saket  setu wrote:
> 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...

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


> 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.

No dial plan application will be executed until someone picks up at
the sip phone. If the dial plan gets involved the sip channel has
been answered.


> 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(ZAP/${EXTEN},15,t)
> exten => _XX.,2,NoOp(${DIALSTATUS})
> exten => _XX.,3,Goto(_XX.-${DIALSTATUS},1)

The target extension looks strange. But do not use
"Goto(${EXTEN}-${DIALSTATUS})" here. "_XX." will match this and you
get an endless loop.


-- 
Stefan Tichy   <asterisk at pi4tel.de>



More information about the asterisk-users mailing list