Re: [asterisk-users] Calling out on a group of DAHDI lines
Here's what I came up with. Works find with the simulated DAHDI dynamic local channels. I'll find out later in the week how it works with real hardware. [emergency-services] exten =>911,1,Goto(dialpsap,1) exten =>9911,1,Goto(dialpsap,1) ; exten =>999,1,Goto(dialpsap,1) exten =>112,1,Goto(dialpsap,1) exten =>dialpsap,1,Verbose(1,Call initiated to PSAP!) same =>n(dialit),Dial(${LOCAL}/${EMERGENCY},30) same =>n,Verbose(2,DIALSTATUS=${DIALSTATUS}) same =>n,GotoIf($["${DIALSTATUS}" = "ANSWER"]?good) same =>n(hu),SoftHangup(${EMERGENCY_CHANNEL},a) same =>n,Wait(2) same =>n,Goto(dialit) same =>n(good),NoOp(call good) same =>n,Hangup() Mitch On 10/09/2012 10:48 AM, Richard Mudgett wrote: Asterisk 1.8 (a) We will have a group of 4 analog lines into a Digium card that will be used for local calls. What is the best way to use those lines as a pool for outbound calls? Can I use ChanIsAvail(), listing those 4 channels, and then use the first one returned? There are lots of things documented in chan_dahdi.conf.sample. The following option will assign channels 1-4 to group 1. ; Logical groups can be assigned to allow outgoing roll-over. Groups range ; from 0 to 63, and multiple groups can be specified. By default the ; channel is not a member of any group. ; ; Note that an explicit empty value for 'group' is invalid, and will not ; override a previous non-empty one. The same applies to callgroup and ; pickupgroup as well. ; group=1 channel = 1-4 Then you can dial from that group of channels: same => n,Dial(DAHDI/g1/5551212) /* * data is ---v * Dial(DAHDI/pseudo[/extension[/options]]) * Dial(DAHDI/[c|r|d][/extension[/options]]) * Dial(DAHDI/![c|r|d][/extension[/options]]) * Dial(DAHDI/i[/extension[/options]]) * Dial(DAHDI/[i-](g|G|r|R)[c|r|d][/extension[/options]]) * * i - ISDN span channel restriction. * Used by CC to ensure that the CC recall goes out the same span. * Also to make ISDN channel names dialable when the sequence number * is stripped off. (Used by DTMF attended transfer feature.) * * g - channel group allocation search forward * G - channel group allocation search backward * r - channel group allocation round robin search forward * R - channel group allocation round robin search backward * * c - Wait for DTMF digit to confirm answer * r - Set distintive ring cadance number * d - Force bearer capability for ISDN/SS7 call to digital. */ (b) For emergency calls, I want to be able to force one of these lines available if all are in use. Will SoftHangup() do that? If so, do I need to Wait() after a SoftHangup() before trying to use it? SoftHangup() should do what you want for this. You need to have a wait so the soft hangup will have a chance to be recognized. I would also suggest that if you use g1 in your normal dial, you should use the highest channel as your emergency line. That channel will be the last used by the group so an emergency call will be least likely to kick off an established call. Another approach is to attempt to dial the emergency call normally. If the first attempt fails, then kick an established call. Richard -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling out on a group of DAHDI lines
On Tue, Oct 09, 2012 at 03:41:49PM -0500, Mitch Claborn wrote: > I found that I had to chmod 666 /dev/dahdi/* to allow asterisk to > use the simulation channels. The /dev/dahdi directory seems to be > recreated when dahdi starts. > > Here is what I finally came up with that works for me. > > system.conf > dynamic=loc,1:0,4,0 > fxsks=1-4 > > dynamic=loc,1:1,4,0 > fxoks=5-8 > loadzone= us > defaultzone = us > > > chan_dahdi.conf > signalling=fxs_ks > context=simulation > group=0 > channel=>1 > > signalling=fxo_ks > context=dummy > group=63 > channel=>5 > > > I can now dial out on group 63 and it rings in the simulation > context, which I forward to a SIP phone for testing. > > Is that what you expected to see? Basically yes. That should allow you to try things out without access to the actual hardware and yet still use chan_dahdi. Cheers, Shaun -- Shaun Ruffell Digium, Inc. | Linux Kernel Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com & www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling out on a group of DAHDI lines
I found that I had to chmod 666 /dev/dahdi/* to allow asterisk to use the simulation channels. The /dev/dahdi directory seems to be recreated when dahdi starts. Here is what I finally came up with that works for me. system.conf dynamic=loc,1:0,4,0 fxsks=1-4 dynamic=loc,1:1,4,0 fxoks=5-8 loadzone= us defaultzone = us chan_dahdi.conf signalling=fxs_ks context=simulation group=0 channel=>1 signalling=fxo_ks context=dummy group=63 channel=>5 I can now dial out on group 63 and it rings in the simulation context, which I forward to a SIP phone for testing. Is that what you expected to see? Mitch On 10/09/2012 12:40 PM, Shaun Ruffell wrote: Minor correction below: On Tue, Oct 09, 2012 at 12:32:44PM -0500, Shaun Ruffell wrote: On Tue, Oct 09, 2012 at 11:46:04AM -0500, Mitch Claborn wrote: (Now if I just didn't have to wait to get on-site where those lines are to try it. Too bad there isn't a DAHDI emulator for SIP lines.) You can use dynamic DAHDI spans to simulate this on a single box if you would with DAHDI-Linux 2.6.0+. Something like: In /etc/dahdi/system.conf use: dynamic=loc,1:0,4,0 fxsks=49-52 Should make the above line: fxsks=1-4 dynamic=loc,1:1,4,0 fxoks=53-56 loadzone= us defaultzone = us And in /etc/asterisk/chan_dahdi.conf: signalling=fxs_ks context=pstn group=0 channel=>1 channel=>2 channel=>3 channel=>4 signalling=fxo_ks context=simulation group=63 channel=>51 channel=>52 channel=>53 channel=>54 Now you can start up asterisk and group 0 will be your "normal" group and you can answer these lines in the "simulation" context. Dynamic local spans have been around for awhile but I've only used them on a regular basis since 2.6.0+. Cheers, Shaun -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling out on a group of DAHDI lines
Minor correction below: On Tue, Oct 09, 2012 at 12:32:44PM -0500, Shaun Ruffell wrote: > On Tue, Oct 09, 2012 at 11:46:04AM -0500, Mitch Claborn wrote: > > > > (Now if I just didn't have to wait to get on-site where those lines > > are to try it. Too bad there isn't a DAHDI emulator for SIP lines.) > > You can use dynamic DAHDI spans to simulate this on a single box if you > would with DAHDI-Linux 2.6.0+. Something like: > > In /etc/dahdi/system.conf use: > dynamic=loc,1:0,4,0 > fxsks=49-52 Should make the above line: fxsks=1-4 > dynamic=loc,1:1,4,0 > fxoks=53-56 > loadzone= us > defaultzone = us > And in /etc/asterisk/chan_dahdi.conf: > > signalling=fxs_ks > context=pstn > group=0 > channel=>1 > channel=>2 > channel=>3 > channel=>4 > > signalling=fxo_ks > context=simulation > group=63 > channel=>51 > channel=>52 > channel=>53 > channel=>54 > > Now you can start up asterisk and group 0 will be your "normal" group > and you can answer these lines in the "simulation" context. > > Dynamic local spans have been around for awhile but I've only used them > on a regular basis since 2.6.0+. > > Cheers, > Shaun -- Shaun Ruffell Digium, Inc. | Linux Kernel Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com & www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling out on a group of DAHDI lines
On Tue, Oct 09, 2012 at 11:46:04AM -0500, Mitch Claborn wrote: > > (Now if I just didn't have to wait to get on-site where those lines > are to try it. Too bad there isn't a DAHDI emulator for SIP lines.) You can use dynamic DAHDI spans to simulate this on a single box if you would with DAHDI-Linux 2.6.0+. Something like: In /etc/dahdi/system.conf use: dynamic=loc,1:0,4,0 fxsks=49-52 dynamic=loc,1:1,4,0 fxoks=53-56 loadzone= us defaultzone = us And in /etc/asterisk/chan_dahdi.conf: signalling=fxs_ks context=pstn group=0 channel=>1 channel=>2 channel=>3 channel=>4 signalling=fxo_ks context=simulation group=63 channel=>51 channel=>52 channel=>53 channel=>54 Now you can start up asterisk and group 0 will be your "normal" group and you can answer these lines in the "simulation" context. Dynamic local spans have been around for awhile but I've only used them on a regular basis since 2.6.0+. Cheers, Shaun -- Shaun Ruffell Digium, Inc. | Linux Kernel Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com & www.asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling out on a group of DAHDI lines
Excellent. I'll give it a try. (Now if I just didn't have to wait to get on-site where those lines are to try it. Too bad there isn't a DAHDI emulator for SIP lines.) Mitch On 10/09/2012 10:48 AM, Richard Mudgett wrote: There are lots of things documented in chan_dahdi.conf.sample. The following option will assign channels 1-4 to group 1. ; Logical groups can be assigned to allow outgoing roll-over. Groups range ; from 0 to 63, and multiple groups can be specified. By default the ; channel is not a member of any group. ; ; Note that an explicit empty value for 'group' is invalid, and will not ; override a previous non-empty one. The same applies to callgroup and ; pickupgroup as well. ; group=1 channel = 1-4 Then you can dial from that group of channels: same => n,Dial(DAHDI/g1/5551212) /* * data is ---v * Dial(DAHDI/pseudo[/extension[/options]]) * Dial(DAHDI/[c|r|d][/extension[/options]]) * Dial(DAHDI/![c|r|d][/extension[/options]]) * Dial(DAHDI/i[/extension[/options]]) * Dial(DAHDI/[i-](g|G|r|R)[c|r|d][/extension[/options]]) * * i - ISDN span channel restriction. * Used by CC to ensure that the CC recall goes out the same span. * Also to make ISDN channel names dialable when the sequence number * is stripped off. (Used by DTMF attended transfer feature.) * * g - channel group allocation search forward * G - channel group allocation search backward * r - channel group allocation round robin search forward * R - channel group allocation round robin search backward * * c - Wait for DTMF digit to confirm answer * r - Set distintive ring cadance number * d - Force bearer capability for ISDN/SS7 call to digital. */ (b) For emergency calls, I want to be able to force one of these lines available if all are in use. Will SoftHangup() do that? If so, do I need to Wait() after a SoftHangup() before trying to use it? SoftHangup() should do what you want for this. You need to have a wait so the soft hangup will have a chance to be recognized. I would also suggest that if you use g1 in your normal dial, you should use the highest channel as your emergency line. That channel will be the last used by the group so an emergency call will be least likely to kick off an established call. Another approach is to attempt to dial the emergency call normally. If the first attempt fails, then kick an established call. Richard -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Calling out on a group of DAHDI lines
> Asterisk 1.8 > > (a) We will have a group of 4 analog lines into a Digium card that > will > be used for local calls. What is the best way to use those lines as > a > pool for outbound calls? Can I use ChanIsAvail(), listing those 4 > channels, and then use the first one returned? There are lots of things documented in chan_dahdi.conf.sample. The following option will assign channels 1-4 to group 1. ; Logical groups can be assigned to allow outgoing roll-over. Groups range ; from 0 to 63, and multiple groups can be specified. By default the ; channel is not a member of any group. ; ; Note that an explicit empty value for 'group' is invalid, and will not ; override a previous non-empty one. The same applies to callgroup and ; pickupgroup as well. ; group=1 channel = 1-4 Then you can dial from that group of channels: same => n,Dial(DAHDI/g1/5551212) /* * data is ---v * Dial(DAHDI/pseudo[/extension[/options]]) * Dial(DAHDI/[c|r|d][/extension[/options]]) * Dial(DAHDI/![c|r|d][/extension[/options]]) * Dial(DAHDI/i[/extension[/options]]) * Dial(DAHDI/[i-](g|G|r|R)[c|r|d][/extension[/options]]) * * i - ISDN span channel restriction. * Used by CC to ensure that the CC recall goes out the same span. * Also to make ISDN channel names dialable when the sequence number * is stripped off. (Used by DTMF attended transfer feature.) * * g - channel group allocation search forward * G - channel group allocation search backward * r - channel group allocation round robin search forward * R - channel group allocation round robin search backward * * c - Wait for DTMF digit to confirm answer * r - Set distintive ring cadance number * d - Force bearer capability for ISDN/SS7 call to digital. */ > (b) For emergency calls, I want to be able to force one of these > lines > available if all are in use. Will SoftHangup() do that? If so, do I > need to Wait() after a SoftHangup() before trying to use it? SoftHangup() should do what you want for this. You need to have a wait so the soft hangup will have a chance to be recognized. I would also suggest that if you use g1 in your normal dial, you should use the highest channel as your emergency line. That channel will be the last used by the group so an emergency call will be least likely to kick off an established call. Another approach is to attempt to dial the emergency call normally. If the first attempt fails, then kick an established call. Richard -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Calling out on a group of DAHDI lines
Asterisk 1.8 (a) We will have a group of 4 analog lines into a Digium card that will be used for local calls. What is the best way to use those lines as a pool for outbound calls? Can I use ChanIsAvail(), listing those 4 channels, and then use the first one returned? (b) For emergency calls, I want to be able to force one of these lines available if all are in use. Will SoftHangup() do that? If so, do I need to Wait() after a SoftHangup() before trying to use it? -- Mitch -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users