how to Edit sip.conf to configure SPA 3000 with Asterisk

In this article I will try to explain that how to Edit sip.conf  to configure Sipura 3000 PSTN with Asterisk.The sip.conf file contains parameters relating to the configuration of Sipura 3000  access to
the Asterisk server. Sipura 3000  must be configured in this file before they can place or receive calls using the Asterisk server.
 The sip.conf file is read from the top down. The first section is for general server options, such as the IP address and port number to bind to. The following sections define client parameters such as the username, password, and default IP address for unregistered clients. Sections are delineated by a name in brackets. The first section is called general (which cannot be used as a client name.) The following sections begin with the client name in brackets, followed by the client options.
you can find it in /etc/asterisk/sip.conf.
1-Editing sip.conf to allow the SPA-3000 to connect for outgoing calls

Add a SIP account for the SPA-3000 to connect (under the 'Definitions of locally connected SIP phones' section). Username is spa3000, password is foo.

[spa3000]
mailbox=3000 ; Mailbox number (numerical so can be selected through phone)
type=friend
host=dynamic
secret=foo
call-limit=2
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
allow=gsm
context=local_phone ; This links sip.conf with the
; entry local_phone in extensions.conf

2-Editing sip.conf to allow the softphones to connect for outgoing calls

Using a softphone to connect to Asterisk can help determine whether a problem is on the SPA-3000 side or the Asterisk side. Accounts for softphones can be added in an identical manner (username chris, password foo):

[chris]
type=friend
host=dynamic
secret=foo
call-limit=2
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
                      ; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ;     Asterisk only supports g723.1 pass-thru!
allow=g729 ;      Pass-thru only unless g729 license obtained
allow=gsm
context=local_phone

All the softphones (linphone, kphone, ekiga) I tried sucked (exhibited weird behaviour, crashed or got stuck often) in various ways but I ended up using linphone for most of the testing. Ekiga is prettier than the rest though.

3-Editing sip.conf to allow incoming PSTN calls (your normal phone line) to connect to Asterisk
If you can be bothered reading the SPA-3000 documentation, you'll discover that there are two logical VoIP units inside the box. One is used for connecting the handset to VoIP services and the other for the PSTN line to VoIP services. So if you want incoming PSTN calls to be handled by Asterisk, its necessary to create another account for the second VoIP unit (username pstn, password foo:

[pstn]
type=friend
host=dynamic
secret=foo
call-limit=2
disallow=all ; need to disallow=all before we can use allow=
allow=ulaw ; Note: In user sections the order of codecs
; listed with allow= does NOT matter!
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
allow=gsm
context=incoming
4-Editing sip.conf to outgoing VoIP calls from from Asterisk.    
Configuration of SIP connections to VoIP services is done in a similar manner to the ATA and softphone ones.

[sip.internode.on.net]
type=peer
secret=yourInternodePassword
username=yourInternodePhoneNumber
host=sip.internode.on.net
fromdomain=sip.internode.on.net
fromuser=yourInternodePhoneNumber
canreinvite=no
insecure=very
nat=no
qualify=yes
dtmfmode=rfc2833
context=incoming ; This connects incoming calls to the corresponding entry in extensions.conf
disallow=all
allow=g729
allow=ulaw
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
allow=gsm

[sipphone]
type=peer
context=default
disallow=all
allow=ulaw
allow=alaw
allow=g723.1 ; Asterisk only supports g723.1 pass-thru!
allow=g729 ; Pass-thru only unless g729 license obtained
allow=gsm
dtmfmode=rfc2833
host=proxy01.sipphone.com
fromdomain=proxy01.sipphone.com
fromuser=yourSipphoneNumber
insecure=very
secret=yourSipphonePassword
username=yourSipphoneNumber
canreinvite=no
context=incoming ; This connects incoming calls to the corresponding entry in extensions.conf
nat=no
5-Editing sip.conf to allow incoming VoIP calls from VoIP providers.

Most of the Asterisk configuration files are full of comments which are often quite useful. However in some areas there is so much documentation that it hides the structure of the configuration syntax. Although its tempting to put the configuration information for incoming VoIP calls next to the configuration information for outgoing ones, it has to go in the [global] section. Put them next to the other example registrations.

; internode
register => XXXXXXXXXX:InternodePassword@sip.internode.on.net

; sipphone (chris)
; register => 1747YYYYYYY:SipPhonePassword@proxy01.sipphone.com
Replace XXXXXXXXXX with your internode phone number and 1747YYYYYYY with youre SipPhone phone number.
 read more:http://ozlabs.org/~cyeoh/asterisk/



Related post



Newer Post Older Post

0 comments:

Post a Comment

 

Wiki Voip And Fax Tutorials Copyright © 2010 Labloub