Cant call another tenants DID

So, I have 2 tenants. Tenant A have a DID of 01234111111 and Tenant B has a DID of 01234222222. BOth inbound and outbound calls are fine.
But if either DID calls each other, I get “Invalid Route Dialed in COS”

    -- Executing [01234111111@T3_cos-all:1] NoOp("PJSIP/dit201-0000002d", "More than on digit pattern") in new stack
    -- Executing [01234111111@T3_cos-all:2] Gosub("PJSIP/dit201-0000002d", "s,1(01234111111)") in new stack
    -- Executing [s@T3_cos-all:1] Set("PJSIP/dit201-0000002d", "EXTENSION=01234111111") in new stack
    -- Executing [s@T3_cos-all:2] NoOp("PJSIP/dit201-0000002d", "Dialing 01234111111 from 201") in new stack
    -- Executing [s@T3_cos-all:3] Gosub("PJSIP/dit201-0000002d", "sub-set-global-vars,s,1(ba29ca7df835452f,01234111111,parking-3)") in new stack
    -- Executing [s@sub-set-global-vars:1] NoOp("PJSIP/dit201-0000002d", "Setting Global Vars") in new stack
    -- Executing [s@sub-set-global-vars:2] Set("PJSIP/dit201-0000002d", "TENANT_PATH=ba29ca7df835452f") in new stack
    -- Executing [s@sub-set-global-vars:3] Set("PJSIP/dit201-0000002d", "PREFIX=T3_") in new stack
    -- Executing [s@sub-set-global-vars:4] Set("PJSIP/dit201-0000002d", "__PICKUPMARK=T3_01234111111") in new stack
    -- Executing [s@sub-set-global-vars:5] Set("PJSIP/dit201-0000002d", "__PARKINGLOT=parking-3") in new stack
    -- Executing [s@sub-set-global-vars:6] Set("PJSIP/dit201-0000002d", "__DYNAMIC_FEATURES=custom-features") in new stack
    -- Executing [s@sub-set-global-vars:7] Set("PJSIP/dit201-0000002d", "ICALL=no") in new stack
    -- Executing [s@sub-set-global-vars:8] Return("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@T3_cos-all:4] Gosub("PJSIP/dit201-0000002d", "sub-set-call-vars,s,1(ba29ca7df835452f,01234111111,3,T3_cos-all,T3_ARS-all)") in new stack
    -- Executing [s@sub-set-call-vars:1] NoOp("PJSIP/dit201-0000002d", "Setting Call Vars") in new stack
    -- Executing [s@sub-set-call-vars:2] Set("PJSIP/dit201-0000002d", "_TENANT=ba29ca7df835452f") in new stack
    -- Executing [s@sub-set-call-vars:3] Set("PJSIP/dit201-0000002d", "_CALL_DESTINATION=01234111111") in new stack
    -- Executing [s@sub-set-call-vars:4] Set("PJSIP/dit201-0000002d", "_COS_ID=3") in new stack
    -- Executing [s@sub-set-call-vars:5] Set("PJSIP/dit201-0000002d", "_COS_NAME=T3_cos-all") in new stack
    -- Executing [s@sub-set-call-vars:6] Set("PJSIP/dit201-0000002d", "__TRANSFER_CONTEXT=T3_cos-all") in new stack
    -- Executing [s@sub-set-call-vars:7] Set("PJSIP/dit201-0000002d", "_ARS=T3_ARS-all") in new stack
    -- Executing [s@sub-set-call-vars:8] Set("PJSIP/dit201-0000002d", "CDR(tenant)=direct_it") in new stack
    -- Executing [s@sub-set-call-vars:9] Set("PJSIP/dit201-0000002d", "CDR(destination)=01234111111") in new stack
    -- Executing [s@sub-set-call-vars:10] Set("PJSIP/dit201-0000002d", "CDR(trunk)=") in new stack
    -- Executing [s@sub-set-call-vars:11] Set("PJSIP/dit201-0000002d", "CDR(did)=") in new stack
    -- Executing [s@sub-set-call-vars:12] Set("PJSIP/dit201-0000002d", "__CALLID=1736435914.63") in new stack
    -- Executing [s@sub-set-call-vars:13] NoOp("PJSIP/dit201-0000002d", "Channel Type: PJSIP") in new stack
    -- Executing [s@sub-set-call-vars:14] ExecIf("PJSIP/dit201-0000002d", "1?Set(__PJSIP_CALLID=0_1256883664@172.16.0.37)") in new stack
    -- Executing [s@sub-set-call-vars:15] ExecIf("PJSIP/dit201-0000002d", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@sub-set-call-vars:16] ExecIf("PJSIP/dit201-0000002d", "0?Set(CHANNEL(language)=)") in new stack
    -- Executing [s@sub-set-call-vars:17] Return("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@T3_cos-all:5] Gosub("PJSIP/dit201-0000002d", "sub-construct-cid,s,1") in new stack
    -- Executing [s@sub-construct-cid:1] NoOp("PJSIP/dit201-0000002d", "Building CID") in new stack
    -- Executing [s@sub-construct-cid:2] Set("PJSIP/dit201-0000002d", "ORIGINAL_CID_NAME=Doug Hall") in new stack
    -- Executing [s@sub-construct-cid:3] Set("PJSIP/dit201-0000002d", "ORIGINAL_CID_NUMBER=201") in new stack
    -- Executing [s@sub-construct-cid:4] Set("PJSIP/dit201-0000002d", "_CALL_SOURCE=201") in new stack
    -- Executing [s@sub-construct-cid:5] Set("PJSIP/dit201-0000002d", "_CS=201") in new stack
    -- Executing [s@sub-construct-cid:6] GotoIf("PJSIP/dit201-0000002d", "0?return") in new stack
    -- Executing [s@sub-construct-cid:7] Gosub("PJSIP/dit201-0000002d", "sub-get-device-tree,s,1") in new stack
    -- Executing [s@sub-get-device-tree:1] NoOp("PJSIP/dit201-0000002d", "Configuring Device Tree") in new stack
    -- Executing [s@sub-get-device-tree:2] Set("PJSIP/dit201-0000002d", "DEV_TECHNOLOGY=PJSIP") in new stack
    -- Executing [s@sub-get-device-tree:3] GosubIf("PJSIP/dit201-0000002d", "0?s-local,1") in new stack
    -- Executing [s@sub-get-device-tree:4] GotoIf("PJSIP/dit201-0000002d", "0?return") in new stack
    -- Executing [s@sub-get-device-tree:5] GotoIf("PJSIP/dit201-0000002d", "1?pjsip") in new stack
    -- Goto (sub-get-device-tree,s,9)
    -- Executing [s@sub-get-device-tree:9] NoOp("PJSIP/dit201-0000002d", "A PJSIP") in new stack
    -- Executing [s@sub-get-device-tree:10] Set("PJSIP/dit201-0000002d", "DEV_USER=dit201") in new stack
    -- Executing [s@sub-get-device-tree:11] Goto("PJSIP/dit201-0000002d", "build_interface") in new stack
    -- Goto (sub-get-device-tree,s,13)
    -- Executing [s@sub-get-device-tree:13] Set("PJSIP/dit201-0000002d", "_INTERFACE=PJSIP/dit201") in new stack
    -- Executing [s@sub-get-device-tree:14] Set("PJSIP/dit201-0000002d", "DEV_TREE=devices/PJSIP/dit201") in new stack
    -- Executing [s@sub-get-device-tree:15] Return("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@sub-construct-cid:8] GotoIf("PJSIP/dit201-0000002d", "0?return") in new stack
    -- Executing [s@sub-construct-cid:9] Set("PJSIP/dit201-0000002d", "_CALL_SOURCE=201") in new stack
    -- Executing [s@sub-construct-cid:10] Set("PJSIP/dit201-0000002d", "_CS=201") in new stack
    -- Executing [s@sub-construct-cid:11] Set("PJSIP/dit201-0000002d", "DYNAMIC_EXTERNAL_CID=no") in new stack
    -- Executing [s@sub-construct-cid:12] GotoIf("PJSIP/dit201-0000002d", "0?cid_constructed") in new stack
    -- Executing [s@sub-construct-cid:13] Set("PJSIP/dit201-0000002d", "EXTENSION_INTERNAL_CID="Doug Hall" <201>") in new stack
    -- Executing [s@sub-construct-cid:14] ExecIf("PJSIP/dit201-0000002d", "1?Set(CALLERID(all)="Doug Hall" <201>)") in new stack
    -- Executing [s@sub-construct-cid:15] Set("PJSIP/dit201-0000002d", "_CID_CONSTRUCTED=yes") in new stack
    -- Executing [s@sub-construct-cid:16] NoOp("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@sub-construct-cid:17] Set("PJSIP/dit201-0000002d", "CDR(source)=201") in new stack
    -- Executing [s@sub-construct-cid:18] Return("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@T3_cos-all:6] Gosub("PJSIP/dit201-0000002d", "T3_set-global-tenant-vars,s,1") in new stack
    -- Executing [s@T3_set-global-tenant-vars:1] NoOp("PJSIP/dit201-0000002d", "Setting Global Vars for direct_it Tenant") in new stack
    -- Executing [s@T3_set-global-tenant-vars:2] Set("PJSIP/dit201-0000002d", "__TENANT_PATH=ba29ca7df835452f") in new stack
    -- Executing [s@T3_set-global-tenant-vars:3] Set("PJSIP/dit201-0000002d", "__TENANT_PREFIX=T3_") in new stack
    -- Executing [s@T3_set-global-tenant-vars:4] Set("PJSIP/dit201-0000002d", "__QUEUE_AGENTS_CONTEXT=T3_queue-call-to-agents") in new stack
    -- Executing [s@T3_set-global-tenant-vars:5] Set("PJSIP/dit201-0000002d", "__FOLLOWME_CONTEXT=T3_ext-followme") in new stack
    -- Executing [s@T3_set-global-tenant-vars:6] Set("PJSIP/dit201-0000002d", "__HINTS_CONTEXT=T3_extension-hints") in new stack
    -- Executing [s@T3_set-global-tenant-vars:7] Set("PJSIP/dit201-0000002d", "__DEFAULT_COS=T3_cos-all") in new stack
    -- Executing [s@T3_set-global-tenant-vars:8] Return("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@T3_cos-all:7] GotoIf("PJSIP/dit201-0000002d", "0?local-dialing") in new stack
    -- Executing [s@T3_cos-all:8] NoOp("PJSIP/dit201-0000002d", "Check if is an Emergency Call") in new stack
    -- Executing [s@T3_cos-all:9] GotoIf("PJSIP/dit201-0000002d", "0?T3_emergency-calls,01234111111,1") in new stack
    -- Executing [s@T3_cos-all:10] Gosub("PJSIP/dit201-0000002d", "sub-lockphone-check,s,1") in new stack
    -- Executing [s@sub-lockphone-check:1] NoOp("PJSIP/dit201-0000002d", "SUB: LOCK PHONE CHECK") in new stack
    -- Executing [s@sub-lockphone-check:2] GotoIf("PJSIP/dit201-0000002d", "0?unlock") in new stack
    -- Executing [s@sub-lockphone-check:3] GotoIf("PJSIP/dit201-0000002d", "0?unlock") in new stack
    -- Executing [s@sub-lockphone-check:4] GotoIf("PJSIP/dit201-0000002d", "0?unlock") in new stack
    -- Executing [s@sub-lockphone-check:5] GotoIf("PJSIP/dit201-0000002d", "0?unlock") in new stack
    -- Executing [s@sub-lockphone-check:6] GotoIf("PJSIP/dit201-0000002d", "0?:unlock") in new stack
    -- Goto (sub-lockphone-check,s,12)
    -- Executing [s@sub-lockphone-check:12] Return("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@T3_cos-all:11] Gosub("PJSIP/dit201-0000002d", "sub-local-dialing,s,1") in new stack
    -- Executing [s@sub-local-dialing:1] NoOp("PJSIP/dit201-0000002d", "Trying to determine if is a local extension") in new stack
    -- Executing [s@sub-local-dialing:2] GotoIf("PJSIP/dit201-0000002d", "0?:return") in new stack
    -- Goto (sub-local-dialing,s,5)
    -- Executing [s@sub-local-dialing:5] Return("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@T3_cos-all:12] GotoIf("PJSIP/dit201-0000002d", "0?end-call") in new stack
    -- Executing [s@T3_cos-all:13] Set("PJSIP/dit201-0000002d", "OUTBOUND_PROFILE=") in new stack
    -- Executing [s@T3_cos-all:14] GotoIf("PJSIP/dit201-0000002d", "1?post-dialing") in new stack
    -- Goto (T3_cos-all,s,16)
    -- Executing [s@T3_cos-all:16] Goto("PJSIP/dit201-0000002d", "T3_cos-all-post,01234111111,1") in new stack
    -- Goto (T3_cos-all-post,01234111111,1)
    -- Executing [01234111111@T3_cos-all-post:1] NoOp("PJSIP/dit201-0000002d", "No valid number found") in new stack
    -- Executing [01234111111@T3_cos-all-post:2] ExecIf("PJSIP/dit201-0000002d", "0?Hangup()") in new stack
    -- Executing [01234111111@T3_cos-all-post:3] ForkCDR("PJSIP/dit201-0000002d", "e") in new stack
    -- Executing [01234111111@T3_cos-all-post:4] Goto("PJSIP/dit201-0000002d", "invalid-dest-cos,s,1") in new stack
    -- Goto (invalid-dest-cos,s,1)
    -- Executing [s@invalid-dest-cos:1] NoOp("PJSIP/dit201-0000002d", "Invalid Route Dialed in COS") in new stack
    -- Executing [s@invalid-dest-cos:2] GotoIf("PJSIP/dit201-0000002d", "0?end") in new stack
    -- Executing [s@invalid-dest-cos:3] GotoIf("PJSIP/dit201-0000002d", "0?end") in new stack
    -- Executing [s@invalid-dest-cos:4] Progress("PJSIP/dit201-0000002d", "") in new stack
    -- Executing [s@invalid-dest-cos:5] Playback("PJSIP/dit201-0000002d", "silence/1&cannot-complete-as-dialed&check-number-dial-again,noanswer") in new stack

Looks like you have your dialing restrictions/rules in COS and there is no pattern that allows this to reach the main tenant.

The COS is default. How do I config this to allow internal DID calling? TIA for your help…

I’ve temporarily worked around this by creating an Outbound Route to the Tenant Trunk of the dialled party. This is ok for now as I have only just installed 2 tenants. I guess a properly configured COS would be preferred for 10+ tenants.

Under Sttings → System General → Route Calls to Tenant DIDs Internally. Is that enabled?

Facepalm GIFs on GIPHY - Be AnimatedIt is now! Thanks!