# Why is there a limitation that only unique Interface is allowed while creating custom trunks

**URL:** <https://wazo-platform.discourse.group/t/why-is-there-a-limitation-that-only-unique-interface-is-allowed-while-creating-custom-trunks/1302>\
**Category:** Installation/Configuration\
**Created:** [July 25, 2023, 6:00pm UTC](https://wazo-platform.discourse.group/t/why-is-there-a-limitation-that-only-unique-interface-is-allowed-while-creating-custom-trunks/1302 "2023-07-25T18:00:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![vageesh](https://avatars.discourse-cdn.com/v4/letter/v/bbce88/32.png) [@vageesh](https://wazo-platform.discourse.group/u/vageesh)\
**Post date:** [July 25, 2023, 6:00pm UTC](https://wazo-platform.discourse.group/t/why-is-there-a-limitation-that-only-unique-interface-is-allowed-while-creating-custom-trunks/1302/1 "2023-07-25T18:00:53Z")

</div>

I want to use same trunk on multiple tenants.

I found a workaround for this:

For outbound create a PJSIP trunk on the master account and then creating a Custom trunk on the Tenants account and in the interface specify the full PJSIP string like PJSIP/trunkname, this works for outgoing calls.

For Inbound calls we create an entry in the incalls with Custom action and give action as Goto(\<tenant’s incoming context\>, CALLERID(dnid), 1). This routes the call to the particular tenant’s incall context where we can handle it further.

Inbound is ok, but for outbound there is a constraint in the API and DB that it allows only unique interface values in custom trunks. So if I create a custom trunk with interface = PJSIP/trunkname in one tenant, I am not allowed to use the same interface value for creating a custom trunk on another tenant.

Please let me know in case there is a work around for this. I have tried removing the constraint from the DB in usercustom table and inserting values straight to DB works fine. But not sure if this will break something elsewhere.

---

<div class="post-metadata">

**Author:** ![quintana](https://yyz2.discourse-cdn.com/free1/user_avatar/wazo-platform.discourse.group/quintana/32/916_2.png) [@quintana](https://wazo-platform.discourse.group/u/quintana)\
**Post date:** [August 14, 2023, 2:56pm UTC](https://wazo-platform.discourse.group/t/why-is-there-a-limitation-that-only-unique-interface-is-allowed-while-creating-custom-trunks/1302/2 "2023-08-14T14:56:10Z")

</div>

Hello, the reason is we develop a multi-tenant solution, so by design multi-tenant is not for sharing same configuration/information for a tenant. The best to do what you want is to use a kamailio in front of Wazo and adding header for your different customers to route them on the good internal sip trunk.
