Zap g0 changing to g2 automatically in TE12XP

Hi Gurus,

I am using
asterisk-1.4.21
zaptel-1.4.12.1
libpri-1.4.9

Single Port TE12XP for E1 PRI

Below is my extensions.conf

[globals]
TRUNK=Zap/g0 ; Trunk interfac

[default]

exten => _.X,1,AGI(agi://127.0.0.1:4577/call_log)
exten => _.X,2,Dial(${TRUNK}/${EXTEN},30,tTo)
exten => _.X,3,Hangup

My PSTN calls are going absolutly fine but sometime suddenly calls are dialing with Zap/g2 instead of Zap/g0. It`s very strange because in whole extensions.conf i have not mention Zap/g2 anywhere.

Than i found that g2 it`s taking from extensions.ael. where i am having
TRUNK=“Zap/g2”; // Trunk interface

But why it`s taking from extensions.ael instead of extensions.conf

zapata.conf

language=en
rxgain=1.0
txgain=1.0
usecallerid=yes
callerid=asreceived
busydetect=no
context=default
echotraining=no
echocancel=yes
echocancelwhenbridged=no
usecallingpres=yes
callprogress = no
prilocaldialplan=unknown
pridialplan=unknown
overlapdial=yes
switchtype=euroisdn
immediate=no

group=0
signalling=pri_cpe

;PRI 1
channel => 1-15
channel => 17-31

Kindly help me what should i do.

Thanks…

Nothing to do with zapata, as I can see…
Are you using some context from extension.conf and some from .ael?

As for me, none of my asterisk installations have file extension.conf… extension.ael works fine for me…

If you are not using extensions.ael, then delete the file, delete the /usr/lib/asterisk/modules/pbx_ael.so module, restart asterisk.

OR

From the asterisk CLI, unload the ael module with
CLI>module unload pbx_ael.so

Then try dialing.

Do either of these two things work?

Of couse… do something like:

cd /etc/asterisk
mv ./extensions.ael ./extensions.ael.bk

restart Asterisk