# Dialplan Assitance

**URL:** <https://community.freepbx.org/t/dialplan-assitance/93790>\
**Category:** General Help\
**Created:** [January 9, 2024, 8:18pm UTC](https://community.freepbx.org/t/dialplan-assitance/93790 "2024-01-09T20:18:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Bifur](https://community.freepbx.org/letter_avatar_proxy/v4/letter/b/eb8c5e/32.png) [@Bifur](https://community.freepbx.org/u/Bifur)\
**Post date:** [January 9, 2024, 8:18pm UTC](https://community.freepbx.org/t/dialplan-assitance/93790/1 "2024-01-09T20:18:44Z")

</div>

Hi everyone. I was wondering if someone could help me with a dial plan. The purpose of it is to force the emergency caller ID of an extension if the sip user comes in as: From: Anonymous sip:anonymous@localhost or Contact: Anonymous \<sip:300@10.1.10.110:5060;

Basically, we have quite a few Cisco ATAs out there and for some reason dialing \*67 is still a thing and people try to mask their number. However, \*67 on the Cisco changes it to anonymous permanently and is not a one time thing.

I don’t care if a regular call goes out anonymous but it is an issue when they need to dial 911 and it costs us $100 because the 911 call is not validated. This just happened at a restaurant on New Year’s Day.

The call was made, the PBX realized it was extension 300, it knew the proper emergency CID, and it looks like it called out with the proper CID according to the CDR. However our provider charged us and said the trunk id was: “Trunk ID for call: (none provided)” As I said, the initial invite is: │From: “Anonymous” sip:anonymous@xxx.xxx.26.110;

We disable \*67 on new installs but I figured there had to be a better way then visit 30 different places and physically log into the device.

I asked chatgpt and it said I could do something like this and adding it to extensions\_custom.conf:

```auto
[from-internal-custom]
exten => _911,1,Set(CALLERID(name)=${IF($["${SIPCALLID(name)}"="anonymous"]?${EMERGENCYCID(name)}:${CALLERID(name)})}
exten => _911,2,Set(CALLERID(number)=${IF($["${SIPCALLID(name)}"="anonymous"]?${EMERGENCYCID(number)}:${CALLERID(number)})}

exten => _933,1,Set(CALLERID(name)=${IF($["${SIPCALLID(name)}"="anonymous"]?${EMERGENCYCID(name)}:${CALLERID(name)})}
exten => _933,2,Set(CALLERID(number)=${IF($["${SIPCALLID(name)}"="anonymous"]?${EMERGENCYCID(number)}:${CALLERID(number)})}

```

This is an older FreePBX 12 and is still using chan\_sip. Whatever I do I do not see from-internal-custom being called. The box has 2 voice trunks and 2 911 trunks. The outbound route for 911 is marked as emergency and works as expected when \*67 is not enabled on the cisco ata.

Any advice would be wonderful. Thanks so much!

---

<div class="post-metadata">

**Author:** ![Bifur](https://community.freepbx.org/letter_avatar_proxy/v4/letter/b/eb8c5e/32.png) [@Bifur](https://community.freepbx.org/u/Bifur)\
**Post date:** [January 9, 2024, 8:27pm UTC](https://community.freepbx.org/t/dialplan-assitance/93790/2 "2024-01-09T20:27:49Z")

</div>

Another thing I should mention: When \*67 is enabled and I call 933 to test 911 it is reporting I am calling from 720-842-7359 and that is not a number near us or we own. Not sure where it is getting that from.

---

<div class="post-metadata">

**Author:** ![system](https://community.freepbx.org/uploads/default/original/3X/f/7/f7056d57e04fdbf71c6ad967e1ced351317f5c3f.png) [@system](https://community.freepbx.org/u/system)\
**Post date:** [February 9, 2024, 8:28pm UTC](https://community.freepbx.org/t/dialplan-assitance/93790/3 "2024-02-09T20:28:39Z")

</div>

Closed on February 9, 2024, 8:28pm UTC

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