# Match endpoint by arbitrary value?

**URL:** <https://community.asterisk.org/t/match-endpoint-by-arbitrary-value/111446>\
**Category:** Asterisk SIP\
**Created:** [December 31, 2025, 4:42am UTC](https://community.asterisk.org/t/match-endpoint-by-arbitrary-value/111446 "2025-12-31T04:42:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreKR](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/andrekr/32/9783_2.png) [@AndreKR](https://community.asterisk.org/u/AndreKR)\
**Post date:** [December 31, 2025, 4:42am UTC](https://community.asterisk.org/t/match-endpoint-by-arbitrary-value/111446/1 "2025-12-31T04:42:19Z")

</div>

This is a bit of a first world problem but I wanted to clean up my pjsip.conf a bit and it bugs me that the sections have to be named by whatever the phone sends.

For example, this works:

```ini
[74123]
type=endpoint
auth=smith-auth
aors=74123
context=from-smith

[smith-auth]
username=74123
password=penfish

```

But I would prefer to call the endpoint and aor sections `[smith]` instead of `[74123]`, something like:

```ini
[smith]
type=endpoint
identifier=74123 ; I made this up
auth=smith-auth
aors=smith-aor
context=from-smith

[smith-auth]
username=74123
password=penfish

```

Is that possible?

---

<div class="post-metadata">

**Author:** ![TedM](https://avatars.discourse-cdn.com/v4/letter/t/8e8cbc/32.png) [@TedM](https://community.asterisk.org/u/TedM)\
**Post date:** [January 1, 2026, 12:12pm UTC](https://community.asterisk.org/t/match-endpoint-by-arbitrary-value/111446/2 "2026-01-01T12:12:35Z")

</div>

Yes, it’s just code. Do the following:

[Code Contribution - Asterisk Documentation](https://docs.asterisk.org/Development/Policies-and-Procedures/Code-Contribution/?h=contri)

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [January 1, 2026, 3:39pm UTC](https://community.asterisk.org/t/match-endpoint-by-arbitrary-value/111446/3 "2026-01-01T15:39:41Z")

</div>

> [@AndreKR](#):
>
> But I would prefer to call the endpoint and aor sections `[smith]` instead of `[74123]`, something like:

There are various endpoint identifier options, but nothing that allows you to do this specifically for endpoints, and there is no such thing for AORs at all (and the name of an AOR has meaning within SIP). If you modified the code then you could probably do it, but it would come at a cost. The names of these act as essentially primary keys across things to provide fast lookups.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/asterisk/original/2X/4/475d0c889911cfb84ac4881ad6df8b523e3f9105.png) [@system](https://community.asterisk.org/u/system)\
**Post date:** [January 31, 2026, 3:39pm UTC](https://community.asterisk.org/t/match-endpoint-by-arbitrary-value/111446/4 "2026-01-31T15:39:46Z")

</div>

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