<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.6980.72">
<TITLE>Re: [Asterisk-Users] sip.conf extensions.conf</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<BR>
<P><FONT SIZE=2>Hi, my sip.conf and my extensions.conf :)<BR>
I hope it's useful<BR>
<BR>
**SIP.CONF**<BR>
<BR>
[general]<BR>
port = 5060 ; port to bind for sip connections<BR>
bindaddr = 0.0.0.0 ; ip to bind for sip connections<BR>
context = default ; default context for incoming sip calls<BR>
externip = 222.99.99.22 ; Your external ip<BR>
localnet = 192.168.1.0/255.255.255.0 ;localnet and mask<BR>
<BR>
<BR>
disallow = all ; disallow all codecs, we want to enable,<BR>
allow=g726<BR>
allow=ulaw<BR>
allow=alaw<BR>
allow= gsm ; what we deem is necessary<BR>
allow= ilbc<BR>
allow= speex<BR>
<BR>
register =><BR>
sipphonenumber:sipphonepwd@proxy01.sipphone.com/marlow-sip ;information<BR>
about sipphone<BR>
<BR>
[proxy01.sipphone.com]<BR>
type=friend<BR>
username=sipphonenumber<BR>
secret=sipphonepwd<BR>
host=proxy01.sipphone.com<BR>
context=sipphone<BR>
nat=1<BR>
<BR>
<BR>
[marlow]<BR>
callerid=("marlow" <3986>)<BR>
username=marlow<BR>
type=friend<BR>
secret=marlowpwd<BR>
host=dynamic<BR>
context=internal<BR>
canreinvite=no<BR>
nat=1<BR>
<BR>
[brandon]<BR>
callerid=("brandon" <3986>)<BR>
username=brandon<BR>
type=friend<BR>
secret=brandonpwd<BR>
host=dynamic<BR>
context=internal<BR>
canreinvite=no<BR>
<BR>
[david]<BR>
callerid=("david" <3988>)<BR>
username=david<BR>
type=friend<BR>
secret=davidpwd<BR>
host=dynamic<BR>
context=internal<BR>
canreinvite=no<BR>
-----------------------------------------------------------------------------------------------------------<BR>
<BR>
**EXTENSIONS.CONF**<BR>
<BR>
[general]<BR>
static=yes<BR>
writeprotect=no<BR>
<BR>
[globals]<BR>
MARLOW_CID=brandon<BR>
MARLOW_SIPPHONE=sipphonenumber<BR>
PHONE1=SIP/marlow ;unuseful for now it's only a try<BR>
PHONE2=SIP/brandon ;unuseful for now it's only a try<BR>
PHONE3=SIP/david ;unuseful for now it's only a try<BR>
<BR>
[internal]<BR>
include => from-sip<BR>
include => sipphone<BR>
include => tollfree<BR>
include => 3986<BR>
include => 3987<BR>
include => 3988<BR>
include => voicesystem<BR>
<BR>
[voicesystem]<BR>
<BR>
exten => 9999,1,VoiceMailMain(${CALLERIDNUM}) ; extension 9999 is the VM<BR>
system,go directly to callers VM<BR>
exten => 9999,2,Hangup<BR>
<BR>
<BR>
[3986]<BR>
exten => 3986,1,Dial(SIP/marlow,20) ; call SIP extension "marlow"<BR>
for 60 seconds,if extension 3986 is called<BR>
exten => 3986,2,Voicemail(u3986) ; if we can't connect to<BR>
"marlow" or after seconds go to the unavail VM<BR>
exten => 3986,102,Voicemail(b3986) ; if busy, go to the busy VM<BR>
<BR>
[3987]<BR>
exten => 3987,1,Dial(SIP/brandon,60) ; call SIP extension<BR>
"brandon" for 60 seconds,if extension 3986 is called<BR>
exten => 3987,2,Voicemail(u3986) ; if we can't connect to<BR>
"brandon" or after seconds go to the unavail VM<BR>
exten => 3987,102,Voicemail(b3986) ; if busy, go to the busy VM<BR>
<BR>
[3988]<BR>
exten => 3988,1,Dial(SIP/brandon,60) ; call SIP extension "david"<BR>
for 60 seconds,if extension 3986 is called<BR>
exten => 3988,2,Voicemail(u3986) ; if we can't connect to<BR>
"david" or after seconds go to the unavail VM<BR>
exten => 3988,102,Voicemail(b3986) ; if busy, go to the busy VM<BR>
<BR>
<BR>
[from-sip]<BR>
;<BR>
; default extension for calls from SIP<BR>
;<BR>
; calls from sipphone<BR>
<BR>
;for receive call from sipphone and send it to local phone 3986 but don't<BR>
work:( and I don't know why<BR>
exten => marlow-sip,1,SetCIDName(SIP - ${CALLERIDNAME}) ; indicate that the<BR>
call came through sipphone<BR>
exten => marlow-sip,2,Dial(Local/3986@internal/n)<BR>
<BR>
<BR>
[outbound-internal]<BR>
;<BR>
; include local extensions<BR>
;<BR>
include => internal<BR>
<BR>
;<BR>
; include SIP accounts<BR>
;<BR>
include => sipphone<BR>
<BR>
;<BR>
; include tollfree calls<BR>
;<BR>
;include => tollfree<BR>
<BR>
[default]<BR>
; include from-sip for default. We don't use it, but it might be a good idea<BR>
include => from-sip<BR>
include => sipphone<BR>
include => internal<BR>
<BR>
[sipphone]<BR>
; Official Sipphone example don't work very well<BR>
; exten => _1747.,1,Dial(SIP/${EXTEN}@proxy01.sipphone.com) ; set my<BR>
callerid and name<BR>
; exten => _1747.,2,Playback(notavail) ; this did<BR>
not work out<BR>
; exten => _1747.,3,Busy<BR>
<BR>
;Approach to gateway guide<BR>
exten => _1747.,1,SetCallerID(${MARLOW_CID} <${MARLOW_SIPPHONE}>) ; set my<BR>
callerid and name<BR>
exten =><BR>
_1747.,2,Dial,SIP/${EXTEN:4}@proxy01.sipphone.com ; dial<BR>
the number i wish to dial<BR>
exten => _1747.,3,Playback(invalid) ; this did<BR>
not work out<BR>
exten => _1747.,4,Hangup<BR>
exten => _1747.,103,Busy<BR>
<BR>
[tollfree]<BR>
;<BR>
; terminate toll-free no.'s via fwdnet<BR>
;<BR>
;Use for call italian toll free<BR>
; +39 800<BR>
; exten => _39800.,1,SetCallerID(<${MARLOW_SIPPHONE}>)<BR>
; exten => _39800.,1,Dial,SIP/*${EXTEN}@proxy01.sipphone.com<BR>
; exten => _39800N.,1,Dial,Zap/1/${EXTEN:2}<BR>
<BR>
; Use for call external PSTN number<BR>
exten => _0X.,1,Dial,Zap/1/${EXTEN:1}<BR>
exten => _0X.,2,Playback(invalid)<BR>
exten => _0X.,3,Hangup<BR>
exten => _0X.,103,Busy<BR>
<BR>
;Use for call american Toll free<BR>
; +1-800<BR>
exten => _1800.,1,SetCallerID(<${MARLOW_SIPPHONE}>)<BR>
exten => _1800.,2,Dial,SIP/*${EXTEN}@proxy01.sipphone.com<BR>
exten => _1800.,3,Playback(invalid)<BR>
exten => _1800.,4,Hangup<BR>
exten => _1800.,103,Busy<BR>
-----------------------------------------------------------------------------------------------------------<BR>
<BR>
<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>