Inbound calls no longer working

I had an inbound line on the VOIP system set up as an IVR recorder, start a recording, playing a voicemail message and waiting for any keypress as a hangup and was working fine.

I had recently finished with this setup and wanted it to go back to regular ring groups, so I removed the inbound trunk for it, assuming that it would be caught by the Any DID / any CID incoming group. Instead, when I removed this it stopped working. I’ve since tried creating an inbound route for the DID and using the any DID, nothing I do gets inbound calls working.

Now when I call the line I get the following “the number that you dialed is invalid or incomplete, please check the number before dialing again” on loop. I can call out from the number, but returning the call results in this error.

SIP Registration shows as active
APSPBX*CLI> sip show registry
Host dnsmgr Username Refresh State Reg.Time
sip.provider.com.au:5060 N 0355555555 3585 Registered Tue, 09 Aug 2016 14:22:13
1 SIP registrations.

APSPBX*CLI> sip show users
Username Secret Accountcode Def.Context ACL Forcerport
104 XXXXXXXX7 from-internal Yes No
105 XXXXXXXX7 from-internal Yes No
106 XXXXXXXX7 from-internal Yes No
107 XXXXXXXX7 from-internal Yes No
101 XXXXXXXX7 from-internal Yes No
102 XXXXXXXX7 from-internal Yes No
103 XXXXXXXX7 from-internal Yes No
108 XXXXXXXX7 from-internal Yes No
109 XXXXXXXX7 from-internal Yes No
60 XXXXXXXX7 from-internal Yes No
0355555555 XXXXXXXX7 from-pstn No Yes

Registry shows in sip show objects

-= Registry objects: 1 =-

name: 0355555555:[email protected]/0355555555

If I set the core verbosity level to 9, I get nothing when I dial in, I get a full stack of info when I dial out but not a single line incoming.

I’ve run a packet capture on the firewall to see if theres any traffic moving when I try to dial in which might be getting blocked somewhere. Outgoing calls will push 100s of packets full of SIP SIP/SDF, RTP and RTCP packets on an outgoing call. Incoming are only a handful of SIP packets. This repeats every 10 seconds with nothing when I make an inbound call.

No.	Time	Source	Destination	Protcol	Length	Info

1	0.000000	192.168.1.5	Remote IP		 SIP	609	Request: OPTIONS sip:sip.provider.com.au 
2	0.068811	Remote IP		 192.168.1.5	SIP	536	Status: 200 OK | 

The trunk settings:

Trunk name : Trunk

Peer Details
username=0355555555
port=5060
type=peer
secret=XXXXXXXX7
insecure=invite,port
host=sip.provider.com.au
fromuser=0355555555
fromdomain=sip.provider.com.au
dtmfmode=rfc2833
canreinvite=yes
allow=ulaw&alaw&g729
qualify=yes
qualifyfreq=10

USER Contect : 0355555555
User Details
secret=XXXXXXXX7
context=from-pstn
type=user

Register String
name: 0355555555:[email protected]/0355555555

Asterisk SIP settings is set to allow anonymous inbound SIP calls, this is restricted to being calls only from the SIP provider as the firewall limits the communication on ports 5060-5062 to only be allowed from sip.provider.com.au

So I’ve hit a dead end and can’t figure out what troubleshooting steps I should perform next, weather it should go to the VOIP provider or if I had done something to shoot myself in the foot when I removed the call recording/IVR setup. Any help would be appreciated.

@Smithjoe1

Where does the Inbound Route send the call? What is the Destination of the catch all inbound route?

The catch all ring group goes to a ring group, 601, which dials all the phones in the office.
The inbound call for the DID I set to the trunk’s user is straight to my extension, 101.

It used to hit call recording, which then sent it to an IVR, which played a message and recorded the response, but I foolishly deleted that inbound route and it stopped working.

@Smithjoe1

First, DIDs are not associated to trunks. So you need an Inbound Route to match so they can be routed. If you set the DID to “ANY” then it will allow any DID being sent to the system to be routed based on that rule.

If you have an ANY catch all inbound route and have Anonymous Calls and SIP Guest Calls turned on you’ve basically made it so anyone can send calls into your PBX.

Thanks for the quick reply. I thought it was the DID which the inbound route is looking for? The register string creates a SIP peer and the remote server now knows where to send the calls, which when the number is dialed, the remote server sends some SIP packets to my PBX server with a DID number and then gets passed to the inbound routes to be sent where appropriate?

I know its not best practice to have a catch all with anonymous calls, I’ve put a restriction on the firewall to limit the SIP ports used, 5060-5062 to our voip providers IP address and haven’t had any malicious calls, intend to change this back once I’ve got the inbound route working for this trunk. But with accept all with anonymous enabled, shouldn’t the inbound route accept the call if the remote VOIP server sends a SIP INVITE packet? From my packet capture, I could see no SIP traffic coming to our server when I tried to dial the number? Would this be an issue on our VOIP providers end?