No Inbound calls to FreePBX server

Hey all,
I am new to telephony and am having quite a bit of trouble with setting up my freepbx server. I am using didforsale as my VOIP provider and using the SIP method (I tried to get the IP to work and am having major issues with that) to run my system. At one point I had inbound and outbound calls working perfectly. Now I am only able to make outbound calls. I ran sngrep and I am seeing invites on my outbound calls and everythings works fine. However for my inbound calls I am not receiving any invites at all. SNGREP gives me nothing on the inbound calls. Like I mentioned previously everything was working at one point and now I am only able to make outbound calls. I checked with my VOIP provider and they are sending the calls out, but no invites are shown on sngrep. All I hear is “welcome to verizon wireless, your call cannot be completed as the call party is temporarily unavailable, please try your call again later” I am looking for direction as to troubleshooting this problem. Any help will be appreciated.

Also if anyone knows how to set up ip configuration of didforsale that will also be a great help as well. Thank you

If sngrep does not see your connections then there is either an up line firewall problem or a mis-configuration at your VSP ( how is Verizon involved ? )

It is the message I hear when I call from my cellphone which is serviced by Verizon Wireless. I don’t understand up line firewall? Can you break that down for me as I am really new to this stuff. When I log into my VSP I see the calls under CDR showing the origin and destination but sngrep shows no invite.

P.S. do you mean everything from my firewall and above leading to my ISP may be the problem?

Then your call is not being accepted by your VSP, call them.

I appreciate the quick response I’ll call them in the morning when I get into the office. Thanks for giving me a troubleshooting direction. I appreciate you guys taking the time to assist us beginners

1 Like

Also make sure your connection to your VSP is “up” first. Is it by IP or registration, to check, we will need to know if you are using chan_pjsip or chan_sip ?

It is by SIP registration. I am using PJSIP

from the asterisk cli

pjsip show registrations

In Asterisk SIP Settings, confirm that External Address and Local Networks are correctly set. If you change these, restart Asterisk and retest.

If that’s not your issue, please post:
Router/firewall make/model?
Any VoIP-related settings?
Does it have your public IP address on its WAN interface? If not, please explain.

Long day for me…… Pjsip shows registered in asterisk cli. Do you need me to copy and paste what is shown to me?

Hey Stewart I’m using windstream as my ISP provider. I am using there modem/router for my setup with included firewall protection.

The modem is a windstream t3200 Wi-Fi modem. All other markings are removed not showing which company the modem is really made by.

As far as VOIP related settings I’m currently using didforsale. It’s currently active with NAT disabled. Port is set to 5060

I’m currently waiting for didforsale to contact me.

If it’s similar to

it has a SIP ALG setting. Try turning it off.

If no luck, try forwarding the UDP SIP port (what pjsip Port to Listen On is set to) to the PBX. This is presently 5060 but you probably want to change it to a random value between 20000 and 50000, as there are many attacks on UDP port 5060. Of course, if you change it, you’ll need to make a corresponding change in your extensions (and possibly at DIDWW).

If you are setting this at DIDWW, something is strange, because with registration, they should send calls to whatever port you registered from and you shouldn’t need a port setting.

If you suspect the Windstream (Actiontec) router, if you have another router, you could try putting the Windstream router in bridge mode:

noi but now watch sngrep as you make an inbound call.

I’m going to try this in the morning and I will give the results. My voip provider still haven’t gotten back to me, but I did open a ticket

I don’t think I’m setting it to 5060 as they only send me the credentials such as UN and PW etc

Weird thing happen…I changed my ports on extensions, I’m now getting the “all circuits are busy now recording” on outbound calls. When I checked the registry it shows rejected. When I changed it back to port 5060 and it shows registered. At least sngrep shows invite on outbound calls still no invites for inbound calls. Is it possible my ISP is blocking incoming traffic to my server?

Still waiting for my VSP to contact me. Will it be possible if I were to pay anyone for remote access to fix this issue I’m having?

Depending on your VSP you might be able set the port that they send your IP based calls to , so NOT 5060 but the port you are listening on, if they don’t/won’t then use an appropriate registration or have your router do PNAT translation for their servers’ IPs.

I took a look at DIDWW and saw that ‘Voice IN’ and ‘Voice OUT’ trunks are separate. Unfortunately, Voice IN seems to be SIP URI only, which means that you must forward the SIP port in the router.

So, I suggest you try the following:

  1. In Asterisk SIP Settings, pjsip tab, set Port to Listen On to a random value between 20000 and 49999. I’ll use 23746 as an example. After Submit and Apply Config, restart Asterisk.

  2. Change your extensions to register to port 23746. If you’re not sure how to do that, post IP phone make/model or softphone/app name and version. Confirm that they register successfully, you can call *43 (echo test) and you can call between extensions.

  3. In the T3200, forward UDP port 23746 to the LAN address of the PBX.

  4. Confirm that you can still call out ok.

  5. In the Voice IN trunk on DIDWW, set Host to your public IP address and Port to 23746.

  6. Attempt an inbound call. If it fails, report what (if anything) appears in the Asterisk log. If nothing, what appears in sngrep.

At each step, if something doesn’t work, report details and we’ll try to resolve that before proceeding to the next step.

1 Like

Update: I changed my phone ports but left the pbx listening on port 5060. I am now receiving invites for inbound calls on sngrep however the calls immediately hang up. I don’t know what changed so I am now returning the phones back to 5060 and check sngrep to see what happens. I will follow the steps outlined by stewart. I appreciate the responses. I will keep you guys updated until the problem is solved

Update: My VSP just contacted me and toldme that my freepbx is sending them a bye on incoming call invites after 100 TRYING ( I don’t understand what that means). They want me to check my settings. I will be posting my call logs since I am now able to get invites on sngrep. The problem I am having now is that whenever someone calls my number, it automatically hangs up.

Here is my call log beginning where the call first comes in.

[2023-06-14 19:15:52] VERBOSE[21923][C-00000014] pbx.c: Spawn extension (app-blackhole, hangup, 2) exited non-zero on ‘PJSIP/1009946313-00000017’
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:1] Set(“PJSIP/1009946313-00000018”, “__DIRECTION=INBOUND”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:2] Gosub(“PJSIP/1009946313-00000018”, “sub-record-check,s,1(in,13862056455,dontcare)”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:1] GotoIf(“PJSIP/1009946313-00000018”, “0?initialized”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:2] Set(“PJSIP/1009946313-00000018”, “__REC_STATUS=INITIALIZED”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:3] Set(“PJSIP/1009946313-00000018”, “NOW=1686785082”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:4] Set(“PJSIP/1009946313-00000018”, “__DAY=14”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:5] Set(“PJSIP/1009946313-00000018”, “__MONTH=06”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:6] Set(“PJSIP/1009946313-00000018”, “__YEAR=2023”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:7] Set(“PJSIP/1009946313-00000018”, “__TIMESTR=20230614-192442”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:8] Set(“PJSIP/1009946313-00000018”, “__FROMEXTEN=unknown”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:9] Set(“PJSIP/1009946313-00000018”, “__MON_FMT=wav”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:10] NoOp(“PJSIP/1009946313-00000018”, “Recordings initialized”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:11] ExecIf(“PJSIP/1009946313-00000018”, “0?Set(ARG3=dontcare)”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:12] Set(“PJSIP/1009946313-00000018”, “REC_POLICY_MODE_SAVE=”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:13] ExecIf(“PJSIP/1009946313-00000018”, “0?Set(REC_STATUS=NO)”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:14] GotoIf(“PJSIP/1009946313-00000018”, “2?checkaction”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx_builtins.c: Goto (sub-record-check,s,17)
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@sub-record-check:17] GotoIf(“PJSIP/1009946313-00000018”, “1?sub-record-check,in,1”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx_builtins.c: Goto (sub-record-check,in,1)
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [in@sub-record-check:1] NoOp(“PJSIP/1009946313-00000018”, “Inbound Recording Check to 13862056455”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [in@sub-record-check:2] Set(“PJSIP/1009946313-00000018”, “FROMEXTEN=unknown”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [in@sub-record-check:3] ExecIf(“PJSIP/1009946313-00000018”, “11?Set(FROMEXTEN=13863195328)”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [in@sub-record-check:4] Gosub(“PJSIP/1009946313-00000018”, “recordcheck,1(dontcare,in,13862056455)”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [recordcheck@sub-record-check:1] NoOp(“PJSIP/1009946313-00000018”, “Starting recording check against dontcare”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [recordcheck@sub-record-check:2] Goto(“PJSIP/1009946313-00000018”, “dontcare”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx_builtins.c: Goto (sub-record-check,recordcheck,3)
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [recordcheck@sub-record-check:3] Return(“PJSIP/1009946313-00000018”, “”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [in@sub-record-check:5] Return(“PJSIP/1009946313-00000018”, “”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:3] Set(“PJSIP/1009946313-00000018”, “CHANNEL(tonezone)=us”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:4] Set(“PJSIP/1009946313-00000018”, “__FROM_DID=13862056455”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:5] Set(“PJSIP/1009946313-00000018”, “returnhere=1”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:6] Gosub(“PJSIP/1009946313-00000018”, “app-blacklist-check,s,1()”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-blacklist-check:1] GotoIf(“PJSIP/1009946313-00000018”, “0?blacklisted”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-blacklist-check:2] Set(“PJSIP/1009946313-00000018”, “CALLED_BLACKLIST=1”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-blacklist-check:3] Return(“PJSIP/1009946313-00000018”, “”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:7] Set(“PJSIP/1009946313-00000018”, “CDR(did)=13862056455”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:8] GotoIf(“PJSIP/1009946313-00000018”, “0?”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:9] ExecIf(“PJSIP/1009946313-00000018”, “1 ?Set(CALLERID(name)=13863195328)”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:10] Set(“PJSIP/1009946313-00000018”, “alreturnhere=1”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:11] Gosub(“PJSIP/1009946313-00000018”, “app-allowlist-check,s,1()”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:1] GosubIf(“PJSIP/1009946313-00000018”, “0?app-allowlist-check-predial-hook,s,1()”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:2] GotoIf(“PJSIP/1009946313-00000018”, “0?returnto”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:3] Gosub(“PJSIP/1009946313-00000018”, “app-allowlist-pause-check,s,1()”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-pause-check:1] NoOp(“PJSIP/1009946313-00000018”, “Current time 1686785082”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-pause-check:2] NoOp(“PJSIP/1009946313-00000018”, "Pause timer expire ") in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-pause-check:3] GosubIf(“PJSIP/1009946313-00000018”, “0?app-allowlist-pause-disable,s,1()”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-pause-check:4] Return(“PJSIP/1009946313-00000018”, “”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:4] GotoIf(“PJSIP/1009946313-00000018”, “0?returnto”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:5] GotoIf(“PJSIP/1009946313-00000018”, “1?check-contacts”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx_builtins.c: Goto (app-allowlist-check,s,8)
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:8] GotoIf(“PJSIP/1009946313-00000018”, “1?nonallowlisted”) in new stack
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx_builtins.c: Goto (app-allowlist-check,s,13)
[2023-06-14 19:24:42] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:13] Answer(“PJSIP/1009946313-00000018”, “”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:14] Set(“PJSIP/1009946313-00000018”, “ALDEST=”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:15] ExecIf(“PJSIP/1009946313-00000018”, “1?Set(ALDEST=app-blackhole,hangup,1)”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:16] GotoIf(“PJSIP/1009946313-00000018”, “1?returnto”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx_builtins.c: Goto (app-allowlist-check,s,18)
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Executing [s@app-allowlist-check:18] Return(“PJSIP/1009946313-00000018”, “”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Executing [13862056455@from-pstn:12] GotoIf(“PJSIP/1009946313-00000018”, “22?app-blackhole,hangup,1”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx_builtins.c: Goto (app-blackhole,hangup,1)
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Executing [hangup@app-blackhole:1] NoOp(“PJSIP/1009946313-00000018”, “Blackhole Dest: Hangup”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Executing [hangup@app-blackhole:2] Hangup(“PJSIP/1009946313-00000018”, “”) in new stack
[2023-06-14 19:24:43] VERBOSE[24469][C-00000015] pbx.c: Spawn extension (app-blackhole, hangup, 2) exited non-zero on ‘PJSIP/1009946313-00000018’

It appears that you have an allowlist set up, configured to just hang up the call if the calling number is not in the list. It also seems that the calling number was 13863195328 and was not found in the list, so the call got rejected.

For testing, you should disable the allowlist functionality until things are otherwise working.

For more detail on what’s happening, at the Asterisk command line type
pjsip set logger on
which will include a SIP trace in the log, along with the regular entries. If the log is long, instead of including it in your post, paste it at pastebin.com and post the link here. Note that pjsip logger gets turned off when you Apply Config or otherwise restart or reload Asterisk, so turn it back on before making your test call.