Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

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

Wiki MarkupNext, 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). Set your realm and domain to something usefull which should be unique. Putting your real domain there is realy good point of start. But remember, this domain and realm setting has to corespond to settings in client, see above. Only opensource codecs are enabled by default. If you buy or own 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. Next, we define phones which we will use. In example, we use 3-digit dialplan and we are starting with number 200. Define next sip clients to fit your needs. It is good if username corespond with peer name (name in \ [\]). It is possible to use database for storing SIP users, which is better for bigger systems, but it is not scope of this document. See [http://www.voip-info.org/wiki/view/Asterisk+RealTime+Sip] or [http://www.sineapps.com/news.php?rssid=1105] for more informations.

sip.conf

Code Block
[general]
context=guest                   ; Default context for incoming calls (non authenticated)
realm=somecompany.com
domain=somecompany.com

disallow=all                    ; First disallow all codecs
;allow=g729
allow=gsm
allow=alaw
allow=ulaw

language=xx                     ; Default language setting for all users/peers

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

[200]
username=200
secret=somesecret200
type=friend
host=dynamic
context=sip

[201]
username=201
secret=somesecret201
type=friend
host=dynamic
context=sip

[...]
...
...

...