Incoming call that routes to a Cisco CME via SIP trunk looping, CME uses extension not DID

After upgrading from an old FreePBX distro using chan_sip, our SIP trunk to a Cisco CME router started looping incoming calls from PSTN and not connecting them to the CME extensions.

Our PSTN trunks come into FreePBX and certain DID’s are routed to the CME Trunk:
[2021-02-19 21:23:03] VERBOSE[21095][C-00000afc] app_dial.c: Called PJSIP/[email protected]
Right after the above call goes out the trunk I see this INVITE come in from CME:
[2021-02-19 21:23:03] VERBOSE[22703] pbx_variables.c: Setting global variable ‘SIPDOMAIN’ to ‘’ (CME Router IP)
[2021-02-19 21:23:03] VERBOSE[21117][C-00000afd] pbx.c: Executing [[email protected]:1] Macro(“PJSIP/TRUNK-CME-00000a36”, “user-callerid,LIMIT”) in new stack
2069 is the 4 digit extension behind CME that the DID translates to on CME (voice-translation profile on incoming match)

For internal 4 digit dialing, there is an outbound route on FreePBX with dialplan matching the 4 digit extensions at the CME site so FreePBX routes the 2069 call back to the TRUNK-CME and CME send an INVITE from 2069 until we get a system monitoring notice (SNMP/LibreNMS) that shows a spike in loopback interface traffic and we restart asterisk.

TRUNK-CME is in the from-internal context, no authentication or non-default options. Same settings seemed to function properly on the old FreePBX w/ chan_sip. I’m looking for suggestions on a better design for my setup if possible.

tcpdump pcap of a looping call with anonymized info is here: https :// (new users can’t put links in so remove spaces)

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