[Asterisk-Users] NAT problems

Bartosz Wegrzyn junk at lexon.ws
Thu Aug 5 14:00:04 MST 2004


I didnot use that magic name, because lately there was a big discution
regarding my post.  I will try to be as precise as as I can now.

This is my sip conf file

[general]
externip=my DDNS Domain name
bindaddr = 0.0.0.0
port=5060
localnet=192.168.1.0/255.255.255.0
disallow=all
allow=ulaw
context=from-broad
dtmfmode=inband
register => 7734660101:mysecret at sip.broadvoice.com
tos=0x18
srvlookup=yes
nat=yes
insecure=yes

[Broadvoice]
type=peer
username=7734660101
fromuser=7734660101
secret=mysecret
host=sip.broadvoice.com
context=sip
fromdomain=sip.broadvoice.com
canreinvite=no
dtmfmode=inband
nat=yes

[broadvoice-incoming]
type=peer
dtmfmode=inband
host=147.135.8.128
context=from-broad
qualify=yes
canreinvite=no
disallow=all
allow=ulaw
nat=yes

[broadvoice-incoming2]
type=peer
dtmfmode=inband
host=147.135.0.128
context=from-broad
qualify=yes
canreinvite=no
disallow=all
allow=ulaw
nat=yes

What is happening is that when this IP change occurs,
asterisk answers incoming call, but on the other side the caller does not
here anything (only 2-3 rings) and then it goes directly to the provider
voicemail. When I look at the asterisk console while it is happening the
asterisk executes everything in the context till the end.

Bart,




> ----- Original Message -----
> From: "Bartosz Wegrzyn" <junk at lexon.ws>
> To: <asterisk-users at lists.digium.com>
> Sent: Thursday, August 05, 2004 1:21 PM
> Subject: [Asterisk-Users] NAT problems
>
>
>> Hello,
>>
>> I am connected to my SIP provider through the DSL router with NAT.
>> I do have a dynamic ip address.  My router ip is on 192.168.1.1, the *
>> box
>> is on 192.168.1.254. To overcome the NAT problems I forward all incoming
>> packets to my router and I use the externip,localnet,nat * options.
>> Nevertheles, I am having problems with my incoming calls which fail from
>> time to time. When everything works my asterisk console logs:
>>
>> -- Executing Ringing("SIP/147.135.8.129-097351d0", "") in new stack
>> --
>> Executing Goto("SIP/147.135.8.129-097351d0", "menu|s|1") in newstack
>> --
>> Goto (menu,s,1)    -- Executing
>> SetMusicOnHold("SIP/147.135.8.129-097351d0", "default")in new stack
>> --
>> Executing ......
>>
>> My incoming calls starts to fail whenever * console logs:
>>
>> -- Executing Ringing("SIP/192.168.8.3-097351d0", "") in new stack    --
>> Executing Goto("SIP/192.168.8.3-097351d0", "menu|s|1") in newstack    --
>> Goto (menu,s,1)    -- Executing
>> SetMusicOnHold("SIP/192.168.8.3-097351d0",
>> "default")in new stack    -- Executing .........
>>
>> The above messeges are the same except one thing: the IP address after
>> "SIP/......."  Everytime, when this IP address is local my incoming
>> calls
>> fail.  I think that this issue is related to my NAT.
>> What exacly the ip address after SIP means. Does it show which IP
>> address
>> should be the packets sent to.  If my understanding is correct, does it
>> mean that asterisk is trying to send packets to 192.168.8.3 which is not
>> existing IP address on my network, so the calls fail.
>>
>> Please explaing, or give me any suggestions where can I find more about
>> what that mean.  Also, how does the asterisk figures out that IP so it
>> canlater put it there?
>>
>> Thank You
>>
>
> LOL it's ok, you can call them by name, I know from that IP address that
> it's BroadVoice :)
>
> Can you send a copy of your SIP.conf? Just the relevant info, I don't need
> the whole thing...
>
> As for that internal IP I have noticed that too, it's been doing that
> since
> since CVS 7/22 or around there.. I have no idea where it gets that IP from
> because it does the same for me, but my private lan is a 10.x.x.x lan and
> none of my NICs use the 192.168.x.x address space...
>
> Also can you elaborate on what you mean by "fails"? Does * not answer the
> call? Does it hang up during the conversation? What's happening? When is
> it
> happening?
>
> -Chris
>
>
> _______________________________________________
> Asterisk-Users mailing list
> Asterisk-Users at lists.digium.com
> http://lists.digium.com/mailman/listinfo/asterisk-users
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
>




More information about the asterisk-users mailing list