Sample Asterisk config for StanaPhone

Sample Asterisk config for StanaPhone


This works for me. All calls to my StanaPhone number ring on my extension 101, and after 20 seconds goes to my * voicemail. To use the StanaPhone network I dial 9 and the number.

sip.conf

[general]
port = 5060
bindaddr = 0.0.0.0
allow=ulaw

; This section is because i'm behind nat
externip = 206.45.88.212 ;Outside address
localnet = 192.168.2.10 ;Inside address
localmask = 255.255.255.0 ;Inside subnet

context = sip ; Default context for incoming calls
register => stanaphonenumber:stanaphonepassword@sip.stanaphone.com/101

[stanaphone]
type = friend
username = Stanaphonenumber
secret = Stanaphonepassword
host = sip.stanaphone.com
context = sip
nat = yes
canreinvite=no ; for NAT, but it will eat up TWICE the bandwidth because everything will go through *
insecure=very ; this will prevent * from sending a SIP 407 error back when a call comes in


[phone1] ;x-lite
type=friend
username=phone1
secret=12345678
host=dynamic
defaultip=192.168.2.199
dtmfmode=rfc2833
context=intern
callerid="phone1" <101>
mailbox=101



extensions.conf

[general]
static=yes
writeprotect=no

[globals]
STANAPHONEUSERID=stanaphonenumber

[intern]
include => stana-out
include => sip

[stana-out]
; STANAPHONE - Dial 9 & number to use stanaphone
exten => _9.,1,SetCallerID(${STANAPHONEUSERID})
exten => _9.,2,Dial(SIP/${EXTEN:1}@sip.stanaphone.com,60,tr)

[sip]
; phone1 - x-lite
exten => 101,1,Dial(SIP/phone1,20,tr)
exten => 101,2,Voicemail(u101)
exten => 101,3,Hangup
exten => 101,102,VoiceMail(b101)
exten => 101,103,Hangup


For me this above did not work, I was getting "Failed to authenticate on INVITE to" or similiar messages,
I have found working config on

http://forum.stanaphone.com/viewtopic.php?t=993&sid=000fc84c46fabe94bbd324e95963c624
http://forum.stanaphone.com/viewtopic.php?t=1327
http://forum.stanaphone.com/viewtopic.php?t=1153

Using AMP to configure Stanaphone

General SIP configuration

Sample Asterisk config for StanaPhone


This works for me. All calls to my StanaPhone number ring on my extension 101, and after 20 seconds goes to my * voicemail. To use the StanaPhone network I dial 9 and the number.

sip.conf

[general]
port = 5060
bindaddr = 0.0.0.0
allow=ulaw

; This section is because i'm behind nat
externip = 206.45.88.212 ;Outside address
localnet = 192.168.2.10 ;Inside address
localmask = 255.255.255.0 ;Inside subnet

context = sip ; Default context for incoming calls
register => stanaphonenumber:stanaphonepassword@sip.stanaphone.com/101

[stanaphone]
type = friend
username = Stanaphonenumber
secret = Stanaphonepassword
host = sip.stanaphone.com
context = sip
nat = yes
canreinvite=no ; for NAT, but it will eat up TWICE the bandwidth because everything will go through *
insecure=very ; this will prevent * from sending a SIP 407 error back when a call comes in


[phone1] ;x-lite
type=friend
username=phone1
secret=12345678
host=dynamic
defaultip=192.168.2.199
dtmfmode=rfc2833
context=intern
callerid="phone1" <101>
mailbox=101



extensions.conf

[general]
static=yes
writeprotect=no

[globals]
STANAPHONEUSERID=stanaphonenumber

[intern]
include => stana-out
include => sip

[stana-out]
; STANAPHONE - Dial 9 & number to use stanaphone
exten => _9.,1,SetCallerID(${STANAPHONEUSERID})
exten => _9.,2,Dial(SIP/${EXTEN:1}@sip.stanaphone.com,60,tr)

[sip]
; phone1 - x-lite
exten => 101,1,Dial(SIP/phone1,20,tr)
exten => 101,2,Voicemail(u101)
exten => 101,3,Hangup
exten => 101,102,VoiceMail(b101)
exten => 101,103,Hangup


For me this above did not work, I was getting "Failed to authenticate on INVITE to" or similiar messages,
I have found working config on

http://forum.stanaphone.com/viewtopic.php?t=993&sid=000fc84c46fabe94bbd324e95963c624
http://forum.stanaphone.com/viewtopic.php?t=1327
http://forum.stanaphone.com/viewtopic.php?t=1153

Using AMP to configure Stanaphone

General SIP configuration

Created by: papafox, Last modification: Thu 05 of Apr, 2007 (11:04 UTC) by tommybui
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+