Incoming call still ringing

graysonpeddie
Joined: Sun 16 of Aug, 2009

Incoming call still ringing

Posted:Mon 17 of Aug, 2009 (00:14 UTC)
My setup:
{Cable Modem} <-> eth0 {Server with Asterisk/web server/routing} eth1 <-> {Gigabit Switch} <-> {Computer/s}

I dial from my cell phone using a 1-321-xxx-xxxx number, my X-Lite softphone and my cellphone both rings, then when I answer a call from my computer, my cell phone keeps ringing as if I'm not getting 200 OK from my cell phone. Once I hang up from my computer, about 10 to 15 seconds, I start getting a buzy signal from my cell phone. I can make an outgoing call from my computer just fine. It is incoming call that is causing a problem.

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
— Executing {1777xxxxxxx@from-pstn:1} NoOp("SIP/CallCentric-d40089e8", "Catch-All DID Match - Found 17772679434 - You probably want a DID for this.") in new stack
— Executing {1777xxxxxxx@from-pstn:2} Goto("SIP/CallCentric-d40089e8", "ext-did,s,1") in new stack
— Goto (ext-did,s,1)
— Executing {s@ext-did:1} Set("SIP/CallCentric-d40089e8", "__FROM_DID=s") in new stack
— Executing {s@ext-did:2} ExecIf("SIP/CallCentric-d40089e8", "0 ?Set(CALLERID(name)=1850xxxxxxx)") in new stack
— Executing {s@ext-did:3} Set("SIP/CallCentric-d40089e8", "__CALLINGPRES_SV=allowed_not_screened") in new stack
— Executing {s@ext-did:4} Set("SIP/CallCentric-d40089e8", "CALLERPRES()=allowed_not_screened") in new stack
— Executing {s@ext-did:5} Goto("SIP/CallCentric-d40089e8", "from-did-direct,10,1") in new stack
— Goto (from-did-direct,10,1)
— Executing {10@from-did-direct:1} Set("SIP/CallCentric-d40089e8", "__RINGTIMER=90") in new stack
— Executing {10@from-did-direct:2} Macro("SIP/CallCentric-d40089e8", "exten-vm,10,10") in new stack
— Executing {s@macro-exten-vm:1} Macro("SIP/CallCentric-d40089e8", "user-callerid") in new stack
— Executing {s@macro-user-callerid:1} Set("SIP/CallCentric-d40089e8", "AMPUSER=1850xxxxxxx") in new stack
— Executing {s@macro-user-callerid:2} GotoIf("SIP/CallCentric-d40089e8", "0?report") in new stack
— Executing {s@macro-user-callerid:3} ExecIf("SIP/CallCentric-d40089e8", "1?Set(REALCALLERIDNUM=1850xxxxxxx)") in new stack
— Executing {s@macro-user-callerid:4} Set("SIP/CallCentric-d40089e8", "AMPUSER=") in new stack
— Executing {s@macro-user-callerid:5} Set("SIP/CallCentric-d40089e8", "AMPUSERCIDNAME=") in new stack
— Executing {s@macro-user-callerid:6} GotoIf("SIP/CallCentric-d40089e8", "1?report") in new stack
— Goto (macro-user-callerid,s,10)
— Executing {s@macro-user-callerid:10} GotoIf("SIP/CallCentric-d40089e8", "0?continue") in new stack
— Executing {s@macro-user-callerid:11} Set("SIP/CallCentric-d40089e8", "__TTL=64") in new stack
— Executing {s@macro-user-callerid:12} GotoIf("SIP/CallCentric-d40089e8", "1?continue") in new stack
— Goto (macro-user-callerid,s,19)
— Executing {s@macro-user-callerid:19} NoOp("SIP/CallCentric-d40089e8", "Using CallerID "Cell Phone FL" <1850xxxxxxx>") in new stack
— Executing {s@macro-exten-vm:2} Set("SIP/CallCentric-d40089e8", "RingGroupMethod=none") in new stack
— Executing {s@macro-exten-vm:3} Set("SIP/CallCentric-d40089e8", "VMBOX=10") in new stack
— Executing {s@macro-exten-vm:4} Set("SIP/CallCentric-d40089e8", "EXTTOCALL=10") in new stack
— Executing {s@macro-exten-vm:5} Set("SIP/CallCentric-d40089e8", "CFUEXT=") in new stack
— Executing {s@macro-exten-vm:6} Set("SIP/CallCentric-d40089e8", "CFBEXT=") in new stack
— Executing {s@macro-exten-vm:7} Set("SIP/CallCentric-d40089e8", "RT=90") in new stack
— Executing {s@macro-exten-vm:8} Macro("SIP/CallCentric-d40089e8", "record-enable,10,IN") in new stack
— Executing {s@macro-record-enable:1} GotoIf("SIP/CallCentric-d40089e8", "1?check") in new stack
— Goto (macro-record-enable,s,4)
— Executing {s@macro-record-enable:4} AGI("SIP/CallCentric-d40089e8", "recordingcheck,20090816-190827,1250464107.13") in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
recordingcheck,20090816-190827,1250464107.13: Inbound recording not enabled
— <SIP/CallCentric-d40089e8>AGI Script recordingcheck completed, returning 0
— Executing {s@macro-record-enable:5} MacroExit("SIP/CallCentric-d40089e8", "") in new stack
— Executing {s@macro-exten-vm:9} Macro("SIP/CallCentric-d40089e8", "dial,90,tr,10") in new stack
— Executing {s@macro-dial:1} GotoIf("SIP/CallCentric-d40089e8", "1?dial") in new stack
— Goto (macro-dial,s,3)
— Executing {s@macro-dial:3} AGI("SIP/CallCentric-d40089e8", "dialparties.agi") in new stack
— Launched AGI Script /var/lib/asterisk/agi-bin/dialparties.agi
dialparties.agi: Starting New Dialparties.agi
== Manager 'admin' logged on from 127.0.0.1
dialparties.agi: Caller ID name is 'Cell Phone FL' number is '1850xxxxxxx'
> dialparties.agi: USE_CONFIRMATION: 'FALSE'
> dialparties.agi: RINGGROUP_INDEX: ''
dialparties.agi: Methodology of ring is 'none'
— dialparties.agi: Added extension 10 to extension map
> dialparties.agi: Extension 10 has call screening off
— dialparties.agi: Extension 10 cf is disabled
— dialparties.agi: Extension 10 do not disturb is disabled
> dialparties.agi: extnum 10 has: cw: 0; hascfb: 0 [] hascfu: 0 []
> dialparties.agi: ExtensionState: 0
dialparties.agi: Extension 10 has ExtensionState: 0
— dialparties.agi: Checking CW and CFB status for extension 10
— dialparties.agi: dbset CALLTRACE/10 to 1850xxxxxxx
— dialparties.agi: Filtered ARG3: 10
== Manager 'admin' logged off from 127.0.0.1
— <SIP/CallCentric-d40089e8>AGI Script dialparties.agi completed, returning 0
— Executing {s@macro-dial:7} Dial("SIP/CallCentric-d40089e8", "SIP/10,90,tr") in new stack
== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
— Called 10ver*CLI>
— SIP/10-01394ef8 is ringing
— SIP/10-01394ef8 answered SIP/CallCentric-d40089e8
— Executing {h@macro-dial:1} Macro("SIP/CallCentric-d40089e8", "hangupcall") in new stack
— Executing {s@macro-hangupcall:1} ResetCDR("SIP/CallCentric-d40089e8", "vw") in new stack
— Executing {s@macro-hangupcall:2} NoCDR("SIP/CallCentric-d40089e8", "") in new stack
— Executing {s@macro-hangupcall:3} GotoIf("SIP/CallCentric-d40089e8", "1?skiprg") in new stack
— Goto (macro-hangupcall,s,6)
— Executing {s@macro-hangupcall:6} GotoIf("SIP/CallCentric-d40089e8", "1?skipblkvm") in new stack
— Goto (macro-hangupcall,s,9)
— Executing {s@macro-hangupcall:9} GotoIf("SIP/CallCentric-d40089e8", "1?theend") in new stack
— Goto (macro-hangupcall,s,11)
— Executing {s@macro-hangupcall:11} Hangup("SIP/CallCentric-d40089e8", "") in new stack
== Spawn extension (macro-hangupcall, s, 11) exited non-zero on 'SIP/CallCentric-d40089e8' in macro 'hangupcall'
== Spawn extension (macro-dial, h, 1) exited non-zero on 'SIP/CallCentric-d40089e8'
== Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/CallCentric-d40089e8' in macro 'dial'
== Spawn extension (macro-exten-vm, s, 9) exited non-zero on 'SIP/CallCentric-d40089e8' in macro 'exten-vm'
== Spawn extension (from-did-direct, 10, 2) exited non-zero on 'SIP/CallCentric-d40089e8'

Note that Asterisk (I use asterisk -vvvvvvr) thinks that it's getting 1777xxxxxxx number even though I just dialed a 1321xxxxxxx number.

Eth0 gets an IP address directly from Bright House (I live in Orlando, FL).
Eth1 goes to my internal LAN.

My iptables setup:

root@grayson-main-server:~# cat /etc/iptables.rules
|# Generated by iptables-save v1.4.0 on Fri Aug 14 17:08:39 2009
|*nat
|:PREROUTING ACCEPT {113777:11589474}
|:POSTROUTING ACCEPT {522:126319}
|:OUTPUT ACCEPT {55293:5480409}
|-A PREROUTING -i eth0 -p tcp -m tcp --dport 5020:5084 -j DNAT --to-destination 10.0.0.1:5020-5084
|-A PREROUTING -i eth0 -p udp -m udp --dport 5020:5084 -j DNAT --to-destination 10.0.0.1
|#...
|-A PREROUTING -i eth0 -p udp -m udp --dport 10000:20000 -j DNAT --to-destination 10.0.0.1
|#...
|-A POSTROUTING -o eth0 -j MASQUERADE
|COMMIT
|# Completed on Fri Aug 14 17:08:39 2009
|# Generated by iptables-save v1.4.0 on Fri Aug 14 17:08:39 2009
|*filter
|:INPUT ACCEPT {65673:13080773}
|:FORWARD ACCEPT {8:376}
|:OUTPUT ACCEPT {284232:51476591}
|-A INPUT -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP
|-A INPUT -f -j DROP
|-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG FIN,SYN,RST,PSH,ACK,URG -j DROP
|-A INPUT -p tcp -m tcp --tcp-flags FIN,SYN,RST,PSH,ACK,URG NONE -j DROP
|-A INPUT -i eth0 -p icmp -m icmp --icmp-type 8 -j DROP
|-A INPUT -p tcp -m tcp --sport 22 --dport 22 -j ACCEPT
|-A INPUT -i eth0 -m state --state RELATED,ESTABLISHED -j ACCEPT
|-A INPUT -j ACCEPT
|-A INPUT -i lo -j ACCEPT
|-A INPUT -i eth1 -j ACCEPT
|-A FORWARD -i eth1 -j ACCEPT
|-A FORWARD -i eth1 -o eth0 -j ACCEPT
|-A FORWARD -i eth0 -o eth1 -m state --state RELATED,ESTABLISHED -j ACCEPT
|COMMIT
|# Completed on Fri Aug 14 17:08:39 2009

Note that I took off some things that are irrelevant (marked by "#..."). Also, because I don't want the forum to parse asterisks into bullet-ed list, I appended every line with a vertical bar.

Here's a setup of my SIP trunk:

context=from-pstn
fromdomain=callcentric.com
fromuser=1777xxxxxxx
host=callcentric.com
insecure=port,invite
secret=xxxxxxxx
type=peer
username=1777xxxxxxx
allow=all

Registration String:
1777xxxxxxx:xxxxxxxx@callcentric.com/1777xxxxxxx

So, to put it in steps for what happened when I'm getting incoming call:

1: Someone dials my 1-321 number.
2: Asterisk gets the invite and starts ringing my phone.
3: Their phone rings.
4: I answer the call (initiate SIP session).
5: Their phone keeps ringing.
6: During step 5, I say "hello, hello..."
7: I terminate the SIP session.
8: Their phone keeps ringing for approximately 10 seconds until they get a busy signal.

Asterisk 1.6.2.0-beta3 built by root @ grayson-mainserver on a x86_64 running Linux
Linux 2.6.27-14-generic (Ubuntu 8.10)
freePBX 2.5.1.5

As a final note, the ] and [ gets turned into links, so I replaced it with { and }.