Asterisk settings myPhoneCompany

1) Upgrade Asterisk to newest CVS image or v1.0.5; Asterisk CVS-v1-0-12/23/04-22:36:11 (**** this is most important 401 errors; AUTH can only work on this release ****)

2) You must sign up manually for the myDevice plan, it requires you to fill out and fax in a form.

3) sip.conf

[general]
disallow=all
allow=g729                       ; requires license for g729
allow=ulaw
port=5060                        ; Port to bind to
context=default                 ; Default for incoming calls
bindaddr=X.X.X.X                ; IP address to bind to (0.0.0.0 binds to all)
maxexpirey=4800                  ; Maximum expiration for registrations
defaultexpirey=1800              ; Default expiration for registrations
canreinvite=no                  ; Allow clients to directly connect if set to yes. Set to no if behind NAT.
tos=reliability
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
videosupport=no                 ; Turn on support for SIP video
dtmfmode=rfc2833              ; DTMF inband need to be set here. 

;nat=yes                         ; NAT settings if you do not have a public IP
;localnet=192.168.0.0/255.255.0.0 ;if your internal network is 192.168.x.x
;externip=my.dynamic.dns.com  ;Hint: Use dynamic dns for your true outside interface

register => NNN:PPP:NNN@sip.sipmedia.com
;NNN (Your Phone Number)
;PPP (Your SIP Password, different from the web pass)

[sip.sipmedia.com]
type=friend
username=NNN ;(Phone Number)
fromuser=NNN ;(Phone Number)
secret=PPP ;(SIP Password)
host=sip.sipmedia.com
disallow=all
allow=g729  ;again, this requires a license for not just pass-through
allow=ulaw
context=sipmedia_incoming
realm=sip1.xchangetele.com
fromdomain=sip.sipmedia.com
dtmfmode=rfc2833
canreinvite=no
insecure=very
;nat=yes ;if you have nat

3) extensions.conf

[macro-sipmediaout]
exten => s,1,Dial(SIP/${ARG1}@sip.sipmedia.com)
exten => s,2,Congestion()
exten => s,3,Busy()


[sipmedia_outgoing]
; This is set up for 9,1+10 digit dialing, only sending SipMedia/MyPhoneCompany the 
; 11-digits for nationwide calling  (they want to see 1-NXX-NXX-XXXX)
; Alter your dialplan to accomodate local and international calling

exten => _91NXXNXXXXXX,1,Macro(sipmediaout,${EXTEN:1})

[sipmedia_incoming]
; This will:
; 1) Hack the Caller ID to tag it and remove the "+" that they send
; 2) Hack the caller ID to add a 9 to the incoming number (alter to suit)
; 3) Ring SIP extension 111 for 40 seconds
; 4) Go to voicemail for x111
; Alter this to accomodate the needs of your local extensions

exten => s,1,SetCallerID("MPC:${CALLERIDNAME:2}" <9${CALLERIDNUM:1}>)
exten => s,2,Dial(SIP/111,40)
exten => s,3,VoiceMail(u111)
exten => a,1,VoicemailMain(111)   ; If they press *, attempt to log in to VMail



Two line configuration

sip.conf

;Register with MyPhoneCompany
register => 502yyyyyyy:passwd1:502yyyyyyy@sip.sipmedia.com/502yyyyyyy
register => 502xxxxxxx:passwd2:502xxxxxxx@sip.sipmedia.com/502xxxxxxx
.
.
.
[houseTrunk]
type=friend
username=502xxxxxxx ;(Phone Number)
fromuser=502xxxxxxx ;(Phone Number)
secret= passwd2 ;(SIP Password)
host=sip.sipmedia.com
disallow=all
allow=ulaw
;context=house
realm=sip1.xchangetele.com
fromdomain=sip.sipmedia.com
dtmfmode=auto
canreinvite=no
insecure=very

[integTrunk]
type=friend
username=502yyyyyyy ;(Phone Number)
fromuser=502yyyyyyy ;(Phone Number)
secret=passwd1 ;(SIP Password)
host=sip.sipmedia.com
disallow=all
allow=ulaw
;context=attendant
realm=sip1.xchangetele.com
fromdomain=sip.sipmedia.com
dtmfmode=auto
canreinvite=no
insecure=very


extensions.conf

[default]
exten => 502yyyyyyy,1,goto(attendant|s|1)
exten => 502xxxxxxx,1,goto(house|s|1)

I'm sure this is not optimal, but it works for now. I used ulaw because of the faxes, you might wanna choose a better codec for just voice.

1) Upgrade Asterisk to newest CVS image or v1.0.5; Asterisk CVS-v1-0-12/23/04-22:36:11 (**** this is most important 401 errors; AUTH can only work on this release ****)

2) You must sign up manually for the myDevice plan, it requires you to fill out and fax in a form.

3) sip.conf

[general]
disallow=all
allow=g729                       ; requires license for g729
allow=ulaw
port=5060                        ; Port to bind to
context=default                 ; Default for incoming calls
bindaddr=X.X.X.X                ; IP address to bind to (0.0.0.0 binds to all)
maxexpirey=4800                  ; Maximum expiration for registrations
defaultexpirey=1800              ; Default expiration for registrations
canreinvite=no                  ; Allow clients to directly connect if set to yes. Set to no if behind NAT.
tos=reliability
srvlookup=yes                   ; Enable DNS SRV lookups on outbound calls
videosupport=no                 ; Turn on support for SIP video
dtmfmode=rfc2833              ; DTMF inband need to be set here. 

;nat=yes                         ; NAT settings if you do not have a public IP
;localnet=192.168.0.0/255.255.0.0 ;if your internal network is 192.168.x.x
;externip=my.dynamic.dns.com  ;Hint: Use dynamic dns for your true outside interface

register => NNN:PPP:NNN@sip.sipmedia.com
;NNN (Your Phone Number)
;PPP (Your SIP Password, different from the web pass)

[sip.sipmedia.com]
type=friend
username=NNN ;(Phone Number)
fromuser=NNN ;(Phone Number)
secret=PPP ;(SIP Password)
host=sip.sipmedia.com
disallow=all
allow=g729  ;again, this requires a license for not just pass-through
allow=ulaw
context=sipmedia_incoming
realm=sip1.xchangetele.com
fromdomain=sip.sipmedia.com
dtmfmode=rfc2833
canreinvite=no
insecure=very
;nat=yes ;if you have nat

3) extensions.conf

[macro-sipmediaout]
exten => s,1,Dial(SIP/${ARG1}@sip.sipmedia.com)
exten => s,2,Congestion()
exten => s,3,Busy()


[sipmedia_outgoing]
; This is set up for 9,1+10 digit dialing, only sending SipMedia/MyPhoneCompany the 
; 11-digits for nationwide calling  (they want to see 1-NXX-NXX-XXXX)
; Alter your dialplan to accomodate local and international calling

exten => _91NXXNXXXXXX,1,Macro(sipmediaout,${EXTEN:1})

[sipmedia_incoming]
; This will:
; 1) Hack the Caller ID to tag it and remove the "+" that they send
; 2) Hack the caller ID to add a 9 to the incoming number (alter to suit)
; 3) Ring SIP extension 111 for 40 seconds
; 4) Go to voicemail for x111
; Alter this to accomodate the needs of your local extensions

exten => s,1,SetCallerID("MPC:${CALLERIDNAME:2}" <9${CALLERIDNUM:1}>)
exten => s,2,Dial(SIP/111,40)
exten => s,3,VoiceMail(u111)
exten => a,1,VoicemailMain(111)   ; If they press *, attempt to log in to VMail



Two line configuration

sip.conf

;Register with MyPhoneCompany
register => 502yyyyyyy:passwd1:502yyyyyyy@sip.sipmedia.com/502yyyyyyy
register => 502xxxxxxx:passwd2:502xxxxxxx@sip.sipmedia.com/502xxxxxxx
.
.
.
[houseTrunk]
type=friend
username=502xxxxxxx ;(Phone Number)
fromuser=502xxxxxxx ;(Phone Number)
secret= passwd2 ;(SIP Password)
host=sip.sipmedia.com
disallow=all
allow=ulaw
;context=house
realm=sip1.xchangetele.com
fromdomain=sip.sipmedia.com
dtmfmode=auto
canreinvite=no
insecure=very

[integTrunk]
type=friend
username=502yyyyyyy ;(Phone Number)
fromuser=502yyyyyyy ;(Phone Number)
secret=passwd1 ;(SIP Password)
host=sip.sipmedia.com
disallow=all
allow=ulaw
;context=attendant
realm=sip1.xchangetele.com
fromdomain=sip.sipmedia.com
dtmfmode=auto
canreinvite=no
insecure=very


extensions.conf

[default]
exten => 502yyyyyyy,1,goto(attendant|s|1)
exten => 502xxxxxxx,1,goto(house|s|1)

I'm sure this is not optimal, but it works for now. I used ulaw because of the faxes, you might wanna choose a better codec for just voice.

Created by: sipmedia, Last modification: Thu 04 of Nov, 2010 (05:46 UTC) by admin
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+