...
This parameters are set by /etc/zaptel.conf (change xx to your country code (eg. uk or de). Disable crc4 if your operator or PBX does not support it. Next important thing is WHO will be master of clocks. In most situations, networtk part will act as clock source, but ask your operator, if you should be master or not. Misconfiguration of this will do strange errors in framing. Change
Code Block |
---|
loadzone = xx defaultzone = xx # PRI TE span=1,1,0,ccs,hdb3,crc4 ; I am clock master ;span=1,0,0,ccs,hdb3,crc4; Remote side is clock master bchan=1-15 dchan=16 bchan=17-30 |
...
Code Block |
---|
[channels]
language=xx
switchtype = euroisdn
signalling = pri_cpe
pridialplan = unknown
prilocaldialplan = unknown
echocancel=64
echotraining = 150
echocancelwhenbridged=yes
;txgain=-4
;rxgain=-4
immediate=no
group = 1
context = fpstn
channel => 1-15,17-30
acountcode = fpstn
|
Next, we have to setup SIP side of our gateway. We will do this in /etc/asterisk/sip.conf.
We will not allow unauthenticated clients (we will route them into context guest, see above).
Only opensource codecs are enabled by default. If you buy g.729 codec, you can enable it. Again, set language to fit your needs.
Localnets are defined to better recognisation of NAT. Lines starting with jb are turning on jitterbuffer which is good to enable.
Code Block |
---|
[general] context=guest ; Default context for incoming calls port=5060 ; UDP Port to bind to (SIP standard port is 5060) srvlookup=yes ; Enable DNS SRV lookups on outbound calls maxexpirey=360 ; Max length of incoming registration we allow defaultexpirey=300 ; Default length of incoming/outoing registration t38udptlsupport=yes ; Turn on support for T.38 UDPTL disallow=all ; First disallow all codecs ;allow=g729 allow=gsm allow=alaw allow=ulaw language=xx ; Default language setting for all users/peers rtptimeout=60 ; Terminate call if 60 seconds of no RTP activity rtpholdtimeout=300 ; Terminate call if 300 seconds of no RTP activity localnet=192.168.0.0/255.255.0.0; All RFC 1918 addresses are local networks localnet=10.0.0.0/255.0.0.0 ; Also RFC1918 localnet=172.16.0.0/12 ; Another RFC1918 with CIDR notation localnet=169.254.0.0/255.255.0.0 ;Zero conf local network jbenable=yes jbforce=yes jbimpl = fixed |