[Asterisk-Users] Does Asterisk know if the trunks are busy?

2005-09-21 Thread Steven
I am planning on dabbling with some VOIP providers.
I was thinking of Teliax first.

My thinking is that the first LD call would go to teliax and the second 
(etc.) calls would go out to the PSTN.

I could then verify bandwidth and quality to decide when to add more trunks 
and to Internet connections.

I have been doing some concept testing with FWD for toll free calls, but I 
am using 393 as a trunk access code.

Question:

Will Asterisk know that the one Teliax circuit is in use and use a different 
trunk?
How would I make the dialplan to use a different trunk if the Teliax one is 
busy?

Currently I have:
[outrt-003-dial9]
include = outrt-003-dial9-custom
exten = _9.,1,Macro(hoodahek,${ARG1})
exten = _9.,2,Macro(dialout-trunk,1,${EXTEN:1},)   ;or could be 
Dial(Zap/g1/${EXTEN}) ;exten = _9.,3,Macro(outisbusy) ; No available 
circuits

;Since this is a PRI group, I am not sure how it's internals work. I do not 
see it say channel 1 is busy, channel 2 is busy using channel 3 in the logs.

would I just change it to:
[outrt-003-dial9]
include = outrt-003-dial9-custom
exten = _9.,1,Macro(hoodahek,${ARG1})
exten = _9.,2,Macro(dialout-trunk,4,${EXTEN:1},)   ;or could be 
Dial(IAX2/Teliax1${EXTEN}) ; Will it skip this if it is in use or down?
exten = _9.,3,Macro(dialout-trunk,1,${EXTEN:1},)   ;or could be 
Dial(Zap/g1/${EXTEN})
exten = _9.,4,Macro(outisbusy) ; No available circuits
?

-- 
-- 
Steven

May you have the peace and freedom that come from abandoning all hope of 
having a better past.
----  ---  - - -   -- -   -   --  - - - --- - --   - 
 - --- - - -- -  -- --   -   -- 



___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [Asterisk-Users] Does Asterisk know if the trunks are busy?

2005-09-21 Thread Kevin Bockman

Steven wrote:
How would I make the dialplan to use a different trunk if the Teliax one is 
busy?


This is something I'm testing right now.  This is what I use to keep 
track of how many channels are in use on each T1 and failover to 
something else if there is a problem(?).  I'll be using this for T1 and 
for VOIP.  Here's a sample:


exten = _*1XX,1,GotoIf($[ ${GROUP_COUNT(g1)}  22 ]?g2)
exten = _*1XX,n,Set(GROUP()=g1)
exten = _*1XX,n,NoOp(${GROUP_COUNT(g1)})
exten = _*1XX,n,Dial(Zap/g1/${EXTEN:1}|20)
exten = _*1XX,n,NoOp(${DIALSTATUS})
exten = _*1XX,n,GotoIf($[ ${DIALSTATUS} : CONGESTION ]?g2)
exten = _*1XX,n,Hangup

exten = _*1XX,n(g2),GotoIf($[ ${GROUP_COUNT(g2)}  22 ]?g3)
exten = _*1XX,n,NoOp(${GROUP_COUNT(g1)})
exten = _*1XX,n,Set(GROUP()=g2)
exten = _*1XX,n,NoOp(${GROUP_COUNT(g2)})
exten = _*1XX,n,Dial(Zap/g2/${EXTEN:1}|20)
exten = _*1XX,n,GotoIf($[ ${DIALSTATUS} : CONGESTION ]?g3)
exten = _*1XX,n,Hangup

... etc.  The NoOps can be taken out.  It is just a visual for debugging.


Kevin
___
--Bandwidth and Colocation sponsored by Easynews.com --

Asterisk-Users mailing list
Asterisk-Users@lists.digium.com
http://lists.digium.com/mailman/listinfo/asterisk-users
To UNSUBSCRIBE or update options visit:
  http://lists.digium.com/mailman/listinfo/asterisk-users