VoIP Cookbook: SIP.CONF Configuration

From OnnoWiki
Jump to navigation Jump to search

The user database is stored in /etc/asterisk/sip.conf. An example for an account with phone number 2099, password 123456, dynamic IP address using DHCP is as follows:

[2099]
context=default
type=friend
username=2099
secret=123456
host=dynamic
dtmfmode=rfc2833
mailbox=2099@default

To ensure that the dial tone is handled properly in Asterisk 1.6, we may add the following entry:

rfc2833compensate=yes

Enter the above entry for each user. At this point, each user may register his- or herself to the Asterisk. The registered users may call each other on the same Asterisk server.

To connect our Asterisk server to VoIP Rakyat or any other SIP proxy available in the internet, we need to register our Asterisk to the SIP proxy server. The commands used is:

register => 2345:password@sip_proxy/1234

which means user 1234 in our asterisk server that we operate is the user 2345 in sip_proxy logged in to the server using the password “password”. For example, user 2000 has an account 20345 in voiprakyat.or.id server with password “secret”, then the format used is:

register => 20345:secret@voiprakyat.or,id/2000

This way, calls made to VoIP Rakyat, specifically to account 20345, will be forwarded to number 2000 in our SIP server.

See Also