Analog gateway works but no SIP trunks work

All of a sudden neither of my sip trunks work but my gateway trunk does.
I haven’t changed anything and I have been using Freepbx for over a year without issue.
The SIP trunks still work for outbound calls.
The appropriate logs is below

[2017-07-23 19:20:54] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:1] Set("PJSIP/ComputerKarma-0000000f", "__FROM_DID=2501111111") in new stack
[2017-07-23 19:20:54] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:2] NoOp("PJSIP/ComputerKarma-0000000f", "Received an unknown call with DID set to 2501111111") in new stack
[2017-07-23 19:20:54] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:3] Goto("PJSIP/ComputerKarma-0000000f", "s,a2") in new stack
[2017-07-23 19:20:54] VERBOSE[7895][C-00000006] pbx_builtins.c: Goto (from-pstn,s,2)
[2017-07-23 19:20:54] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:2] Answer("PJSIP/ComputerKarma-0000000f", "") in new stack
[2017-07-23 19:20:54] WARNING[7895][C-00000006] chan_sip.c: This function can only be used on SIP channels.
[2017-07-23 19:20:54] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:3] Log("PJSIP/ComputerKarma-0000000f", "WARNING,Friendly Scanner from ") in new stack
[2017-07-23 19:20:54] WARNING[7895][C-00000006] Ext. s: Friendly Scanner from
[2017-07-23 19:20:54] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:4] Wait("PJSIP/ComputerKarma-0000000f", "2") in new stack
[2017-07-23 19:20:56] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:5] Playback("PJSIP/ComputerKarma-0000000f", "ss-noservice") in new stack
[2017-07-23 19:20:56] VERBOSE[7895][C-00000006] file.c: <PJSIP/ComputerKarma-0000000f> Playing 'ss-noservice.ulaw' (language 'en')
[2017-07-23 19:20:58] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:1] Macro("PJSIP/ComputerKarma-0000000f", "hangupcall,") in new stack
[2017-07-23 19:20:58] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:1] GotoIf("PJSIP/ComputerKarma-0000000f", "1?theend") in new stack
[2017-07-23 19:20:58] VERBOSE[7895][C-00000006] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2017-07-23 19:20:58] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:3] ExecIf("PJSIP/ComputerKarma-0000000f", "0?Set(CDR(recordingfile)=)") in new stack
[2017-07-23 19:20:58] VERBOSE[7895][C-00000006] pbx.c: Executing [[email protected]:4] Hangup("PJSIP/ComputerKarma-0000000f", "") in new stack
[2017-07-23 19:20:58] VERBOSE[7895][C-00000006] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on 'PJSIP/ComputerKarma-0000000f' in macro 'hangupcall'
[2017-07-23 19:20:58] VERBOSE[7895][C-00000006] pbx.c: Spawn extension (from-pstn, h, 1) exited non-zero on 'PJSIP/ComputerKarma-0000000f'

Do you have an inbound route set for 2501111111?
Probably not a problem, but why are you using “from-pstn” for your incoming SIP calls?

Those are the only two things I see.

Yes, the inbound route goes to a ring group.
I just changed the context to "from-trunk"and still have the same issue.

One line I omitted is where it sets the SIP domain upon receiving the call
[2017-07-24 08:39:45] VERBOSE[12218] pbx_variables.c: Setting global variable ‘SIPDOMAIN’ to ‘184.66.85.146’

where it sets the sip domain to my local ISP

Cheers

Here’s why I asked…

I edited my DID number in the post to hide my real phone number.

Cheers

Did you add the error message telling you that the system was going to reject your call too?

Just tried it again same messages (except i Changed the context setting now to from-trunk)
Every time I call the system plays the not in service message.
The last couple of lines in the message are from my FXO gateway.

[2017-07-24 09:24:31] VERBOSE[2054] pbx_variables.c: Setting global variable ‘SIPDOMAIN’ to ‘184.66.85.146’
[2017-07-24 09:24:31] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:1] Set(“PJSIP/ComputerKarma-00000000”, “__FROM_DID=2505851111”) in new stack
[2017-07-24 09:24:31] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:2] NoOp(“PJSIP/ComputerKarma-00000000”, “Received an unknown call with DID set to 2505851111”) in new stack
[2017-07-24 09:24:31] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:3] Goto(“PJSIP/ComputerKarma-00000000”, “s,a2”) in new stack
[2017-07-24 09:24:31] VERBOSE[2987][C-00000000] pbx_builtins.c: Goto (from-trunk,s,2)
[2017-07-24 09:24:31] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:2] Answer(“PJSIP/ComputerKarma-00000000”, “”) in new stack
[2017-07-24 09:24:31] WARNING[2987][C-00000000] chan_sip.c: This function can only be used on SIP channels.
[2017-07-24 09:24:31] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:3] Log(“PJSIP/ComputerKarma-00000000”, "WARNING,Friendly Scanner from ") in new stack
[2017-07-24 09:24:31] WARNING[2987][C-00000000] Ext. s: Friendly Scanner from
[2017-07-24 09:24:31] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:4] Wait(“PJSIP/ComputerKarma-00000000”, “2”) in new stack
[2017-07-24 09:24:33] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:5] Playback(“PJSIP/ComputerKarma-00000000”, “ss-noservice”) in new stack
[2017-07-24 09:24:33] VERBOSE[2987][C-00000000] file.c: <PJSIP/ComputerKarma-00000000> Playing ‘ss-noservice.ulaw’ (language ‘en’)
[2017-07-24 09:24:37] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:1] Macro(“PJSIP/ComputerKarma-00000000”, “hangupcall,”) in new stack
[2017-07-24 09:24:37] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:1] GotoIf(“PJSIP/ComputerKarma-00000000”, “1?theend”) in new stack
[2017-07-24 09:24:37] VERBOSE[2987][C-00000000] pbx_builtins.c: Goto (macro-hangupcall,s,3)
[2017-07-24 09:24:37] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:3] ExecIf(“PJSIP/ComputerKarma-00000000”, “0?Set(CDR(recordingfile)=)”) in new stack
[2017-07-24 09:24:37] VERBOSE[2987][C-00000000] pbx.c: Executing [[email protected]:4] Hangup(“PJSIP/ComputerKarma-00000000”, “”) in new stack
[2017-07-24 09:24:37] VERBOSE[2987][C-00000000] app_macro.c: Spawn extension (macro-hangupcall, s, 4) exited non-zero on ‘PJSIP/ComputerKarma-00000000’ in macro ‘hangupcall’
[2017-07-24 09:24:37] VERBOSE[2987][C-00000000] pbx.c: Spawn extension (from-trunk, h, 1) exited non-zero on ‘PJSIP/ComputerKarma-00000000’
[2017-07-24 09:24:42] VERBOSE[2116] res_pjsip/pjsip_configuration.c: Contact 999/sip:[email protected]:5060 is now Reachable. RTT: 2.519 msec
[2017-07-24 09:24:42] VERBOSE[2116] res_pjsip/pjsip_configuration.c: Endpoint 999 is now Reachable

OK, got it. My inbound route used to have 12505851111 and worked fine, but for some reason I now I had to change my inbound route to 2505851111.
Maybe a change in the way my provider sends the DID???
Cheers

That would be my guess.