Tony Kava
2003-Nov-24 10:45 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
Greetings: I did some quick searching of my history of this list, and I tried a quick Google search as well, but perhaps someone on the list can quickly answer this question. I have a very nicely working Asterisk system at home with two Digium X100P FXO cards. When my SIP phones want to dial-out I have them setup to grab the first analog card (Zap/1) with the following extensions.conf segment: ==== snippet === ; Outbound exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) exten => _9.,2,Macro(fastbusy) exten => _9.,102,Macro(fastbusy) ==== /snippet === Zap/1 and Zap/2 are analog phone lines. What is the best method of picking an open line when someone tries to dial-out? i.e. if Zap/1 is in use how can I instruct Asterisk to use Zap/2 and vice versa? I know complex methods of making this happen, but I'm sure there is a very simple way to accomplish this task. Thanks. -- Tony Kava Network Administrator Pottawattamie County, Iowa
David Gomillion
2003-Nov-24 11:06 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
Tony Kava <> wrote:> Greetings: > > I did some quick searching of my history of this list, and I tried a > quick Google search as well, but perhaps someone on the list can > quickly answer this question. I have a very nicely working Asterisk > system at home with two Digium X100P FXO cards. When my SIP phones > want to dial-out I have them setup to grab the first analog card > (Zap/1) with the following extensions.conf segment: > > ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > exten => _9.,2,Macro(fastbusy) > exten => _9.,102,Macro(fastbusy) > > ==== /snippet ===> > Zap/1 and Zap/2 are analog phone lines. What is the best method of > picking an open line when someone tries to dial-out? i.e. if Zap/1 is > in use how can I instruct Asterisk to use Zap/2 and vice versa? I > know complex methods of making this happen, but I'm sure there is a > very simple way to accomplish this task. > > Thanks.I think the generally accepted method of this is using groups. Assign both lines to a single group, then dial out using the group instead of interface. I believe it's in zapata.conf. I hope this gets you pointed in the right direction, David Gomillion
Walker Haddock
2003-Nov-24 11:07 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
> ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > exten => _9.,2,Macro(fastbusy) > exten => _9.,102,Macro(fastbusy) > > ==== /snippet ===Use the `group` syntax for the Dial command, ie: exten => _9.,1,Dial(Zap/g1/${EXTEN:1},90,Tt) ^ And in your zapata.conf put: group = 1 before the device declaration of Zap/1 and Zap/2. Walker -- ******** DataCrest, Inc. -- Technically Superior ****************** Walker Haddock http://www.datacrest.com DataCrest, Inc. e-mail: wh@datacrest.com 1634A Montgomery Hwy. phone: 1-888-941-3282, 1-205-335-8589 Birmingham, AL 35216 fax: 1-205-823-7838 ***********************************************************************
Brancaleoni Matteo
2003-Nov-24 11:11 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
hi. use groups :) zapata.conf group=1 signalling=blah channel=1-2 etc etc then in extension.conf, just use exten => _9.,1,Dial(Zap/g1/${EXTEN:1},90,Tt) or better, add in globals section TRUNK=Zap/g1 and exten => _9.,1,Dial(Zap/${TRUNK}/${EXTEN:1},90,Tt) in outbound context matteo Il lun, 2003-11-24 alle 18:45, Tony Kava ha scritto:> Greetings: > > I did some quick searching of my history of this list, and I tried a quick > Google search as well, but perhaps someone on the list can quickly answer > this question. I have a very nicely working Asterisk system at home with > two Digium X100P FXO cards. When my SIP phones want to dial-out I have them > setup to grab the first analog card (Zap/1) with the following > extensions.conf segment: > > ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > exten => _9.,2,Macro(fastbusy) > exten => _9.,102,Macro(fastbusy) > > ==== /snippet ===> > Zap/1 and Zap/2 are analog phone lines. What is the best method of picking > an open line when someone tries to dial-out? i.e. if Zap/1 is in use how can > I instruct Asterisk to use Zap/2 and vice versa? I know complex methods of > making this happen, but I'm sure there is a very simple way to accomplish > this task. > > Thanks. > > -- > Tony Kava > Network Administrator > Pottawattamie County, Iowa > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users-- Brancaleoni Matteo <mbrancaleoni@espia.it> Espia - Emmegi Srl
Andrew Joakimsen
2003-Nov-24 11:13 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
Dial(Zap/g1/.... As long as they are in the same group asterisk will pick an unused card.> -----Original Message----- > From: asterisk-users-admin@lists.digium.com [mailto:asterisk-users- > admin@lists.digium.com] On Behalf Of Tony Kava > Sent: Monday, November 24, 2003 12:45 PM > To: 'asterisk-users@lists.digium.com' > Subject: [Asterisk-Users] Picking an open channel (FXO port) foroutbound> calls > > Greetings: > > I did some quick searching of my history of this list, and I tried aquick> Google search as well, but perhaps someone on the list can quicklyanswer> this question. I have a very nicely working Asterisk system at homewith> two Digium X100P FXO cards. When my SIP phones want to dial-out Ihave> them > setup to grab the first analog card (Zap/1) with the following > extensions.conf segment: > > ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > exten => _9.,2,Macro(fastbusy) > exten => _9.,102,Macro(fastbusy) > > ==== /snippet ===> > Zap/1 and Zap/2 are analog phone lines. What is the best method of > picking > an open line when someone tries to dial-out? i.e. if Zap/1 is in usehow> can > I instruct Asterisk to use Zap/2 and vice versa? I know complexmethods of> making this happen, but I'm sure there is a very simple way toaccomplish> this task. > > Thanks. > > -- > Tony Kava > Network Administrator > Pottawattamie County, Iowa > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users
Brian West
2003-Nov-24 11:17 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
Setup groups In your zapata.conf do group=1 before your channels => line. then Dial(Zap/g1/blah) bkw On Mon, 24 Nov 2003, Tony Kava wrote:> Greetings: > > I did some quick searching of my history of this list, and I tried a quick > Google search as well, but perhaps someone on the list can quickly answer > this question. I have a very nicely working Asterisk system at home with > two Digium X100P FXO cards. When my SIP phones want to dial-out I have them > setup to grab the first analog card (Zap/1) with the following > extensions.conf segment: > > ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > exten => _9.,2,Macro(fastbusy) > exten => _9.,102,Macro(fastbusy) > > ==== /snippet ===> > Zap/1 and Zap/2 are analog phone lines. What is the best method of picking > an open line when someone tries to dial-out? i.e. if Zap/1 is in use how can > I instruct Asterisk to use Zap/2 and vice versa? I know complex methods of > making this happen, but I'm sure there is a very simple way to accomplish > this task. > > Thanks. > > -- > Tony Kava > Network Administrator > Pottawattamie County, Iowa > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users >
asterisk@lists.styx.org
2003-Nov-24 11:21 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
> Zap/1 and Zap/2 are analog phone lines. What is the best method of picking > an open line when someone tries to dial-out? i.e. if Zap/1 is in use how can > I instruct Asterisk to use Zap/2 and vice versa? I know complex methods of > making this happen, but I'm sure there is a very simple way to accomplish > this task.-= Info about application 'ChanIsAvail' =- [Synopsis]: Check if channel is available [Description]: ChanIsAvail(Technology/resource[&Technology2/resource2...]): Checks is any of the requested channels are available. If none of the requested channels are available the new priority will be n+101 (unless such a priority does not exist, in which case ChanIsAvail will return -1. If any of the requested channels are available, the next priority will be n+1, the channel variable ${AVAILCHAN} will be set to the name of the available channel and the ChanIsAvail app will return 0. as in: exten => _9.,1,ChanIsAvail(Zap/1&Zap/2) exten => _9.,2,Dial(${AVAILCHAN}) exten => _9.,102,NoOp exten => _9.,103,Congestion (Note that specifying a timeout in the Dial application with FXO ports doesn't really do anything -- the channel is considered 'answered' as soon as the call is placed regardless of whether the remote end answers) -w
Grzegorz Nosek
2003-Nov-24 11:22 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
On Mon, 24 Nov 2003 11:45:17 -0600, Tony Kava wrote> Greetings: > > I did some quick searching of my history of this list, and I > tried a quick Google search as well, but perhaps someone on > the list can quickly answer this question. I have a very > nicely working Asterisk system at home with two Digium X100P > FXO cards. When my SIP phones want to dial-out I have them > setup to grab the first analog card (Zap/1) with the > following extensions.conf segment: > > ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > exten => _9.,2,Macro(fastbusy) > exten => _9.,102,Macro(fastbusy) > > ==== /snippet ===> > Zap/1 and Zap/2 are analog phone lines. What is the best > method of picking an open line when someone tries to dial- > out? i.e. if Zap/1 is in use how can I instruct Asterisk to > use Zap/2 and vice versa? I know complex methods of making > this happen, but I'm sure there is a very simple way to accomplish > this task. > > Thanks. >Try putting the channels in a group (IIRC just put a group=>1 in zapata.conf before channel=> lines - I don't own any Digium hardware though :( ) and replace Zap/1/ with Zap/g1/ Works for me with 2x Fritz PCI cards (i4l, as it mostly works and if it ain't broken, don't fix it.. capi is on my schedule though..) HTH, Grzegorz Nosek
Adams, Gavin
2003-Nov-24 11:23 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
> -----Original Message----- > From: Tony Kava [mailto:asterisk@pottcounty.com] > Sent: Monday, November 24, 2003 12:45 PM > To: 'asterisk-users@lists.digium.com' > Subject: [Asterisk-Users] Picking an open channel (FXO port) foroutbound> calls > > Greetings: > > I did some quick searching of my history of this list, and I tried aquick> Google search as well, but perhaps someone on the list can quicklyanswer> this question. I have a very nicely working Asterisk system at homewith> two Digium X100P FXO cards. When my SIP phones want to dial-out Ihave> them > setup to grab the first analog card (Zap/1) with the following > extensions.conf segment:Tony, In the [channels] section of Zapata.conf, create a group => 1 (or some value), followed by the two FXO port definitions. Now change the Dial string to Zap/g1 (where g1 is group 1, etc). A small 'g' will grab the first available port and work upwards (i.e., Zap/1 the Zap/2, etc.). While a capital G will do the same, but from highest defined port to lowest. Definitely in the wiki and Digium docs. :) Regards, --- Gavin
TC
2003-Nov-24 11:43 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
> extensions.conf segment: > > ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt)exten => _9.,1,Dial(Zap/g1/${EXTEN:1},90,Tt) ;search first open zap in acending orders or exten => _9.,1,Dial(Zap/G1/${EXTEN:1},90,Tt) ;search first open zap in decending order asuming in zapata.conf you have group=1 b4 the channel=1-2 stmts
Rich Adamson
2003-Nov-24 12:09 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
> > ==== snippet ===> > > > ; Outbound > > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > > exten => _9.,2,Macro(fastbusy) > > exten => _9.,102,Macro(fastbusy) > > > > ==== /snippet ===> > Use the `group` syntax for the Dial command, ie: > > exten => _9.,1,Dial(Zap/g1/${EXTEN:1},90,Tt) > ^ > > And in your zapata.conf put: > > group = 1 > > before the device declaration of Zap/1 and Zap/2.However, beware that if you have any analog phones on those two lines, * will not detect whether they are in use and will dial over the top of any existing conversation. * does not sense dialtone, etc. Rich
Joe Kellman
2003-Nov-24 12:16 UTC
[Asterisk-Users] Picking an open channel (FXO port) for outbound calls
first you would set up a group in zapata.conf [channels] signalling=fxs_ks group=1 channel=1-2 then in your extensions.conf file replace your dial line with this: exten => _9.,1,Dial(Zap/g1/${EXTEN:1},90,Tt) ..Hope this helps...jak --- Tony Kava <asterisk@pottcounty.com> wrote:> Greetings: > > I did some quick searching of my history of this > list, and I tried a quick > Google search as well, but perhaps someone on the > list can quickly answer > this question. I have a very nicely working > Asterisk system at home with > two Digium X100P FXO cards. When my SIP phones want > to dial-out I have them > setup to grab the first analog card (Zap/1) with the > following > extensions.conf segment: > > ==== snippet ===> > ; Outbound > exten => _9.,1,Dial(Zap/1/${EXTEN:1},90,Tt) > exten => _9.,2,Macro(fastbusy) > exten => _9.,102,Macro(fastbusy) > > ==== /snippet ===> > Zap/1 and Zap/2 are analog phone lines. What is the > best method of picking > an open line when someone tries to dial-out? i.e. if > Zap/1 is in use how can > I instruct Asterisk to use Zap/2 and vice versa? I > know complex methods of > making this happen, but I'm sure there is a very > simple way to accomplish > this task. > > Thanks. > > -- > Tony Kava > Network Administrator > Pottawattamie County, Iowa > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users