Share one trunk with multiple tenants

Hi, is it possible to share the same trunk with multiple tenants in wazo? If yes, how to configure this from UI?

Hello, no it’s not possible with the UI. It’s not developed to do that.

Thanks for the reply @quintana.

Is it possible to day via the API?

Although yesterday while experimenting, I found a workaround for this via UI by creating 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.

But there is an issue with above approach as I can only create one custom endpoint like PJSIP/trunkname, when I am trying to create another it is giving me an error that custom endpoint already exists.

Answer here Why is there a limitation that only unique Interface is allowed while creating custom trunks - #2 by quintana