Inbound Calls Not Working With Amazon Chime

Hello, I am a somewhat experienced user of FreePBX and Amazon Chime. I have had some problems that I’m having now but I have zero clue on what is going wrong. When I try to make an inbound call it goes to the usual busy tone which means that it isn’t going to FreePBX correctly. Also, when I make an inbound call I get nothing on my Asterisk Log. When I check my Chime Voice Connector Log all I get is this. When I try to make an outbound call, which also doesn’t work, I get this in my Chime Voice Connector Sip Messages Log and also get this in my Asterisk Log.

For my Config in AWS, under “Termination” my Allowed Hosts List has my FreePBX public IP address with a /32. I also have my CPS set to 1 and my Caller ID Override set to my Chime number. Under “Origination” I have my host set as the same public IP address I set in my Termination tab with a port of 5060 and set to UDP. I also have no Last Options Ping in AWS. I have also confined my router to send all outbound ports of 5060 to port 5060 of my FreePBX Server and flip-flopped for inbound to outbound.

For my Config in FreePBX Trunk, I have my Outbound Caller ID set to the same thing I have in Caller ID Override in AWS. For Maximum Channels, it is set to 9. My Dial Number Manipulation Rules are set as follows: (+1) | NXXXXXX (+1) | NXXNXXXXXX (+1) | 911 For PJSIP settings, I have Authentication and Registration set to none. My SIP Server is set to my AWS Outbound Host Name with a port of 5060. For From Domain, it is also set as my AWS Outbound Host Name. For Send RPID/PAI it is set to Send P-Asserted-Identity Header. I also have ULAW enabled on my Codecs page.

If I missed anything I used some of the instructions here.

How do I fix this issue?

I had a test Chime trunk (outbound only, I had no numbers with them) that worked a couple of years ago I just fired it up and got the same cause 21 reject as you.Turning on pjsip logger, I saw a 403 error stating that the caller ID was invalid.

I found

implying that they won’t accept numbers other than those purchased from them.

Looking at your log, unless I missed something, the caller ID sent was 1001 (the calling extension number), which would obviously be invalid.

In your PBX trunk settings, in addition to setting Outbound CallerID to your Chime number starting with +1, set CID Options to Force Trunk CID and retest. If no luck, turn on pjsip logger and paste a new log.

For incoming, run sngrep and see whether an attempted call shows there. If so, FreePBX Firewall is probably blocking it. If nothing in sngrep, capture traffic on the WAN interface of your router/firewall and see whether the incoming INVITE is there. If not, and you are sure that at AWS, your Origination is enabled, Inbound routes are correctly set and the phone number is properly directed, I would open a ticket with AWS.

Hey, for my incoming route in sngrep, it says OPTIONS and 200 OK. I have also turned off my firewall but I still cant make a incoming call work. For outbound, I did what you said to do with no luck. My new pjsip log from aws is here.

An INVITE was sent to the TW IP, Did sngrep see it? if it did, post what sngrep saw about any response ? We also see

To: <sip:[email protected]:5060>;transport=TLS

This is a nonstandard blend of port and transport,

sngrep did see it. You can view what sngrep saw here.

Well we now have a cisco gateway as well as a FreePBX involve is 192.168.1.3 or 192.168.1.29 supposed to accept the INVITE

So any solutions?

I believe that @dicko solved it, albeit without providing the details.

In your Voice Connector settings, General tab, set Encryption to Disabled. If your production system requires encryption, set that up after you have incoming and outgoing working.

On the Origination tab, set Protocol for your inbound route to UDP. Port should match the value of Port to Listen On in your pjsip settings.

Retest. If you still have trouble, at the Asterisk command prompt type
pjsip set logger on
make failing incoming and/or outgoing calls and paste the Asterisk log for them, which will now include SIP traces.

I have set my encryption set to disabled in AWS and have set my protocol to UDP with a port of 5060. I have also checked if my listen-on in my pjsip settings is set to 5060, which it is. Even when doing that it doesn’t go through both incoming and outbound.

For my failed incoming call with pjsip logger on, you can see here.

For outbound, you can see it here.

Some progress on the inbound; at least Asterisk is processing it now.
It appears that you don’t have an Inbound Route specific to the DID (perhaps intentional), but you do have a catch-all that routes to ext. 1001. Somehow, the extension was unavailable, follow-me didn’t work, an attempt at voicemail also failed, so the call was rejected.

Rather than look at hundreds of lines of log in detail, please make a call to extension 1001 from another working extension, and paste the log, with pjsip logger on. If this call also fails, we can analyze a much simpler case (not involving Chime). If it succeeds, we can quickly see where the logs diverge. Also, post what you expected to happen (1001 rings, goes to voicemail, etc.)

On outbound, the caller ID sent was still 1001, so rejected by Chime. Please recheck that SlaySistersCorpMAICHI was the intended trunk, it has Force Trunk CID on, the Outbound Route selected is not an Emergency Route or Intra-Company Route, and that you have done an Apply Config (or rebooted the whole server) after making changes.

If the above is all correct, set a properly formatted Outbound CID for the calling extension, retest and paste a new log.

I fixed it! All I did for inbound was I turned on voicemail for my 1001 extension. For outbound, I just got rid of the CID in my extension and turned off intra-company.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.