support

add prefix to inbound callerid from PRI

TROFFASKY
Posts: 78
Member Since:
2006-06-03

With BT's ISDN30 [aka PRI or E1], the inbound Caller ID is sent without the leading zero. How do I go about adding arbitrary numbers to the beginning of the Caller ID with Trixbox?

With vanilla asterisk, it would be something along the lines of:

exten=>123,1,SetCIDNum(90${CALLERIDNUM})

to add 90 to the beginning of a number. Obviously I can't go editing extensions.conf, so where's the right place for this little one-liner?



TROFFASKY
Posts: 78
Member Since:
2006-06-03
Re: add prefix to inbound callerid from PRI

In zapata.conf, I've got context=from-pstn-pri-custom. I've created this in extensions_custom.conf:

[from-pstn-pri-custom]
exten => _.1,SetCIDNum(90${CALLERID(num)})

but where do I send the calls after this? I've tried Goto(from-pstn,s,1) but incoming calls always fails with Not In Service.



dualarrow
Posts: 78
Member Since:
2006-07-03
Re: add prefix to inbound callerid from PRI

Try Goto(from-trunk,${EXTEN},1)

Andrew



rasker
Posts: 529
Member Since:
2006-06-02
Re: add prefix to inbound callerid from PRI

Did that work?

On BT BRI (ISDN2e) I believe that the Caller id (calling number) is sent complete and the DID (Direct inward Dial=DDI - the called number) number is set by default to the last six digits. This is configurable. You can contact BT to have this changed to your needs which means you don't have to change your asterisk configs.

Rehan



Lou1z
Posts: 102
Member Since:
2006-06-07
Re: add prefix to inbound callerid from PRI

correct me if i'm wrong, but isn't the inbound caller id prefixed in capi.conf ?
there is a line in there for international and national prefix to sort this out.



degsod
Posts: 138
Member Since:
2006-05-31
Re: add prefix to inbound callerid from PRI

you add 0 and 00 to the prefix in zapata.conf. I have copied my file below. I have BT ISDN 30.

;
; Zapata telephony interface
;
; Configuration file

[trunkgroups]

[channels]

language=en
context=from-pstn
signalling=pri_cpe ; pri_cpe = PRI slave ; pri_net = PRI master
switchtype=euroisdn
rxwink=300 ; Atlas seems to use long (250ms) winks
;usedistinctiveringdetection=yes
callerid=asreceived
pridialplan=unknown
nationalprefix=0
internationalprefix=00
usecallerid=yes
hidecallerid=no
callwaiting=yes
usecallingpres=yes
callwaitingcallerid=yes
threewaycalling=yes
transfer=yes
cancallforward=yes
callreturn=yes
echocancel=yes
echocancelwhenbridged=yes
echotraining=400
rxgain=0.0
txgain=0.0
group=0
callgroup=1
pickupgroup=1
immediate=no

;faxdetect=both
faxdetect=incoming
;faxdetect=outgoing
;faxdetect=no

;Include genzaptelconf configs
#include zapata-auto.conf

;Include AMP configs
#include zapata_additional.conf
channel => 1-15,17-31



TROFFASKY
Posts: 78
Member Since:
2006-06-03
Re: add prefix to inbound callerid from PRI

Thanks mate, I put nationalprefix=90 in there and it works a charm.
I note this isn't documented at either http://www.voip-info.org/wiki/index.php?page=Asterisk+config+zapa...
or http://www.voip-info.org/wiki/index.php?page=Asterisk+config+zapa...



r_naren22
Posts: 7
Member Since:
2006-09-21
Re: add prefix to inbound callerid from PRI

It did not work for me.

i have added the nationalprefix=0 in zapata.conf
then re-read the configs by freePBX.

the callerID is still same with out 0.
how did it work for you, did you make any other changes?
did you restart the server after the changes?

regards
Naren



alien2108
Posts: 10
Member Since:
2007-02-28
This works in

This works in extensions_custom.conf:

[from-pstn-custom]
exten => _X.,1,Set(CALLERID(num)=0${CALLERID(num)})

Replace 0 before $ with whatever number you would like to add in front.



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.