Incoming Calls Haning up right away

Hello,

I have a DIDforSale DID. I have set my Trunk in Freepbx and have changed my DIDforsale console to forward to the IP address of my server. My server is hosted and has public Ip address.

I cannot get calls my DID. The inbound route is set to go to an IVR. I have changed it straight to Extension but that does not seem to make a different. When I call my DID I get a beep and it hangs right up on my. Sometimes It doesn’t seem to reach my Server and I get “the subscriber you are trying is not in service”. It seems like the calls reaches my server but for some reason puts me through to h,1 hangup.

I have turned on Allow Anonymous SIP but it still does not get my calls through. The settings I am using are exactly the same as they were on an older server I was using with no problems.

type=peer
host=209.216.2.211
nat=no
canreinvite=yes
disallow=all
allow=ulaw&alaw
dtmfmode=rfc2833
insecure=very
context=from-didforsale

I’m starting to bang my head against the wall. Please help.

With Anonymous Sip Calling On
– Executing [19734006XXXX@from-sip-external:1] NoOp(“SIP/5060-00000005”, “Received incoming SIP connection from unknown peer to 19734006080”) in new stack
– Executing [1973400XXXX@from-sip-external:2] Set(“SIP/5060-00000005”, “DID=19734006080”) in new stack
– Executing [1973400XXXX@from-sip-external:3] Goto(“SIP/5060-00000005”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/5060-00000005”, “1?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,2)
– Executing [s@from-sip-external:2] GotoIf(“SIP/5060-00000005”, “0?setlanguage:from-trunk|1973400XXXX|1”) in new stack
– Goto (from-trunk,1973400XXXX,1)
– Executing [19734006080@from-trunk:1] Set(“SIP/5060-00000005”, “__FROM_DID=19734006080”) in new stack
– Executing [1973400XXXX@from-trunk:2] Gosub(“SIP/5060-00000005”, “app-blacklist-check|s|1”) in new stack
– Executing [s@app-blacklist-check:1] LookupBlacklist(“SIP/5060-00000005”, “”) in new stack
– Executing [s@app-blacklist-check:2] GotoIf(“SIP/5060-00000005”, “0?blacklisted”) in new stack
– Executing [s@app-blacklist-check:3] Set(“SIP/5060-00000005”, “CALLED_BLACKLIST=1”) in new stack
– Executing [s@app-blacklist-check:4] Return(“SIP/5060-00000005”, “”) in new stack
– Executing [1973400XXXX@from-trunk:3] ExecIf(“SIP/5060-00000005”, “1 |Set|CALLERID(name)=+1973464XXXX”) in new stack
– Executing [1973400XXXX@from-trunk:4] Ringing(“SIP/5060-00000005”, “”) in new stack
– Executing [1973400XXXX@from-trunk:5] Set(“SIP/5060-00000005”, “FAX_RX_EMAIL=”) in new stack
– Executing [1973400XXXX@from-trunk:6] Answer(“SIP/5060-00000005”, “”) in new stack
– Executing [1973400XXXX@from-trunk:7] PlayTones(“SIP/5060-00000005”, “ring”) in new stack
== Spawn extension (from-trunk, 1973400XXXX, 8) exited non-zero on ‘SIP/5060-00000005’
– Executing [h@from-trunk:1] Hangup(“SIP/5060-00000005”, “”) in new stack
== Spawn extension (from-trunk, h, 1) exited non-zero on ‘SIP/5060-00000005’

WIth Anonymous Calling off

– Executing [1973400XXXX@from-sip-external:1] NoOp(“SIP/5060-00000003”, “Received incoming SIP connection from unknown peer to 19734006080”) in new stack
– Executing [1973400XXXX@from-sip-external:2] Set(“SIP/5060-00000003”, “DID=19734006080”) in new stack
– Executing [1973400XXXX@from-sip-external:3] Goto(“SIP/5060-00000003”, “s|1”) in new stack
– Goto (from-sip-external,s,1)
– Executing [s@from-sip-external:1] GotoIf(“SIP/5060-00000003”, “0?checklang:noanonymous”) in new stack
– Goto (from-sip-external,s,5)
– Executing [s@from-sip-external:5] Set(“SIP/5060-00000003”, “TIMEOUT(absolute)=15”) in new stack
– Channel will hangup at 2011-02-02 01:13:55 UTC.
– Executing [s@from-sip-external:6] Answer(“SIP/5060-00000003”, “”) in new stack
– Executing [s@from-sip-external:7] Wait(“SIP/5060-00000003”, “2”) in new stack
– Executing [s@from-sip-external:8] Playback(“SIP/5060-00000003”, “ss-noservice”) in new stack
– <SIP/5060-00000003> Playing ‘ss-noservice’ (language ‘en’)
– Executing [s@from-sip-external:9] PlayTones(“SIP/5060-00000003”, “congestion”) in new stack
– Executing [s@from-sip-external:10] Congestion(“SIP/5060-00000003”, “5”) in new stack

Try these

type=peer
host=209.216.2.211
nat=yes
canreinvite=no
disallow=all
allow=ulaw&alaw
dtmfmode=rfc2833
insecure=very
context=from-trunk

You will also needs 2nd trunk or you will miss some calls.
type=peer
host=209.216.15.70
nat=yes
canreinvite=no
disallow=all
allow=ulaw&alaw
dtmfmode=rfc2833
insecure=very
context=from-trunk

Are you behind NAT

If your asterisk does not have public IP address and is on local LAN,
Update these values to configure your asterisk with DID for Sale.
In SIP.CONF or sip-nat.conf
Under general section
[general]externip=external IP address (IP address fo your router or firewall
localnet=local subnet
Say Public IP address of your router is 216.34.241.32 and IP address of you asterisk is 192.168.1.5

externip=216.34.241.32
localnet=192.168.1.0/24

Hope this will help.