Derrick Stensrud
2005-Sep-04 05:39 UTC
[Asterisk-Users] HELP - How Do I Separate incoming channels from the others on a PRI
Okay, here is the background. I have a PRI with 15 active channels on it. I originally setup all of them in group=1 and all outgoing and incoming calls used this group. The phone number that I have associated with these channels ends with 750 and that is how I direct the calls. i.e. In my extensions.conf I have: exten => 750,1,Dial(SIP/120,20) All this works fine. Now I have the need to separate out three of the channels (13-15). I am using the associated phone number ending in 767 for this purpose. I have currently changed the zapata.conf to look like this: signalling=pri_cpe switchtype=national echocancel=yes echocancelwhenbridged=yes echotraining=yes callerid=asreceived group=1 context=default channel=>1-12 group=2 context=fax channel=>13-15 To my understanding this is supposed to separate channels 1-12 into group 1 and channels 13-15 into group 2. If that is true, that's fine, but it doesn't help me with my current issue. This is what I would like... When a call comes into the phone number ending in 750 it uses up the 12 channels in the first group, and when a call comes into the phone number ending in 767 it uses the 3 channels in group 2 AND USES NO MORE CHANNELS, only those three. The reason for all of this is that I have faxing through asterisk working and want those last three channels used for faxing but I do not want the fax lines eating up all my channels and leaving none for voice calls. My Company has evacuated from Hurricane Katrina and any help you can provide would be greatly appreciated. Thanks in advance.
C F
2005-Sep-04 09:22 UTC
[Asterisk-Users] HELP - How Do I Separate incoming channels from the others on a PRI
This is something that you wouldn't have any control over in most cases. Your provider is the one that is sending the lines over the whole PRI, they don't and shouldn't care about which channel it comes over, they would use some system like gGrR that you can use in Asterisk to send it to the next available channel, but not over a specific one. For your problem the easiest workaround would be to have extensions setup in extensions.conf for your fax numbers, and use the setgroup checkgroup apps to make sure that you don't use more than 3 channels at onece for the 4th channel you can use the Busy or congestion app to the PRI so that the caller gets a busy or circuit busy tone. On 9/4/05, Derrick Stensrud <dstensrud@worleyco.com> wrote:> Okay, here is the background. I have a PRI with 15 active channels on > it. I originally setup all of them in group=1 and all outgoing and > incoming calls used this group. The phone number that I have associated > with these channels ends with 750 and that is how I direct the calls. > i.e. In my extensions.conf I have: > > exten => 750,1,Dial(SIP/120,20) > > All this works fine. Now I have the need to separate out three of the > channels (13-15). I am using the associated phone number ending in 767 > for this purpose. I have currently changed the zapata.conf to look like > this: > > signalling=pri_cpe > switchtype=national > echocancel=yes > echocancelwhenbridged=yes > echotraining=yes > callerid=asreceived > group=1 > context=default > channel=>1-12 > group=2 > context=fax > channel=>13-15 > > To my understanding this is supposed to separate channels 1-12 into > group 1 and channels 13-15 into group 2. If that is true, that's fine, > but it doesn't help me with my current issue. This is what I would > like... When a call comes into the phone number ending in 750 it uses > up the 12 channels in the first group, and when a call comes into the > phone number ending in 767 it uses the 3 channels in group 2 AND USES NO > MORE CHANNELS, only those three. The reason for all of this is that I > have faxing through asterisk working and want those last three channels > used for faxing but I do not want the fax lines eating up all my > channels and leaving none for voice calls. My Company has evacuated from Hurricane Katrina and any help you can provide would be greatly appreciated. Thanks in advance. > > > _______________________________________________ > --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 >
Adam Goryachev
2005-Sep-04 10:00 UTC
[Asterisk-Users] HELP - How Do I Separate incoming channels from the others on a PRI
On Sun, 2005-09-04 at 07:39 -0500, Derrick Stensrud wrote: Re-sending your message every 12 hours isn't "nice".... wait at least a couple of days, and while you wait, try to read/test more things, so that the second time around, you can actually demonstrate that you have progressed somewhat....> Okay, here is the background. I have a PRI with 15 active channels on > it. I originally setup all of them in group=1 and all outgoing and > incoming calls used this group. The phone number that I have associated > with these channels ends with 750 and that is how I direct the calls. > i.e. In my extensions.conf I have: > > exten => 750,1,Dial(SIP/120,20) > > All this works fine.Great...> Now I have the need to separate out three of the > channels (13-15). I am using the associated phone number ending in 767 > for this purpose. I have currently changed the zapata.conf to look like > this: > > group=1 > context=default > channel=>1-12 > group=2 > context=fax > channel=>13-15 > > To my understanding this is supposed to separate channels 1-12 into > group 1 and channels 13-15 into group 2. If that is true, that's fine, > but it doesn't help me with my current issue. This is what I would > like... When a call comes into the phone number ending in 750 it uses > up the 12 channels in the first group, and when a call comes into the > phone number ending in 767 it uses the 3 channels in group 2 AND USES NO > MORE CHANNELS, only those three. The reason for all of this is that I > have faxing through asterisk working and want those last three channels > used for faxing but I do not want the fax lines eating up all my > channels and leaving none for voice calls. My Company has evacuated from Hurricane Katrina and any help you can provide would be greatly appreciated. Thanks in advance.The above will ensure that you never have more than 12 outgoing voice calls, or 3 outbound fax calls, but it doesn't do anything at all for your inbound calls... What you want is some way to indicate to the dialplan that your outbound calls are either voice or fax, and then do something like this: exten => _X.,1,SetGroup(${CALLTYPE}) ; This is either VOICE or FAX exten => _X.,2,gotoif(${CALLTYPE}=VOICE,10,20) exten => _X.,10,CheckGroup(12) ; Make sure voice calls max 12 exten => _X.,11,Goto(30) exten => _X.,20,CheckGroup(3) ; Make sure fax calls max 3 exten => _X.,21,Goto(30) exten => _X.,30,Dial(Zap/g1/${EXTEN}) basically, you use the setgroup/checkgroup to ensure you aren't going over the quota for voice/fax calls. Check the syntax/etc of all the above functions, since I am sure a lot is wrong, but it should be more than enough to give you the right idea. Also, for your inbound calls: exten => 750,1,SetGroup(VOICE) exten => 750,2,CheckGroup(12) exten => 750,3,Dial(SIP/120,20) exten => 750,103,Congestion exten => 750,104,Wait(10) ; Don't need this if you use OOB indication exten => 750,105,Hangup exten => 767,1,SetGroup(FAX) exten => 767,2,CheckGroup(3) exten => 767,3,Goto(faxes,s,1) exten => 767,103,Congestion exten => 767,104,Wait(10) ; Don't need this if you use OOB indication exten => 767,105,Hangup Hope that gets you on the right track. Basically, the thing you got wrong is that on these sorts of lines, there is no 'connection' between the channel and the phone number. The call arrives on the signalling channel, and a voice channel is dynamically/randomly assigned for the call if there is one available. Regards, Adam