Out bound call hangs up right after 20 seconds

Out bound call hangs up right after 20 seconds

Postby sahar_ca » Mon Oct 26, 2009 11:18 pm
Out bound call hangs up right after 20 seconds :frowning:

Asterisk 1.6.0.15,Linux cent os

I am newbie and have been trying to setup asterisk server at home, My problem is following:
I have 2 PCs, extension 202 and 203 sitting side by side in one room connected to a single wireless router, When I call to each other my call drops right after 20 second.When I perform an echo test call drops at 20 seconds too.
Overview of my Router setup. I have a THOMSON ST516 provided by my ISP this router is a router and hi speed modem. Port 5060 is forwarded and RTP ports are opened as well 10000-20000 and Lan cable is coming out of this router and connected to my Dlink N series wireless router which is acting as a wireless access point.

In addition to that leaving externip and localnet commented(i.e. not used), if I am out side of the NAT(means I took my laptop to work and connected to network and tried to call this call works with no problem but still it gets dropped right after 20 seconds). I was under the impression that if Externip is not defined * cant communicate to any thing out side of my router.

If I uncomment externip and localnet then both extensions becomes unreachable even though these extensions are sitting side by side connected to a same router.

Any advise will be appreciated

Please feel free to ask for any other logs details

Thanks In advance

Farhan Haider

sip.conf

[general]
port=5060
bindaddr=0.0.0.0
tos=0x18
;srvlookup = yes
;localnet=192.168.1.254/255.255.255.0
;externip=my.ip.add.ress
disallow=all
allow=all

[200]
type=friend
username=200
host=dynamic
context=home
secret=200
callerid= NS Laptop Missisauga
mailbox=200@default
nat=route
disallow=all
allow = ulaw
canreinvite = no
qualify = 3000
dtmf = rfc2833
dtmfmode = auto
insecure = very

[201]
type=friend
username=201
host=dynamic
context=home
secret=201
callerid= Sahars Laptop Markham
mailbox=201@default
nat = route
disallow=all
allow = all
canreinvite = no
qualify = 3000
dtmf = rfc2833
dtmfmode = auto
insecure = very

[202]
type=friend
username=202
host=dynamic
context=home
secret=202
callerid= Bhai Jan Kuwait
mailbox=202@default
nat = route
disallow=all
allow = all
canreinvite = no
qualify = 3000
dtmf = rfc2833
dtmfmode = auto
insecure = very

[203]
type=friend
username=203
host=dynamic
context=home
secret=203
callerid=Mahad Desktop Markham
mailbox=203@default
nat = route
disallow=all
allow = all
canreinvite = no
qualify = 3000
dtmf = rfc2833
dtmfmode = auto
insecure = very

[204]
type=friend
username=204
host=dynamic
context=home
secret=204
callerid=Linux Desktop Markham
mailbox=204@default
nat = route
disallow=all
allow = all
canreinvite = no
qualify = 3000
dtmf = rfc2833
dtmfmode = auto
insecure = very

extension.conf

[general]

autofallthrough=yes

static=yes
writeprotect=no

[home]

;VoiceMail
exten => 8500,1,VoicemailMain
exten => 8500,n,Goto(s,6)

exten => 55,1,Playback(demo-echotest) ; Let them know what’s going on
exten => 55,2,Echo ; Do the echo test
exten => 55,3,Playback(demo-echodone) ; Let them know it’s over

;exten => 200,1,Dial(SIP/200,60)
;exten => 201,1,Dial(SIP/201,60)
exten => 202,1,Dial(SIP/202,60)
exten => 203,1,Dial(SIP/203,60)
exten => 204,1,Dial(SIP/204,60)

exten => 200,1,NoOp()
exten => 200,2,Dial(SIP/200,60)
exten => 200,3,Voicemail(200)
exten => 200,4,Hangup()

exten => 201,1,NoOp()
exten => 201,2,Dial(SIP/201,60)
exten => 201,3,Voicemail(201)
exten => 201,4,Hangup()


cli sip show peers

Name/username Host Dyn Nat ACL Port Status
204/204 (Unspecified) D N 5060 UNKNOWN
203/203 209.183.6.169 D N 65092 OK (313 ms)
202/202 209.183.6.169 D N 65073 OK (108 ms)
201/201 209.183.6.169 D N 61208 UNREACHABLE
200/200 (Unspecified) D N 5060 UNKNOWN
5 sip peers [Monitored: 2 online, 3 offline Unmonitored: 0 online, 0 offline]

I am able to resolve my problem :smiley: by reconfiguring my DSL Modem and my Dlink Router here is the solution:

Originally I had my DSL Modem acting as Router and My Dlink Router was acting as Access point.
I reconfigured my DSL modem Speed Touch 516 as Bridge and reconfigure My Dlink DIR 655 as Router
-Forwarded 5060 port and open RTP Ports
Open 5060 Port in my linux using Iptable command
Open RTP Ports in my linux using Iptable.
On my sip.conf {General section}
Set the ExternIP= "My External IP address"
Set localnet = My Localnet
Set Net = yes
for each extension
Set Nat =yes
Set Qualify=Yes
Set Canreinvite = very.

Reload asterisk