Calls drop after 20 Seconds Inbound and Outbound

Any call I make out with my network is dropping after 20 seconds. Internal calls work fine we can phone extension to extension with no problems for as long as we want and I can use the echo test forever it seems but any calls out with my network to a sip trunks drops after exactly 20 seconds.

I am using x-lite as a softphone and after 20 seconds I loose audio but the counter keeps counting as if the call is still connected. When I look at my SIP provider records the calls shows as only lasting 20 seconds e.g.

2010-03-08 19:17:57 - NUMBER - 20secs
2010-03-08 19:57:37 - NUMBER - 20secs

I have tried a few things to resolve this isse but with no avail. I am running trixbox version 2.8.0.3. with a Netgear WNR2000 router.

I have tried the following:

Forwarded the following ports to my Trixbox: 5060 - 5082 / 10000 - 50000

Configured SiP_nat.conf to:

nat=yes
externip=externalip
localnet=192.168.168.0/255.255.255.0
refresh=120

SIP Trunk settings as follows:

Outgoing:

host=sip.voipon.co.uk
insecure=very
secret=PASSWORD
type=peer
username=USERNAME

Incoming:

context=from-pstn
type=friend
username=USERNAME

Register: username:password@sip.voipon.co.uk/username

I have also taken a copy of the CLI from asterisk when making a call using the trunk:

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
– Executing [90800282930@from-internal:1] Macro(“SIP/8001-b7c0a680”, “user-callerid,SKIPTTL,”) in new stack
– Executing [s@macro-user-callerid:1] Set(“SIP/8001-b7c0a680”, “AMPUSER=8001”) in new stack
– Executing [s@macro-user-callerid:2] GotoIf(“SIP/8001-b7c0a680”, “0?report”) in new stack
– Executing [s@macro-user-callerid:3] ExecIf(“SIP/8001-b7c0a680”, “1?Set(REALCALLERIDNUM=8001)”) in new stack
– Executing [s@macro-user-callerid:4] Set(“SIP/8001-b7c0a680”, “AMPUSER=8001”) in new stack
– Executing [s@macro-user-callerid:5] Set(“SIP/8001-b7c0a680”, “AMPUSERCIDNAME=Dave”) in new stack
– Executing [s@macro-user-callerid:6] GotoIf(“SIP/8001-b7c0a680”, “0?report”) in new stack
– Executing [s@macro-user-callerid:7] Set(“SIP/8001-b7c0a680”, “AMPUSERCID=8001”) in new stack
– Executing [s@macro-user-callerid:8] Set(“SIP/8001-b7c0a680”, “CALLERID(all)=“Dave” <8001>”) in new stack
– Executing [s@macro-user-callerid:9] ExecIf(“SIP/8001-b7c0a680”, “0?Set(CHANNEL(language)=)”) in new stack
– Executing [s@macro-user-callerid:10] GotoIf(“SIP/8001-b7c0a680”, “1?continue”) in new stack
– Goto (macro-user-callerid,s,19)
– Executing [s@macro-user-callerid:19] NoOp(“SIP/8001-b7c0a680”, “Using CallerID “Dave” <8001>”) in new stack
– Executing [90800282930@from-internal:2] Set(“SIP/8001-b7c0a680”, “_NODEST=”) in new stack
– Executing [90800282930@from-internal:3] Macro(“SIP/8001-b7c0a680”, “record-enable,8001,OUT,”) in new stack
– Executing [s@macro-record-enable:1] GotoIf(“SIP/8001-b7c0a680”, “1?check”) in new stack
– Goto (macro-record-enable,s,4)
– Executing [s@macro-record-enable:4] AGI(“SIP/8001-b7c0a680”, “recordingcheck,20100308-224449,1268088289.18”) in new stack
– Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20100308-224449,1268088289.18: Outbound recording enabled.
recordingcheck,20100308-224449,1268088289.18: CALLFILENAME=OUT8001-20100308-224449-1268088289.18
– AGI Script recordingcheck completed, returning 0
– Executing [s@macro-record-enable:999] MixMonitor(“SIP/8001-b7c0a680”, “OUT8001-20100308-224449-1268088289.18.wav,”) in new stack
– Executing [90800282930@from-internal:4] Macro(“SIP/8001-b7c0a680”, “dialout-trunk,3,0800282930,”) in new stack
– Executing [s@macro-dialout-trunk:1] Set(“SIP/8001-b7c0a680”, “DIAL_TRUNK=3”) in new stack
– Executing [s@macro-dialout-trunk:2] GosubIf(“SIP/8001-b7c0a680”, “0?sub-pincheck,s,1”) in new stack
– Executing [s@macro-dialout-trunk:3] GotoIf(“SIP/8001-b7c0a680”, “0?disabletrunk,1”) in new stack
– Executing [s@macro-dialout-trunk:4] Set(“SIP/8001-b7c0a680”, “DIAL_NUMBER=0800282930”) in new stack
– Executing [s@macro-dialout-trunk:5] Set(“SIP/8001-b7c0a680”, “DIAL_TRUNK_OPTIONS=tr”) in new stack
– Executing [s@macro-dialout-trunk:6] Set(“SIP/8001-b7c0a680”, “OUTBOUND_GROUP=OUT_3”) in new stack
– Executing [s@macro-dialout-trunk:7] GotoIf(“SIP/8001-b7c0a680”, “0?nomax”) in new stack
– Executing [s@macro-dialout-trunk:8] GotoIf(“SIP/8001-b7c0a680”, “0?chanfull”) in new stack
– Executing [s@macro-dialout-trunk:9] GotoIf(“SIP/8001-b7c0a680”, “0?skipoutcid”) in new stack
– Executing [s@macro-dialout-trunk:10] Set(“SIP/8001-b7c0a680”, “DIAL_TRUNK_OPTIONS=”) in new stack
– Executing [s@macro-dialout-trunk:11] Macro(“SIP/8001-b7c0a680”, “outbound-callerid,3”) in new stack
– Executing [s@macro-outbound-callerid:1] ExecIf(“SIP/8001-b7c0a680”, “0?Set(CALLERPRES()=)”) in new stack
– Executing [s@macro-outbound-callerid:2] ExecIf(“SIP/8001-b7c0a680”, “0?Set(REALCALLERIDNUM=8001)”) in new stack
– Executing [s@macro-outbound-callerid:3] GotoIf(“SIP/8001-b7c0a680”, “1?normcid”) in new stack
– Goto (macro-outbound-callerid,s,6)
– Executing [s@macro-outbound-callerid:6] Set(“SIP/8001-b7c0a680”, “USEROUTCID=”) in new stack
– Executing [s@macro-outbound-callerid:7] Set(“SIP/8001-b7c0a680”, “EMERGENCYCID=”) in new stack
– Executing [s@macro-outbound-callerid:8] Set(“SIP/8001-b7c0a680”, “TRUNKOUTCID=08723310161”) in new stack
– Executing [s@macro-outbound-callerid:9] GotoIf(“SIP/8001-b7c0a680”, “1?trunkcid”) in new stack
– Goto (macro-outbound-callerid,s,12)
– Executing [s@macro-outbound-callerid:12] ExecIf(“SIP/8001-b7c0a680”, “1?Set(CALLERID(all)=08723310161)”) in new stack
– Executing [s@macro-outbound-callerid:13] ExecIf(“SIP/8001-b7c0a680”, “0?Set(CALLERID(all)=)”) in new stack
– Executing [s@macro-outbound-callerid:14] ExecIf(“SIP/8001-b7c0a680”, “0?Set(CALLERPRES()=prohib_passed_screen)”) in new stack
– Executing [s@macro-dialout-trunk:12] ExecIf(“SIP/8001-b7c0a680”, “0?AGI(fixlocalprefix)”) in new stack
– Executing [s@macro-dialout-trunk:13] Set(“SIP/8001-b7c0a680”, “OUTNUM=0800282930”) in new stack
– Executing [s@macro-dialout-trunk:14] Set(“SIP/8001-b7c0a680”, “custom=SIP/VoIPon_SIP_IN”) in new stack
– Executing [s@macro-dialout-trunk:15] ExecIf(“SIP/8001-b7c0a680”, “0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^))”) in new stack
– Executing [s@macro-dialout-trunk:16] Macro(“SIP/8001-b7c0a680”, “dialout-trunk-predial-hook,”) in new stack
– Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit(“SIP/8001-b7c0a680”, “”) in new stack
– Executing [s@macro-dialout-trunk:17] GotoIf(“SIP/8001-b7c0a680”, “0?bypass,1”) in new stack
– Executing [s@macro-dialout-trunk:18] GotoIf(“SIP/8001-b7c0a680”, “0?customtrunk”) in new stack
– Executing [s@macro-dialout-trunk:19] Dial(“SIP/8001-b7c0a680”, “SIP/VoIPon_SIP_IN/0800282930,300,”) in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
== Using SIP VRTP TOS bits 136
== Using SIP VRTP CoS mark 6
– Called VoIPon_SIP_IN/0800282930
== Begin MixMonitor Recording SIP/8001-b7c0a680
– SIP/VoIPon_SIP_IN-0952e170 is making progress passing it to SIP/8001-b7c0a680
– SIP/VoIPon_SIP_IN-0952e170 answered SIP/8001-b7c0a680

It will sit at this point continue to show me as connected to the call on x-lite but my SIP provider will already show the call as disconnected. Then when I hangup using x-lite it shows:

– Executing [h@macro-dialout-trunk:1] Macro(“SIP/8001-b7c0a680”, “hangupcall,”) in new stack
– Executing [s@macro-hangupcall:1] GotoIf(“SIP/8001-b7c0a680”, “1?skiprg”) in new stack
– Goto (macro-hangupcall,s,4)
– Executing [s@macro-hangupcall:4] GotoIf(“SIP/8001-b7c0a680”, “1?skipblkvm”) in new stack
– Goto (macro-hangupcall,s,7)
– Executing [s@macro-hangupcall:7] GotoIf(“SIP/8001-b7c0a680”, “1?theend”) in new stack
– Goto (macro-hangupcall,s,9)
– Executing [s@macro-hangupcall:9] Hangup(“SIP/8001-b7c0a680”, “”) in new stack
== Spawn extension (macro-hangupcall, s, 9) exited non-zero on ‘SIP/8001-b7c0a680’ in macro ‘hangupcall’
== Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on ‘SIP/8001-b7c0a680’
== Spawn extension (macro-dialout-trunk, s, 19) exited non-zero on ‘SIP/8001-b7c0a680’ in macro ‘dialout-trunk’
== Spawn extension (from-internal, 90800282930, 4) exited non-zero on ‘SIP/8001-b7c0a680’
== End MixMonitor Recording SIP/8001-b7c0a680

It does the same thing with a couple of different SIP providers

Any suggestions you could make would be good as I have hit a brick wall.

Thanks
Dave

X-Lite has broken re-invite handling that will cause a disconnect in that sort of time frame if you have canreinvite anabled.

In X-Lite:

[quote]“Options, Advanced, Network,Call Inactivity RTCP. I disabled Call
Inactivity and problem went away.”[/quote]