Lost your password? | Close Panel

Technical Support

Home > Knowledgebase > Installation Guides/Tech > Asterisk Setup And Configuration > What are working settings for Asterisk 1.4?

What are working settings for Asterisk 1.4?
The following configuration is known to work with Asterisk 1.4. You'll just need to get your SIP credentials from the Softphone Config page in your ViaTalk control panel and replace anything noted below.

; ViaTalk: Asterisk 1.4 sip.conf sample
;
; This is a known working configuration for Asterisk's sip.conf. You simply need to
; get your SIP credentials from your VT Control Panel 'Softphone Config > Generic'
; and replace each item noted below


; GENERAL CONFIGURATION
; These rules apply to any other context in sip.conf unless you explicitly specify them
[general]
context=default ; context in extensions.conf to go to first
bindport=5060
port=5060
bindaddr=0.0.0.0
recordhistory=yes
disallow=all ; disallow all codecs
allow=ulaw
allow=gsm
trustrpid=yes ; needed for caller ID
sendrpid=yes
dtmfmode=inband ; **Servers on our new infrastructure will use rfc2833 for DTMF. If you are unsure which setting to use, you can contact our support staff for more information.**
relaxdtmf=yes
realm=asterisk ; needed for some sip phones
allowguest=no

; REGISTRATION
register => [YOUR 11 DIGIT VT NUMBER]:[YOUR SIP PASSWORD]@[YOUR VT PROXY]/[YOUR 11 DIGIT VT NUMBER] ; the brackets should not be included in your actual register string

; TRUNK CONFIGURATION
; This configures your ViaTalk line as a SIP trunk for Asterisk to use
[viatalk]
type=friend
authuser=[YOUR 11 DIGIT VT NUMBER] ; brackets should not be included
username=[YOUR 11 DIGIT VT NUMBER] ; brackets should not be included
fromuser=[YOUR 11 DIGIT VT NUMBER] ; brackets should not be included
fromdomain=[YOUR VT PROXY] ; brackets should not be included
host=[YOUR VT PROXY] ; brackets should not be included
secret=[YOUR SIP PASSWORD] ; brackets should not be included
insecure=very
qualify=3600
nat=no ; switch to yes if behind nat (try to avoid it if at all possible)


; PEER CONFIGURATION
; This will allow you to register a softphone/adapter to your PBX
[1000] ; this can be changed to whatever number structure you would like your extensions to be
type=peer
nat=yes ; allows you to use a softphone/adapter behind nat
host=dynamic
canreinvite=yes
username=1000 ; should be the same as the header
secret=password ; this password can be anything you want


; ViaTalk Asterisk 1.4 extensions.conf sample
;
; This is a known working configuration for Asterisk's extensions.conf with ViaTalk
; Replace anything noted.
[general]
static=yes
writeprotect=yes

[globals]
CONSOLE=Console/dsp
NPX=[YOUR AREA CODE] ; Replace this with your area code, brackets should not be included
PEER=1000 ; The peer you setup in sip.conf for your softphone/adapter
TRUNK=viatalk ; The name of the trunk you defined

[default]
include=incoming
include=outgoing

[incoming]
exten => [YOUR 11 DIGIT VT NUMBER],1,Dial(SIP/${PEER},60,r) ; brackets should not be included
exten => [YOUR 11 DIGIT VT NUMBER],2,Hangup ; brackets should not be included

[outgoing]
exten => 911,1,Dial(SIP/911@${TRUNK},60,r)
exten => 411,1,Dial(SIP/411@${TRUNK},60,r)
exten => *123,1,Dial(SIP/*123@${TRUNK},60,r)

exten => _NXXXXXX,1,Goto(1${NPX}${EXTEN},1) ; if dialing 7 digits, prepend 1 + Area Code
exten => _NXXNXXXXXX,1,Goto(1${EXTEN},1) ; if dialing 10 digits, prepend 1

exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@${TRUNK},60,r)
exten => _1NXXNXXXXXX,2,Playtones(480+620/250,0/250) ; play a fast busy (reorder) tone
exten => _1NXXNXXXXXX,3,Congestion

; For International dialing [Optional]
exten => _011X.,1,Dial(SIP/${EXTEN}@${TRUNK},60,r)
exten => _011X.,2,Playtones(480+620/250,0/250) ; play a fast busy (reorder) tone
exten => _011X.,3,Congestion

; in the case of an invalid number or a time-out hangup
exten => i,1,Hangup
exten => t,1,Hangup
Rating: (3368 Votes)
Was this answer helpful?: Yes   No
Related Topics
What are the working settings for Asterisk?

What are working settings for Asterisk@Home or Trixbox?

What is a working dial plan for my device?

How do I make audio work?

Print Article
Add to Favorites
Rate this Article