Custom SIP Headers in tenant trunk

it will be a good feature to be able to set account code on each tenant trunk separately

{ X-Tenant header } on the outbound trunks

When I’m using an external billing system

It doesn’t work when you set this on the parent Trunk?

Yes but I will have to create a parent truck for each tenant

now I’m I have one parent trunk and each tenant is using the same parent trunk

just a different tenant trunk

Exactly, you use only one parent Trunk and you add the X-Tenant header there and use a variable as the value.

If I’m doing like this I’m getting a random account code set by VitalPBX

I would like to set my own account codes as I used to do on my old server

I like to keep my billing system neat with the account codes I create

is there a way I can create my own account code or change them

Capture 4
Capture 3

This is the tenant ID, which is usually not changed.

2 things you can try.

  1. Set an account code on each extension. But that will likely not work with call forwarding/follow me. You will have to test it.
  2. Set in the asterisk database a custom accountcode field under each tenant and then set the header value to something like: ${DB(${TENANT_PATH}/myaccountcode)}