Zaptel: Extension Picks Up Trunks

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
We just installed our first PIAF system and everything is working great except for one major headache.

Randomly when users pick up their phone to dial out they are picking up an incoming call. All calls are supposed to route through the IVR first, and the only options are # for directory and 0 for reception (extension 221)

We have 9 POTS lines hooked up to a Sangoma A400, using Aastra 53i and Aastra 57i CT phones.

Can anyone point me in the right direction? I've attached some configs but let me know if there is anything else that can be helpful.

Code:
            PBX in a Flash Version 1.3 Daemon Status
********************************************************************
* Asterisk  * ONLINE  * Zaptel    * ONLINE  * MySQL      * ONLINE  *
* SSH       * ONLINE  * Apache    * ONLINE  * Iptables   * ONLINE  *
* Fail2ban  * ONLINE  * IP Connect* ONLINE  * Ip6tables  * ONLINE  *
* BlueTooth * ONLINE  * Hidd      * ONLINE  * NTPD       * ONLINE  *
* Sendmail  * ONLINE  * Samba     * ONLINE  * Webmin     * LOADING *
* Ethernet0 * ONLINE  * Ethernet1 * ONLINE  * Wlan0      *   N/A   *
********************************************************************
* Running Asterisk Version : LOADING
* Asterisk Source Version  : 1.4.21.2
* Zaptel Source Version    : 1.4.12.1
* Libpri Source Version    : 1.4.8
* Addons Source Version    : 1.4.7
********************************************************************
asterisk-w.waterloo.melloul.com on 192.168.100.8 - eth0
CentOS release 5.2 (Final) :32 Bit Kernel: 2.6.18-92.1.6.el5
********************************************************************
 For help on PBX commands than you can run type help-pbx           *
********************************************************************
/etc/asterisk/zapata.conf
Code:
;autogenerated by /usr/local/sbin/config-zaptel  do not hand edit
;Zaptel Channels Configurations (zapata.conf)
;
;For detailed zapata options, view /etc/asterisk/zapata.conf.orig

[trunkgroups]

[channels]
context=default
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=0.0
txgain=0.0
group=1
callgroup=1
pickupgroup=1

immediate=no

;Sangoma A400 [slot:1 bus:5 span:1]  <wanpipe1>
context=from-zaptel
group=0
signalling = fxs_ks
channel => 1

context=from-zaptel
group=0
signalling = fxs_ks
channel => 2

context=from-zaptel
group=0
signalling = fxs_ks
channel => 3

context=from-zaptel
group=0
signalling = fxs_ks
channel => 4

context=from-zaptel
group=0
signalling = fxs_ks
channel => 5

context=from-zaptel
group=0
signalling = fxs_ks
channel => 6

context=from-zaptel
group=0
signalling = fxs_ks
channel => 7


context=from-zaptel
group=0
signalling = fxs_ks
channel => 8

context=from-zaptel
group=0
signalling = fxs_ks
channel => 9

context=from-zaptel
group=0
signalling = fxs_ks
channel => 10

#include zapata-channels.conf
 

Attachments

  • mb_configs.zip
    38.5 KB · Views: 1

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Can you capture some logs of this occurrence from/var/log/asterisk/full

Joe
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
I've been asking the users to let me know WHEN it happens so I could cut and paste a fragment. So far I get vague "happened to me twice yesterday" responses. You know how helpful users can be. LOL.

The log file today is already at 77122 lines. What should I be looking for to post?
 

Bart

Active Member
Joined
Nov 14, 2007
Messages
447
Reaction score
25
This sounds like 'glaring' which is a common condition seen when loop-start lines are used - Loop start lines do not provide call supervision before answer except for the ring voltage. This means there is 4 seconds between the ring cycles where the line will appear idle and available for outbound use. There is no way to 100% stop this problem. But you can minimize it having your outbound be select in reverse of your inbound. Example: inbound go from port 1 to 10. Outbound selected 10 to 1. Clearly in the middle there is a chance that both the inbound and outbound will fight for the port. But only at busy times.

Bart
 

gregc

Guru
Joined
Sep 8, 2008
Messages
433
Reaction score
3
That is exactly how our old pbx did it with POTS lines. Dial 9 to get an extension got you the last number in the pool the worked backwards. Incoming came in on the first and rolled towards the end.
 

Bart

Active Member
Joined
Nov 14, 2007
Messages
447
Reaction score
25
Did I just 'date' myself?

Bart
 

GlenPittman

New Member
Joined
Jun 29, 2008
Messages
27
Reaction score
1
I hope you have fixed your issues by now, but if not, I have 2 suggestions.

1. Make sure your trunk group (zap identifier) is set up as G0 in FreePBX and the maximum channels needs to be set to 9. This will result in the system picking up line 9 first to make the outside call, while the incoming calls should be on line 1 if the hunt is correct with the provider.

2. You need to edit your config file (zapata.conf) so that the 10th line is configured for another trunk group, since you only have 9 active lines.


The other question I have is whether the people are actually picking up the handset and receiving the incoming calls, or does it happen once they dial the number and press dial or send on their phone? If it happens before they even dial their number, it would be a different issue than what the above suggestions are correcting, although both things above need to be done IMO.

Glen Pittman
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
Sorry I've been busy with many other work issues not related to phones. I switched the zap identifier from g0 to G0 and the problem happens rarely now. Thanks for the help everyone.
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
By changing it go G0, it now dials out from the the top down and has solved my glaring problem.

The new problem is that lines 1-8 were the first company and line 9 is a separate company. Since it's always calling out on line 9 first, nobody can call in on the second company anymore since the line is busy 99% of the time.

In zapata.conf I changed the following
Code:
context=from-zaptel
signalling = fxs_ks
channel => 1
group=0

... <SNIP> ...

context=from-zaptel
signalling = fxs_ks
channel => 8
group=0

context=from-zaptel
signalling = fxs_ks
channel => 9
group=1

context=from-zaptel
signalling = fxs_ks
channel => 10
group=2

My outbound route uses Trunk Zap/G0. Why does it still dial out on 9, 8, 7, etc.... when I want it to dial out on 8, 7, 6, etc???

I'm probably missing something really simple... Help!
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Did you either restart asterisk, or type reload chan_zap.so

A normal reload will not change the zap configuration.

Joe
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
Yes I did. I was experimenting on the weekend and did a full reboot after any zaptel changes.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

Is that zapata.conf you have shown, or an #include.

Can you post the zapata.conf file in it's entirety.

Joe
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
Code:
[trunkgroups]

[channels]
context=default
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
canpark=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
relaxdtmf=yes
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no
useincomingcalleridonzaptransfer=yes

;Sangoma A400 [slot:1 bus:5 span:1]  <wanpipe1>
context=from-zaptel
signalling = fxs_ks
channel => 1
group=0

context=from-zaptel
signalling = fxs_ks
channel => 2
group=0

context=from-zaptel
signalling = fxs_ks
channel => 3
group=0

context=from-zaptel
signalling = fxs_ks
channel => 4
group=0

context=from-zaptel
signalling = fxs_ks
channel => 5
group=0

context=from-zaptel
signalling = fxs_ks
channel => 6
group=0

context=from-zaptel
signalling = fxs_ks
channel => 7
group=0

context=from-zaptel
signalling = fxs_ks
channel => 8
group=0

context=from-zaptel
signalling = fxs_ks
channel => 9
group=1

context=from-zaptel
signalling = fxs_ks
channel => 10
group=2

#include zapata-channels.conf

zapata-channels.conf has no content....
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi


I think you have a spurious group=0 in the main block, just above callgroup and just below txgain.

Delete it, to be safe, restart asterisk, and see if that fixes it for you.

Joe
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
I removed the group=0 in the main group and rebooted. It still dials out on line 9 instead of 8.

I edited /etc/asterisk/zapata.conf and /etc/asterisk/zapata-auto.conf to use a more condensed version and it still didn't work.

context=from-zaptel
signalling=fxs_ks
channel => 1-8
group=0

context=from-zaptel
signalling = fxs_ks
channel => 9
group=1

context=from-zaptel
signalling=fxs_ks
channel => 10
group=2

I only have one outbound route configured to use ZAP/G0 and it still dials out 9,8,7,etc

Incoming is working like it should, company1 goes 1,2,3,4,5,6,7,8 and incoming on company2 always goes to 9.

Are there any other files I should post? Company2 is getting pissed of because their incoming line is always busy by outgoing calls from company1.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
Hi

OK as a workaround to keep the customer happy, create individual channels, rather than one group.

Add zap channel, in channel put 1
then repeat as necessary.

Then you can order the trunks with complete granualarity in outbound routes, channel by channel.

Joe
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
So for my outbound route instead of just listing Zap/G0 I would list ZAP/G8, followed by Zap/G7, and so on down to ZAP/G1, right?

That sounds like it would work. I'll try it tonight. Thanks again.
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
no zap/1 zap/2 zap/3 etc

the g or G is for group, you only want to refer to the channel.

Joe
 

rbourque

New Member
Joined
Dec 29, 2008
Messages
12
Reaction score
0
So my zapata.conf would only contain lines such as

Code:
context=from-zaptel
signalling = fxs_ks
channel => 1

context=from-zaptel
signalling = fxs_ks
channel => 2

etc...

So if the group entries are removed, the dropdown on the Outbound Routes page will show zap/1. zap/2 instead of ZAP/G0? Or do I manually have to edit files somewhere.

My employer made the IT dept install the phone system instead of a proper installer, so I had a crash course by reading the forums and asterisk/freepbx docs. The system is working great with the exception of this issue. My biggest problem is getting around the terminology, since I have a unix admin/programming/networking background not telephony.

Sorry for the newbie questions! I'm trying to learn it all as fast as I can!
 

jroper

Guru
Joined
Oct 20, 2007
Messages
3,832
Reaction score
71
No

Leave the zap definitions exactly as they are. Do not edit any files what so ever.

In FreePBX, Click trunks, then click Add ZAP trunk.

Put 1 as maximum channels, and in Zap Identifier (Trunk Name) put a 1. Submit and...

add a new zap trunk.

Put 1 as maximum channels, and in Zap Identifier (Trunk Name) put a 2. Submit and...

add a new zap trunk.

And so on until all your channels are created in FreePBX - you can leave the existing G0 or g0 trunk in place. It does no harm.

Now go to outbound routes, and in the trunk selection boxes, add the trunks you want to use in the order you want to use them.

Yours

Joe
 

Members online

Forum statistics

Threads
25,824
Messages
167,830
Members
19,249
Latest member
jetest
Get 3CX - Absolutely Free!

Link up your team and customers Phone System Live Chat Video Conferencing

Hosted or Self-managed. Up to 10 users free forever. No credit card. Try risk free.

3CX
A 3CX Account with that email already exists. You will be redirected to the Customer Portal to sign in or reset your password if you've forgotten it.
Top