Hi All,
In this post I m going to show the procedure to make a call after Asterisk Installation.
After the installation, the first thing u have to do is add users in sip.conf
Example:
[shoan]
username=shoan
secret=kaustubh
type=friend
host=dynamic
nat=yes
allow=all
context=sip
[kaustubh]
username=kaustubh ;The username
secret=shoan ;Password
type=friend ;
host=dynamic
nat=yes
allow=all
context=sip
In this post I m going to show the procedure to make a call after Asterisk Installation.
After the installation, the first thing u have to do is add users in sip.conf
Example:
[shoan]
username=shoan
secret=kaustubh
type=friend
host=dynamic
nat=yes
allow=all
context=sip
[kaustubh]
username=kaustubh ;The username
secret=shoan ;Password
type=friend ;
host=dynamic
nat=yes
allow=all
context=sip
TYPE:
peer: A SIP entity to which Asterisk sends calls (a SIP provider for example). If you want a user (extension) to have multiple phones, define an extension that calls two SIP peers. The peer authenticates at registration.
user: A SIP entity which places calls through Asterisk (A phone which can place calls only). Users authenticate to reach services with their context.
friend: An entity which is both a user and a peer. This make sense for most desk handsets and other devices. Asterisk will create two objects, one peer and one user, with the same name.
The username can be anything a string, a number a combination od strings and number.
Now the users are added. Let's modify the dialplan.
To allow the users to call each other we have to make changes in extensions.conf.
Extensions.conf contains the dialplan.
The Voip Info defines dialplan as follows:
"A dial plan consists of a number of extensions. Each extensions consists of a number of priorities. Extensions are grouped in contexts. For each priority, an application is called."
In short, the dialplan contains the business logic-what to do with the calls.
Now in extensions.conf add a context called sip.
[sip]
exten => shoan,1,Dial(sip/shoan)
exten =>kaustubh,1,Dial(sip/kaustubh)
The above statements state that if a call comes for shoan or kaustubh, Dial shoan or kaustubh resp.
Now start the asterisk command Line interface ie CLI.
sudo /usr/sbin/asterisk -r
And now in CLI type following two commands
1.sip reload- it reloads the sip.conf
2. dialplan reload - it reloads the dialplan
Now u can make calls from kaustubh to shoan and vice-versa.
2. dialplan reload - it reloads the dialplan
Now u can make calls from kaustubh to shoan and vice-versa.