Skip to content

Instantly share code, notes, and snippets.

@LeftyBC
Created September 17, 2013 02:00
Show Gist options
  • Save LeftyBC/6589203 to your computer and use it in GitHub Desktop.
Save LeftyBC/6589203 to your computer and use it in GitHub Desktop.
sip.conf, extensions.conf that has issues with my Avaya
[default]
[mycontext]
include => voipms-inbound
include => voipms-outbound
exten => 10,1,Log(NOTICE, Incoming call from ${CALLERID(all)} to ${EXTEN})
exten => 10,n,Dial(SIP/avaya,30)
exten => 11,1,Log(NOTICE, Incoming call from ${CALLERID(all)} to ${EXTEN})
exten => 11,n,Dial(SIP/zoiper,30)
exten => _50X,1,Log(NOTICE, Incoming call to test extension ${EXTEN} from ${CALLERID(all)})
exten => _50X,n,Answer()
exten => _50X,n,SayDigits(${EXTEN})
exten => _50X,n,Hangup()
exten => i,1,LOG(WARNING, Call came in on a strange, strange place: from ${EXTEN} ${CALLERID(all)} ${CDR(dst)} ${CONTEXT} ${CDR} ${CHANNEL})
exten => i,n,Playtones(congestion)
exten => s,1,LOG(WARNING, Call came in on a strange, strange place: from ${EXTEN} ${CALLERID(all)} ${CDR(dst)} ${CONTEXT} ${CDR} ${CHANNEL})
exten => s,n,Playtones(congestion)
; Asterisk testing PBX
exten => 2600,1,Dial(IAX2/[email protected]/s@default)
; Dial the same extension, get nothing. This could be voicemail later.
; Dial 9 and then any extension longer than 5 digits through SIP provider
;exten => _9XXXX.,1,Log(NOTICE, Dialing out from ${CALLERID(all)} to ${EXTEN:1} through SIP Provider)
;exten => _9XXXX.,n,Dial(SIP/fooprovider/${EXTEN:1},60)
;exten => _9XXXX.,n,Playtones(congestion)
;exten => _9XXXX.,n,Hangup()
[voipms-outbound]
exten => _1NXXNXXXXXX,1,Dial(SIP/${EXTEN}@voipms)
exten => _1NXXNXXXXXX,n,Hangup()
exten => _NXXNXXXXXX,1,Dial(SIP/1${EXTEN}@voipms)
exten => _NXXNXXXXXX,n,Hangup()
exten => _011.,1,Dial(SIP/${EXTEN}@voipms)
exten => _011.,n,Hangup()
exten => _00.,1,Dial(SIP/${EXTEN}@voipms)
exten => _00.,n,Hangup()
; inbound context example for your DID numbers, do not add the number 1 in front
[voipms-inbound]
exten => 6000004000,1,Log(NOTICE, Incoming call from ${CALLERID(all)} to ${EXTEN} via voip.ms)
exten => 6000004000,2,Goto(colin,11,1) ;your DID
[general]
context=mycontext
allowguest=no
udpbindaddr=0.0.0.0:5060
alwaysauthreject=no
sipdebug=yes
nat=no
;register with voip.ms account
register => <redacted>:<redacted>@seattle2.voip.ms:5060
[voipms]
canreinvite=no
context=mycontext
host=seattle2.voip.ms
secret=<redacted>
type=peer
defaultuser=<redacted>
disallow=all
allow=ulaw
allow=g729
fromuser=<redacted>
trustrpid=yes
sendrpid=yes
insecure=invite,port
nat=yes
[avaya]
type=friend
host=dynamic
secret=<redacted>
context=mycontext
faxdetect=no
qualify=yes
defaultuser=avaya
insecure=invite,port
canreinvite=no
;mailbox=10@default
[zoiper]
type=friend
host=dynamic
secret=<redacted>
context=mycontext
faxdetect=no
qualify=yes
defaultuser=zoiper
insecure=invite,port
canreinvite=no
;mailbox=11@default
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment