Vincent Delporte
2006-Jun-16 08:31 UTC
[Asterisk-Users] Two FXO: How to dial a number when a RING comes in?
Hi I'm a little lost on how to set things up with the two FXO cards I have: I want card #2 to dial a number when a call comes in on card #1. Using the following configuration, card #1 picks up the line and remains silent, instead of dialing out through card #2. Anybody knows what's wrong? --------- /etc/zaptel.conf --------- # Zaptel Configuration File # fxsks=1,2 loadzone=fr defaultzone=fr --------- /etc/asterisk/zapata.conf --------- [channels] context=cherbourg signalling=fxs_ks usecallerid=yes echocancel=yes callgroup=1 pickupgroup=1 immediate=no callerid="my caller id"<(123) 123-1234> channel=>1 context=cherbourg signalling=fxs_ks usecallerid=yes echocancel=yes callgroup=1 pickupgroup=1 immediate=no callerid="my caller id"<(123) 123-1234> channel=>2 --------- /etc/asterisk/extensions.conf --------- [general] static=yes writeprotect=no autofallthrough=yes clearglobalvars=no priorityjumping=no [globals] CONSOLE=Console/dsp ; Console interface for demo IAXINFO=guest ; IAXtel username/password ;Changed from TRUNK=Zap/g2 ; Trunk interface TRUNK=Zap/1 ; Trunk interface TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) [cherbourg] ;Hid the number to protect the innocents exten => s,1,Dial(Zap/2/014XXXXXX) --------- Thank you! -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.9.0/366 - Release Date: 15/06/2006
Noah Miller
2006-Jun-16 09:19 UTC
[Asterisk-Users] Two FXO: How to dial a number when a RING comes in?
Hi Vincent -> I'm a little lost on how to set things up with the two FXO cards I have: I > want card #2 to dial a number when a call comes in on card #1. Using the > following configuration, card #1 picks up the line and remains silent, > instead of dialing out through card #2. Anybody knows what's wrong?Several things: ------------------------------------------ ONE: You should answer an incoming zap line before doing anything with it, so do this: exten => s,1,Answer exten => s,2,Dial(Zap/2/014XXXXXX) ------------------------------------------ TWO: Are there any console messages? Can you dial into the system and get internal extensions? Maybe you could try a testing dialplan like this: exten => s,1,Answer exten => s,2,Waitexten(10) exten => 100,Dial(Zap/2/014XXXXXX) Then call in and after you're connected, dial 100 to see if it will dial out on ZAP/2 ------------------------------------------ THREE: According to your config, all incoming calls on either zap line will try to dial out on ZAP/2. This will cause problems when the incoming call is coming in on ZAP/2. One way to fix this would be to have the lines go to different contexts, and the have an incoming call zap channel 1 goto a different context where it can dial out on zap channel 2. A (shortened) config might look like this: zapata.conf: context=cherbourg1 channel => 1 context=cherbourg2 channel => 2 [cherbourg1] exten => s,1,Goto(cherbourg2,dialout,1) [cherbourg2] exten => dialout,1,Dial(Zap/2/014XXXXXX) ------------------------------------------ FOUR: Also, just to clarify, in the config you have posted the following lines don't do anything:> ;Changed from TRUNK=Zap/g2 ; Trunk interface > TRUNK=Zap/1 ; Trunk interfaceYou're setting the variable TRUNK, but you're not using it anywhere. You would have to invoke it some way - maybe like this: exten => 100,1,Dial(${TRUNK}) - Noah> > --------- /etc/zaptel.conf --------- > > # Zaptel Configuration File > # > fxsks=1,2 > loadzone=fr > defaultzone=fr > > --------- /etc/asterisk/zapata.conf --------- > > [channels] > context=cherbourg > signalling=fxs_ks > usecallerid=yes > echocancel=yes > callgroup=1 > pickupgroup=1 > immediate=no > callerid="my caller id"<(123) 123-1234> > channel=>1 > > context=cherbourg > signalling=fxs_ks > usecallerid=yes > echocancel=yes > callgroup=1 > pickupgroup=1 > immediate=no > callerid="my caller id"<(123) 123-1234> > channel=>2 > > --------- /etc/asterisk/extensions.conf --------- > [general] > static=yes > writeprotect=no > autofallthrough=yes > clearglobalvars=no > priorityjumping=no > > [globals] > CONSOLE=Console/dsp ; Console interface for demo > IAXINFO=guest ; IAXtel username/password > > ;Changed from TRUNK=Zap/g2 ; Trunk interface > TRUNK=Zap/1 ; Trunk interface > TRUNKMSD=1 ; MSD digits to strip (usually 1 or 0) > > [cherbourg] > ;Hid the number to protect the innocents > exten => s,1,Dial(Zap/2/014XXXXXX) > --------- > > Thank you! > > > -- > No virus found in this outgoing message. > Checked by AVG Anti-Virus. > Version: 7.1.394 / Virus Database: 268.9.0/366 - Release Date: 15/06/2006 > > > _______________________________________________ > --Bandwidth and Colocation provided by Easynews.com -- > > Asterisk-Users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Andrew Kohlsmith
2006-Jun-16 10:14 UTC
[Asterisk-Users] Two FXO: How to dial a number when a RING comes in?
On Friday 16 June 2006 12:19, Noah Miller wrote:> ONE: > You should answer an incoming zap line before doing anything with it, > so do this: > > exten => s,1,Answer > exten => s,2,Dial(Zap/2/014XXXXXX)Why? It seems clear to me that if the person dialed through Zap/2 does not answer, that he does not want to answer the ringing line... I think there may be a gotcha here for analogue zaptel interfaces, wherein the ring will keep getting detected an keep (re)trying to dial, but having to answer the zap line before doing anything with it (especially routing) is NOT what I would consider standard operating procedure. -A.
Vincent Delporte
2006-Jun-19 10:25 UTC
[Asterisk-Users] Re: Two FXO: How to dial a number when a RING comes in?
Thanks Noah for the help, but... no go :-/>From: "Noah Miller" > >ONE: You should answer an incoming zap line before doing anything with it, >so do this: > >exten => s,1,Answer >exten => s,2,Dial(Zap/2/014XXXXXX)When I try this, instead of using the Zap/2 interface to ring the other number, Asterisk goes off hook and I hear some kind of static: Jun 19 18:17:46 NOTICE[2186] chan_zap.c: Got event 18 (Ring Begin)... Jun 19 18:17:47 NOTICE[2186] chan_zap.c: Got event 2 (Ring/Answered)... Jun 19 18:17:51 NOTICE[2186] chan_zap.c: Got event 18 (Ring Begin)...>TWO: Are there any console messages? Can you dial into the system and get >internal extensions? Maybe you could try a testing dialplan like this: > >exten => s,1,Answer >exten => s,2,Waitexten(10) > >exten => 100,Dial(Zap/2/014XXXXXX) > >Then call in and after you're connected, dial 100 to see if it will dial >out on ZAP/2When I try this, /var/log/asterisk/messages says: Jun 19 18:12:38 NOTICE[1660] pbx.c: Cannot find extension '100' in context '(null)' Jun 19 18:12:38 WARNING[1660] pbx_config.c: Invalid priority/label 'Dial' at line 172 I just realized that I blindly typed the above, without realizing that the second parameter is missing. Regardless, since even the first test doesn't work... Just in case, I'd like to repeat that I don't want Asterisk to answer the call: I just want it to use the second FXO to ring another phone, at a remote location. For reference, I went back to the original configuration that I used, but it picks up the line and remains silent (static noises): ------- extensions.conf ---------- [cherbourg] exten => s,1,Dial(Zap/2/0145815059) ------- zaptel.conf ----------- fxsks=1,2 loadzone=fr defaultzone=fr -------- zapata.conf ----------- [channels] ;context=default context=cherbourg signalling=fxs_ks usecallerid=yes echocancel=yes callgroup=1 pickupgroup=1 immediate=no callerid="my caller id"<(123) 123-1234> channel=>1 ;context=default context=cherbourg signalling=fxs_ks usecallerid=yes echocancel=yes callgroup=1 pickupgroup=1 immediate=no callerid="my caller id"<(123) 123-1234> channel=>2 and just in case you're wondering if the FXO cards are correctly loaded... ----- dmesg --------- Jun 19 18:12:31 localhost syslogd 1.4.1: restart. Jun 19 18:12:31 localhost kernel: klogd 1.4.1, log source = /proc/kmsg started. Jun 19 18:12:31 localhost kernel: Linux version 2.6.13.4-1.x86.i686.cmov (conary.rpath.com@rpl:1) (gcc version 3.4.4) #1 Wed Nov 23 11:31:48 EST 2005 [...] Jun 19 18:12:31 localhost kernel: Zapata Telephony Interface Registered on major 196 Jun 19 18:12:31 localhost kernel: Zaptel Version: Echo Canceller: KB1 Jun 19 18:12:31 localhost kernel: Registered Tormenta2 PCI Jun 19 18:12:31 localhost kernel: ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 5 Jun 19 18:12:31 localhost kernel: PCI: setting IRQ 5 as level-triggered Jun 19 18:12:31 localhost kernel: ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [LNKA] -> GSI 5 (level, low) -> IRQ 5 Jun 19 18:12:32 localhost kernel: wcfxo: DAA mode is 'FCC' Jun 19 18:12:32 localhost kernel: Found a Wildcard FXO: Generic Clone Jun 19 18:12:32 localhost kernel: ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10 Jun 19 18:12:32 localhost kernel: PCI: setting IRQ 10 as level-triggered Jun 19 18:12:32 localhost kernel: ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKD] -> GSI 10 (level, low) -> IRQ 10 Jun 19 18:12:32 localhost kernel: wcfxo: DAA mode is 'FCC' Jun 19 18:12:32 localhost kernel: Found a Wildcard FXO: Generic Clone Jun 19 18:12:32 localhost kernel: usbcore: registered new driver wcusb Jun 19 18:12:32 localhost kernel: Wildcard USB FXS Interface driver registered Jun 19 18:12:35 localhost kernel: Registered tone zone 2 (France) => Surely, I can't be the only one in this list who needs to set up Asterisk simply to ring a remote phone when a call comes in at the office. Anybody has a working configuration that I could use as a reference? Thank you :-) VD. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.9.0/368 - Release Date: 16/06/2006
Vincent Delporte
2006-Jun-20 07:01 UTC
[Asterisk-Users] Re: Two FXO: How to dial a number when a RING comes in?
Thanks Noah for the help, but... no go :-/>From: "Noah Miller" > >ONE: You should answer an incoming zap line before doing anything with it, >so do this: > >exten => s,1,Answer >exten => s,2,Dial(Zap/2/014XXXXXX)When I try this, instead of using the Zap/2 interface to ring the other number, Asterisk goes off hook and I hear some kind of static: Jun 19 18:17:46 NOTICE[2186] chan_zap.c: Got event 18 (Ring Begin)... Jun 19 18:17:47 NOTICE[2186] chan_zap.c: Got event 2 (Ring/Answered)... Jun 19 18:17:51 NOTICE[2186] chan_zap.c: Got event 18 (Ring Begin)...>TWO: Are there any console messages? Can you dial into the system and get >internal extensions? Maybe you could try a testing dialplan like this: > >exten => s,1,Answer >exten => s,2,Waitexten(10) > >exten => 100,Dial(Zap/2/014XXXXXX) > >Then call in and after you're connected, dial 100 to see if it will dial >out on ZAP/2When I try this, /var/log/asterisk/messages says: Jun 19 18:12:38 NOTICE[1660] pbx.c: Cannot find extension '100' in context '(null)' Jun 19 18:12:38 WARNING[1660] pbx_config.c: Invalid priority/label 'Dial' at line 172 I just realized that I blindly typed the above, without realizing that the second parameter is missing. Regardless, since even the first test doesn't work... Just in case, I'd like to repeat that I don't want Asterisk to answer the call: I just want it to use the second FXO to ring another phone, at a remote location. For reference, I went back to the original configuration that I used, but it picks up the line and remains silent (static noises): ------- extensions.conf ---------- [cherbourg] exten => s,1,Dial(Zap/2/0145815059) ------- zaptel.conf ----------- fxsks=1,2 loadzone=fr defaultzone=fr -------- zapata.conf ----------- [channels] ;context=default context=cherbourg signalling=fxs_ks usecallerid=yes echocancel=yes callgroup=1 pickupgroup=1 immediate=no callerid="my caller id"<(123) 123-1234> channel=>1 ;context=default context=cherbourg signalling=fxs_ks usecallerid=yes echocancel=yes callgroup=1 pickupgroup=1 immediate=no callerid="my caller id"<(123) 123-1234> channel=>2 and just in case you're wondering if the FXO cards are correctly loaded... ----- dmesg --------- Jun 19 18:12:31 localhost syslogd 1.4.1: restart. Jun 19 18:12:31 localhost kernel: klogd 1.4.1, log source = /proc/kmsg started. Jun 19 18:12:31 localhost kernel: Linux version 2.6.13.4-1.x86.i686.cmov (conary.rpath.com@rpl:1) (gcc version 3.4.4) #1 Wed Nov 23 11:31:48 EST 2005 [...] Jun 19 18:12:31 localhost kernel: Zapata Telephony Interface Registered on major 196 Jun 19 18:12:31 localhost kernel: Zaptel Version: Echo Canceller: KB1 Jun 19 18:12:31 localhost kernel: Registered Tormenta2 PCI Jun 19 18:12:31 localhost kernel: ACPI: PCI Interrupt Link [LNKA] enabled at IRQ 5 Jun 19 18:12:31 localhost kernel: PCI: setting IRQ 5 as level-triggered Jun 19 18:12:31 localhost kernel: ACPI: PCI Interrupt 0000:00:08.0[A] -> Link [LNKA] -> GSI 5 (level, low) -> IRQ 5 Jun 19 18:12:32 localhost kernel: wcfxo: DAA mode is 'FCC' Jun 19 18:12:32 localhost kernel: Found a Wildcard FXO: Generic Clone Jun 19 18:12:32 localhost kernel: ACPI: PCI Interrupt Link [LNKD] enabled at IRQ 10 Jun 19 18:12:32 localhost kernel: PCI: setting IRQ 10 as level-triggered Jun 19 18:12:32 localhost kernel: ACPI: PCI Interrupt 0000:00:09.0[A] -> Link [LNKD] -> GSI 10 (level, low) -> IRQ 10 Jun 19 18:12:32 localhost kernel: wcfxo: DAA mode is 'FCC' Jun 19 18:12:32 localhost kernel: Found a Wildcard FXO: Generic Clone Jun 19 18:12:32 localhost kernel: usbcore: registered new driver wcusb Jun 19 18:12:32 localhost kernel: Wildcard USB FXS Interface driver registered Jun 19 18:12:35 localhost kernel: Registered tone zone 2 (France) => Surely, I can't be the only one in this list who needs to set up Asterisk simply to ring a remote phone when a call comes in at the office. Anybody has a working configuration that I could use as a reference? Thank you :-) VD. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.9.1/369 - Release Date: 19/06/2006
Eric "ManxPower" Wieling
2006-Jun-20 08:52 UTC
[Asterisk-Users] Re: Two FXO: How to dial a number when a RING comes in?
Vincent Delporte wrote:> Thanks Noah for the help, but... no go :-/ > >> From: "Noah Miller" >> >> ONE: You should answer an incoming zap line before doing anything with >> it, so do this: >> >> exten => s,1,Answer >> exten => s,2,Dial(Zap/2/014XXXXXX) > > When I try this, instead of using the Zap/2 interface to ring the other > number, Asterisk goes off hook and I hear some kind of static:You have a problem unrelated to what you are trying to do. Fix the problem with dialing out of Zap/2 first. -- Now accepting new clients in Birmingham, Atlanta, Huntsville, Chattanooga, and Montgomery.
John D. Coleman
2006-Jun-20 08:53 UTC
[Asterisk-Users] Re: Two FXO: How to dial a number when a RING comes in?
Correct me if I'm wrong but I think you would want to use the transfer command instead of dial to get it to call out to a remote office. -John
Vincent Delporte
2006-Jun-20 21:38 UTC
[Asterisk-Users] Re: Two FXO: How to dial a number when a RING comes in?
Hello From: "Eric \"ManxPower\" Wieling" <eric@fnords.org>>You have a problem unrelated to what you are trying to do. Fix the >problem with dialing out of Zap/2 first.As an Asterisk newbie, I have no idea what you mean :-) Besides checking that the two FXO cards seem to be loaded by Asterisk (the [demo] works), and go from RED to OK when I plug in phone lines... how can I check that there is no issue with the HW before I go further? Thx. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.9.2/370 - Release Date: 20/06/2006
Vincent Delporte
2006-Jun-20 21:42 UTC
[Asterisk-Users] Re: Two FXO: How to dial a number when a RING comes in?
Hello From: From: "John D. Coleman" <jcoleman@swecu.com>>Correct me if I'm wrong but I think you would want to use the transfer >command instead of dial to get it to call out to a remote office.The reason I used Dial() is because it's what I saw in "Asterisk The Future of Telephony.pdf" : (page 88) "If you are making outbound calls on an FXO Zap channel, you can use the following syntax to dial a number on that channel: exten => 123,1,Dial(Zap/4/5551212) This example would dial the number 555-1212 on the Zap/4 channel." Does someone have an example of how to dial out a remote number when a call comes in through another FXO card? Thx. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.9.2/370 - Release Date: 20/06/2006
Vincent Delporte
2006-Jun-28 15:38 UTC
[Asterisk-Users] Re: Two FXO: How to dial a number when a RING comes in?
Hi From: "Noah Miller" <noahisaacmiller@gmail.com>>Sorry for the long delay in responding. I didn't see you message until >now due to the postfix problems on the mailing list.No problem. I've decided to dump the rPath PoundKey linux distro because it was still using Asterisk 1.2.5 and it was pointless to try to solve this issue using older versions. Incidently, at least two people tried to do what I'd like to do... but failed. I'm beginning to think no one at Asterisk ever had the idea that maybe someone would want to use Asterisk just as a simple bridget between two POTS lines, with no IVR...>I think Eric Wieling is right. You have another problem not related to >what you are trying to do in the dialplan. It sounds like one of your fxo >cards or one of your phone lines is not working properly (or maybe >both). Test both phone lines and both interfaces by dialing into both of >them (make sure they are pointed to a context in the extensions.conf, and >make sure they have something to do there when you try to dial). Can you >get in to the asterisk box at all? Then >try swapping the phone lines with the fxo interfaces. Can you dial in then?I'll finish installing Asterisk tomorrow (got an error when compiling Zaptel on Fedora 5, but found the probable reason why on the web forum). Once it's up and running, I'll go through the tests, including setting up an SIP softphone on a Windows host and trying to call out or be called in through both FXO cards. In the mean time, the config files are really basic: ------------- FILES --------------------- ZAPTEL.CONF fxsks=1,2 loadzone=fr defaultzone=fr ZAPATA.CONF [channels] context=cherbourg signalling=fxs_ks usecallerid=yes echocancel=yes channel=>1,2 EXTENSIONS.CONF [general] static=yes writeprotect=no autofallthrough=yes clearglobalvars=no priorityjumping=no [globals] TRUNK=Zap/2 ; Trunk interface [cherbourg] ;If RING on Zap/1, just dial remote through through Zap/2 exten => s,1,NoOp(Before Dialing out through ${TRUNK}) exten => s,n,Dial(${TRUNK}/01XXXXXX) exten => s,n,NoOp(After Dialing out through ${TRUNK}) ------------- FILES --------------------- Your help is much appreciated :-) VD. -- No virus found in this outgoing message. Checked by AVG Anti-Virus. Version: 7.1.394 / Virus Database: 268.9.5/377 - Release Date: 27/06/2006