[Asterisk-Users] sip.conf extensions.conf
Mauro Locatelli
mauro.locatelli at questar.it
Mon Nov 8 01:42:46 MST 2004
Hi, my sip.conf and my extensions.conf :)
I hope it's useful
**SIP.CONF**
[general]
port = 5060 ; port to bind for sip connections
bindaddr = 0.0.0.0 ; ip to bind for sip connections
context = default ; default context for incoming sip calls
externip = 222.99.99.22 ; Your external ip
localnet = 192.168.1.0/255.255.255.0 ;localnet and mask
disallow = all ; disallow all codecs, we want to enable,
allow=g726
allow=ulaw
allow=alaw
allow= gsm ; what we deem is necessary
allow= ilbc
allow= speex
register =>
sipphonenumber:sipphonepwd at proxy01.sipphone.com/marlow-sip ;information
about sipphone
[proxy01.sipphone.com]
type=friend
username=sipphonenumber
secret=sipphonepwd
host=proxy01.sipphone.com
context=sipphone
nat=1
[marlow]
callerid=("marlow" <3986>)
username=marlow
type=friend
secret=marlowpwd
host=dynamic
context=internal
canreinvite=no
nat=1
[brandon]
callerid=("brandon" <3986>)
username=brandon
type=friend
secret=brandonpwd
host=dynamic
context=internal
canreinvite=no
[david]
callerid=("david" <3988>)
username=david
type=friend
secret=davidpwd
host=dynamic
context=internal
canreinvite=no
-----------------------------------------------------------------------------------------------------------
**EXTENSIONS.CONF**
[general]
static=yes
writeprotect=no
[globals]
MARLOW_CID=brandon
MARLOW_SIPPHONE=sipphonenumber
PHONE1=SIP/marlow ;unuseful for now it's only a try
PHONE2=SIP/brandon ;unuseful for now it's only a try
PHONE3=SIP/david ;unuseful for now it's only a try
[internal]
include => from-sip
include => sipphone
include => tollfree
include => 3986
include => 3987
include => 3988
include => voicesystem
[voicesystem]
exten => 9999,1,VoiceMailMain(${CALLERIDNUM}) ; extension 9999 is the VM
system,go directly to callers VM
exten => 9999,2,Hangup
[3986]
exten => 3986,1,Dial(SIP/marlow,20) ; call SIP extension "marlow"
for 60 seconds,if extension 3986 is called
exten => 3986,2,Voicemail(u3986) ; if we can't connect to
"marlow" or after seconds go to the unavail VM
exten => 3986,102,Voicemail(b3986) ; if busy, go to the busy VM
[3987]
exten => 3987,1,Dial(SIP/brandon,60) ; call SIP extension
"brandon" for 60 seconds,if extension 3986 is called
exten => 3987,2,Voicemail(u3986) ; if we can't connect to
"brandon" or after seconds go to the unavail VM
exten => 3987,102,Voicemail(b3986) ; if busy, go to the busy VM
[3988]
exten => 3988,1,Dial(SIP/brandon,60) ; call SIP extension "david"
for 60 seconds,if extension 3986 is called
exten => 3988,2,Voicemail(u3986) ; if we can't connect to
"david" or after seconds go to the unavail VM
exten => 3988,102,Voicemail(b3986) ; if busy, go to the busy VM
[from-sip]
;
; default extension for calls from SIP
;
; calls from sipphone
;for receive call from sipphone and send it to local phone 3986 but don't
work:( and I don't know why
exten => marlow-sip,1,SetCIDName(SIP - ${CALLERIDNAME}) ; indicate that the
call came through sipphone
exten => marlow-sip,2,Dial(Local/3986 at internal/n)
[outbound-internal]
;
; include local extensions
;
include => internal
;
; include SIP accounts
;
include => sipphone
;
; include tollfree calls
;
;include => tollfree
[default]
; include from-sip for default. We don't use it, but it might be a good idea
include => from-sip
include => sipphone
include => internal
[sipphone]
; Official Sipphone example don't work very well
; exten => _1747.,1,Dial(SIP/${EXTEN}@proxy01.sipphone.com) ; set my
callerid and name
; exten => _1747.,2,Playback(notavail) ; this did
not work out
; exten => _1747.,3,Busy
;Approach to gateway guide
exten => _1747.,1,SetCallerID(${MARLOW_CID} <${MARLOW_SIPPHONE}>) ; set my
callerid and name
exten =>
_1747.,2,Dial,SIP/${EXTEN:4}@proxy01.sipphone.com ; dial
the number i wish to dial
exten => _1747.,3,Playback(invalid) ; this did
not work out
exten => _1747.,4,Hangup
exten => _1747.,103,Busy
[tollfree]
;
; terminate toll-free no.'s via fwdnet
;
;Use for call italian toll free
; +39 800
; exten => _39800.,1,SetCallerID(<${MARLOW_SIPPHONE}>)
; exten => _39800.,1,Dial,SIP/*${EXTEN}@proxy01.sipphone.com
; exten => _39800N.,1,Dial,Zap/1/${EXTEN:2}
; Use for call external PSTN number
exten => _0X.,1,Dial,Zap/1/${EXTEN:1}
exten => _0X.,2,Playback(invalid)
exten => _0X.,3,Hangup
exten => _0X.,103,Busy
;Use for call american Toll free
; +1-800
exten => _1800.,1,SetCallerID(<${MARLOW_SIPPHONE}>)
exten => _1800.,2,Dial,SIP/*${EXTEN}@proxy01.sipphone.com
exten => _1800.,3,Playback(invalid)
exten => _1800.,4,Hangup
exten => _1800.,103,Busy
-----------------------------------------------------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20041108/a8bca2b9/attachment.htm
More information about the asterisk-users
mailing list