Setting up test users(sip) in Asterisk
Two files to modify
-sip.conf
-extensions.conf
Software needed:
Twinkle for Ubuntu 11.04
Ekiga for Windows (7)
Of course the softphone can be anything
you choose but this is what im using
This is a demonstration of a call
between a Ubuntu sip user and windows user who both can connect to
the Asterisk server as set up in previous steps. The GUI can be used
for this,but as recommended getting to know the files personally is a
lot better in the long run.
Ok so here goes:
Adding sip users
open ter
sudo su root
navigate your way to /etc/asterisk
vi sip.conf
Only add the text in bold
[test]
--user register
type=friend
--user can make or recieve calls peer
=inbound only, user = outbound only
username=test
--username
secret=password
--password
host =dynamic
sets dynamic ip for the host
context=tutorial
sets the group test will belong to.
Our second user
[test1]
type=friend
username=test1
secret=password1
host =dynamic
context=tutorial
Adding the users
to the extensions
navigate your way
to /etc/asterisk
vi extensions.conf
[tutorial]
exten => 1234,1,Dial(SIP/test)
exten => 4321,1,Dial(SIP/test1)
exten => number,prioirty,Dial(protocol/user)
Now asterisk -r
reload
sip show peers
The users should now be there!
Adding the softphones
Twinkle for Ubuntu
Install twinkle
wizard
enter name for profile
user name test
domain 192.168.0.23 –this is what the domain was for me,so
whatever your ip address is that the asterisk server resides on
authentication name test
password password
Ekiga for windows 7
Once installed
Accounts->Add a sip account
name test1
Registrar 192.168.0.23
user test1
authentication user test1
password password
enable account (ticked)
To test the call functionality
From either machine
(ubuntu in this case and twinkle)
make sure user is registered(logged in)
Call 4321
Hopefully it will come up as an incoming call on the ekiga machine
:-)
From windows machine using Ekiga
sip:1234@192.168.0.23
hit call icon
To see the communication between both login into the asterisk server
asterisk -r
This was done on
my home network so modifications for accessing the asterisk server
from outside the home network will be done soon
Update:
The ip for the registrar is the outside ip address of the server which you are using. provided that port forwarding is enabled and working properly then connecting to the asterisk server should not be a problem. From a clean install on a VM outside my network I was able to connect and register the SIP user without having to change any network configuration files for asterisk.
Update:
The ip for the registrar is the outside ip address of the server which you are using. provided that port forwarding is enabled and working properly then connecting to the asterisk server should not be a problem. From a clean install on a VM outside my network I was able to connect and register the SIP user without having to change any network configuration files for asterisk.
thank you man it works now
ReplyDeleteExcellent, glad it was useful!
DeleteThis comment has been removed by the author.
ReplyDelete