[Asterisk-Dev] Dial() returns - +1 or +101 and what they mean

Stephen Davies steve at daviesfam.org
Wed Dec 24 03:16:49 MST 2003


I'm confused about the meaning of the +1 and +101 returns from Dial().
Right now to me it looks like Asterisk doesn't implement this
consistently between channel types.

The handbook explains that the +101 return is used for "Busy", if no
called party doesn't answer then flow continues at +1.  If a called
party does answer then the legs are bridged and we are done.

This is demonstrated with a Zap interface connected to an extension.

  exten => 6001,1,Dial(Zap/1,10)
  exten => 6001,2,Voicemail(u6001)
  exten => 6001,102,Voicemail(b6001)

So: for Zap interfaces flow branches to +101 if the channel is
unavailable, to +1 if it isn't answered.

Note that this logic is applied whether the interface is for a phone
or for a trunk - so a trunk interface in use behaves like "Busy" and
brances to +101.  To me that seems illogical.

Now - in section 4.3.10 an example is presented of "failover
trunking" - the example uses IAX:

  exten => _91256NXXXXXXX,1,Dial(IAX/hsv/${EXTEN})
  exten => _91256NXXXXXXX,2,Dial(Zap/g2/{EXTEN:1})
  exten => _91256NXXXXXXX,3,Congestion

Here, it seems an IAX channel will continue to +1 if the channel isn't
available. This is the opposite to the logic for Zap channels!?

What am I not understanding?

Or, is the problem that Dial should have more than two returns - right
now Busy, Congestion and No answer within timeout are all being
squeezed into two returns.


More information about the asterisk-dev mailing list