[Asterisk-Users] Asterisk behind LinkSys NAT Routing

Rich Adamson radamson at routers.com
Sun Nov 2 20:10:18 MST 2003


Robert,

Try adding "canreinvite=no" to extn 2000 and reload asterisk. In your 
specific case, it needs to be on each sip.conf extn definition.

Rich

------------------------
> Problem I have is this.  outside firewall (extension 2003) can call me inside 
firewall (extension 2000) and all is fine.  If I call from
> inside firewall (extension 2000) to outside firewall (extension 2003) I hear no 
ringing and person at other end can pick up and I
> hear for maybe a half second then I go to voicemail.  If I add another extension on 
the outside then communication between
> outside and outside through * is not possible at all.  I know I can not be the only 
one who has tried to do this.  Please any help
> would be greatly appreciated.
>  
> My configuration.
>  
> Asterisk Server
> ----------------------
> Linux RedHat 9.0
> Asterisk CVS Update - 11/02/03 around 10:00AM PT
> Zaptel CVS Update - 11/02/03 around 10:00AM PT
> LinkSys Router with Asterisk server set as DMZ host.
>  
> Desktop Computer #1
> -------------------------------
> Windows XP
> Xten X-Pro build 1082
> Behind same LinkSys router.
> extension 2000 in asterisk
>  
> Desktop Computer #2
> -------------------------------
> Windows XP
> Xten X-Pro build 1082
> Not behind any firewall.
> extension 2003 in asterisk
>  
> sip.conf
>  
> ; General definitions for the sip.conf file.
> [general]
> port = 5060
> bindaddr = 0.0.0.0
> allow = gsm
> context = bogon-calls ; Default any unknown calls
> ;
> [2000]
> type=friend
> username=2000
> secret=grinch
> host=dynamic
> defaultip=192.168.1.210
> context=trusted
> nat=yes
> qualify=1000
> mailbox=2000
> ;
> [2003]
> type=friend
> username=2003
> secret=grinch
> host=dynamic
> context=normal
> nat=yes
> canreinvite=no
> mailbox=2003
>  
> extensions.conf
>  
> [globals]                                                            
> ; Variables to VoIP extensions by name
> ROBERT=SIP/2000                                                 
>  
> [general]
> static=yes       ; These two lines prevent the command-line interface
> writeprotect=yes ; from overwriting the config file. Leave them here.
>  
> [bogon-calls]
> ; Bogus calls if they find there way in to the system without authorization some 
how.
> exten => _.,1,Congestion ; if someone accidentally finds there way here give them a 
fast busy.
>  
> [stations]
> exten => 2000,1,Dial(SIP/2000,20)
> exten => 2000,2,Voicemail(u2000)
> exten => 2000,102,Voicemail(b2000)
> exten => 2000,103,Hangup        
> ;
> exten => 2003,1,Dial(SIP/2003,20)
> exten => 2003,2,Voicemail(u2003)
> exten => 2003,102,Voicemail(b2003)
> exten => 2003,103,Hangup            
> ;
> exten => 2997,1,VoicemailMain(2997)
> exten => 2998,1,VoicemailMain(2998)
> exten => 2999,1,VoicemailMain(${CALLERIDNUM})
> ;
> ; Direct Dial.  For those trusted to use the phone properly.
> [directdial]
> exten => 9,1,Dial(Zap/g1/${EXTEN:1})
> exten => 9,2,Congestion
> include => international
> ;
> ; International calling code and prefix used for users trusted to make international calls.
> [international]
> exten => _9011.,1,Dial(Zap/g1/${EXTEN:1})
> exten => _9011.,2,Congestion
> include => longdistance
> ;
> ; Long distance calling code and prefix used for users trusted to make long distance calls.
> [longdistance]
> exten => _91NXXNXXXXXX,1,Dial(Zap/g1/${EXTEN:1})
> exten => _91NXXNXXXXXX,2,Congestion
> include => local
> ;
> ; Local calling code and prefix used for users trusted to make local calls.
> [local]
> exten => _9NXXXXXX,1,Dial(Zap/g1/${EXTEN:1})
> exten => _9NXXXXXX,2,Congestion
> ;
> ; Trusted users from sip.conf who are able to fully use the phone.
> [trusted]
> include => stations
> include => directdial
> ;
> ; Normal users from sip.conf who are able to make local calls only.
> [normal]
> include => stations
> include => local
> ;
> ; Public area for people who are only allowed to make calls to other extensions
> [public]
> include => stations
> ;
> ; When someone calls the work line of XXX-XXX-XXXX they are directed through this.
> [inbound-work]
> exten => s,1,Zapateller(answer|nocallerid)
> exten => s,2,Dial(${ROBERT},20)
> exten => s,3,Voicemail(u2997)
> exten => s,4,Hangup
> exten => s,103,Voicemail(b2997)
> exten => s,104,Hangup
> ;
> ; When someone calls the home line of XXX-XXX-XXXX they are directed through this.
> [inbound-home]                                                                
> exten => s,1,Dial(${ROBERT},20)                       
> exten => s,2,Voicemail(u2998)
> exten => s,3,Hangup
> exten => s,102,Voicemail(b2998)
> exten => s,103,Hangup
>  
> Robert
---------------End of Original Message-----------------





More information about the asterisk-users mailing list