Configuring
Asterisk Voip SIP.
Configuring Asterisk SIP Trunk for use with Telasip is very
straight forward. However, configuring the SIP trunk is not
enough to get it to work. With Asterisk there can be many
things that cause calls to fail. Luckily Asterisk provides
you with everything you need to debug the configuration.
When you signed up for service with Telasip you were sent
an email with your account details. This email contained 3
important pieces of information.
SIP Proxy: gw3.sip.telasip.com
Username: jdoe
Passord: jdoepass
This information is what you will use later to configure Asterisk.
Configuring the SIP trunk
can be addressed in three steps.
Registering Asterisk with the Proxy Server.
The simplest thing to do is create the register
string in Asterisk.
Trixbox: jdoe:jdoepass@gw3.sip.telasip.com
Asterisk sip.conf: register=jdoe:jdoepass@gw3.sip.telasip.com
Configuring the Outbound Trunk. The next thing
to do is configure the outbound trunk for Telasip. The outbound peer settings should look like this:
[telasip-gw]
type=peer
host=gw3.sip.telasip.com
username=jdoe
secret=jdoepass
qualify=yes
fromuser=jdoe
fromdomain=gw3.sip.telasip.com
canreinvite=no
sendrpid=yes
insecure=very
context=from-trunk
disallow=all
allow=ulaw
allow=gsm
;allow=g729
Notice the insecure=very and context=from-trunk.
These are actually the inbound
settings needed for Telasip. Typically we have found it is
better to create one trunk
and put both the inbound and outbound settings in that one
peer definition.
The reason for this is Asterisk will look up users by name,
and then try peer by
IP address. Because of the way we route the incoming DID,
Asterisk will not find
us by name. It will then search for peer by IP Address, this
also creates an issue
because we originate and terminate using the same Servers
/ IP address.
So how are we doing? To see how we are doing
login to Asterisk by typing
asterisk -r at the linux prompt. Issue the following 2 commands
CLI> sip show registry
Host Username
Refresh State
jfk.sip.telasip.com:5060 jdoe 585
Registered
CLI> sip show peers
telasip-gw/jdoe 4.79.19.56
5060 OK (66 ms)
This is all you need to configure the sip trunk. The sip
trunk is configured properly.
So I have everything configured correctly, but it is still
not working. Unfortunately
with asterisk tyou must also create Dial plan entires or extensions
in extensions.conf.
You will need an inbound context and an outbound context.
It is important to
keep them seperate. Because of the flexibility of asterisk
we can only provide
one possible example.
[from-trunk]
exten=>_2403961450,1,Dial(SIP/201,30,r)
[from-internal]
exten=>_NXXNXXXXXX,1,Dial(SIP/telasip-gw/${EXTEN},,r)
What can I do next?
Can you place an outbound call?
Can you receive an inbound call?
Are the calls completing but you can not hear the caller?
Aasterisk provides you with everything you need to debug these
issues. All you
need to do is log in to the server, and attach to asterisk
with the command
asterisk -r. This will start the Command Line Interface (Console)
for asterisk.
Once in asterisk a few simple commands will allow you to see
what is happening.
sip debug - prints the sip messages on the console
set verbose 5 - prints the dial plan commands that are executing
sip show registry - shows the current registration status
sip show peers - shows the status of all peers
TrixBox users should become familiar with the asterisk command
line. There is
a wealth of information at your disposal. we have provided some trouble shooting
guides below. Just click on the Link of the problem you are experiencing
|