[asterisk-dev] Manager Interface: Newchannel vs. Newstate

Brian Capouch brianc at palaver.net
Sat Jul 8 00:35:37 MST 2006


This question didn't seem appropriate for -users.  I hope I don't find 
out that assumption is wrong.

I'm trying to understand the semantics of a particular sequence of 
events reported by the manager interface during the execution of the 
Dial application on a channel.

The scenario is simple: one local SIP station is going to call another.

Dialplan e.g.
	exten => 1001,1,Dial(SIP/${BILLS_PHONE})

"BILLS_PHONE" is an Xlite softphone.

When the Dial app is executed, why are there TWO "Newchannel" events 
reported, one for the channel's being created, and another one for its 
being in "ringing" state?  The pickup is reported as a "Newstate," but 
the ringing is a "Newchannel."

Here's what I mean, slightly edited for brevity and numbered for 
clarity.  In this example, why is event #4 not a "Newstate?"  It's the 
same channel that was created by the Newchannel event in #1, is it not? 
  #5 seems correct--a change in state.

Thanks.

B.

1. Event: Newchannel
Channel: SIP/xlite-7074
State: Down
Uniqueid: 946692634.7
 

2. Event: Dial
Source: SIP/spa3k-c233
Destination: SIP/xlite-7074
SrcUniqueID: 946692634.6
DestUniqueID: 946692634.7
 

3. Event: Newcallerid
Channel: SIP/xlite-7074
Uniqueid: 946692634.7
 

4. Event: Newchannel
Channel: SIP/xlite-7074
State: Ringing
Uniqueid: 946692634.7
 

5. Event: Newstate
Channel: SIP/xlite-7074
State: Up
Uniqueid: 946692634.7

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the asterisk-dev mailing list