Removing Digit On Inbound Call Only To Tenant X

Hello All,

I need you support on applying dial plan to Tenant X (Tenant 200 for example)
That If inbound calls ringing DID’s on Tenant it will remove first digit and show callerid without it,
**For example : **
if inbound calls go to DID on tenant : number 05XXXXXXXX → number that will be shown on phone screen and set as the callerid is 5XXXXXXXX
The important is to remove the first digit + save the inbound callerid without the first digit → so I can send it as the callerid to post webhook I use for CRM Integration + it will only be active on tenant X (in this case tenant 200) and not other tenants!

this is what I did on extensions.conf
"
[globals]
AGISIGHUP=no

[default]
exten => _[+*0-9].,1,Agi(agi://127.0.0.1)
exten => t,1,Hangup()

[transfer]
include => parkedcalls
include => pbxware-transfer

[pbxware-transfer]
exten => _[+*0-9].,1,Agi(agi://127.0.0.1)
exten => t,1,Hangup()

//this is what I added
[t-200]
exten => _./_05XXXXXXXX,1,Set(CALLERID(num)=${CALLERID(numb):1}) //remove first digit from callerid on inbound calls
exten => _X.,2,Agi(agi://127.0.0.1)

I tried it and does not work
what am I missing?

please help
thx

#include trunks-in.conf

exten => _./_05XXXXXXXX,1,Set(CALLERID(num)=${CALLERID(numb):1})
//remove first digit from callerid on inbound calls

${CALLERID(numb):1} should be ${CALLERID(num):1}


Daniel

Thx Daniel - its a typing mistake

the question besides this, is there anything I missing?

Hello Can someone please help

thx

On Thursday 23 January 2025 at 10:59:01, OM-131 via Asterisk Community wrote:

Hello Can someone please help

Your original post simply said “I tried it and does not work”.

Please give more information about what does happen - for example, what do
you see in the Asterisk log file for the line where you try to manipulate CLI:

exten => _./_05XXXXXXXX,1,Set(CALLERID(num)=${CALLERID(num):1})

Also, your use of the word “tenant” makes me suspect that you are not using
raw Asterisk here, but some management layer on top, such as FreePBX.

If that is the case, you are probably better off asking your question on a
FreePBX forum such as https://community.freepbx.org/

Antony.


It may not seem obvious, but (6 x 5 + 5) x 5 - 55 equals 5!

FreePBX does not support multi-tenant systems. I think the OP is using raw Asterisk and simply not defining his terms clearly.

You have no priority 1 for caller IDs that do not match 05XXXXXXXX. (Hint: the best match is used when more than one match is possible for a given priority.)

The use of _. is bad practice, and also confusing, as you are not consistent between the two priorities.

1.Its asterisk bicom systems
2. david
"
You have no priority 1 for caller IDs that do not match 05XXXXXXXX. (Hint: the best match is used when more than one match is possible for a given priority.)

The use of _. is bad practice, and also confusing, as you are not consistent between the two priorities.
"
other dial plan to tenant stay as default → do I need to add dial plan to them too?

Like I said : all I need is for the tenant X is :slight_smile: if inbound calls go to DID on tenant : number 05XXXXXXXX → number that will be shown on phone screen and set as the callerid is 5XXXXXXXX
The important is to remove the first digit + save the inbound callerid without the first digit → so I can send it as the callerid to post webhook I use for CRM Integration + it will only be active on tenant X (in this case tenant 200) and not other tenants!

can you help which configure dial plan that need to be implement to tenant X

thx

On Thursday 23 January 2025 at 14:26:14, OM-131 via Asterisk Community wrote:

1.Its asterisk bicom systems

You cannot change the dialplan on Bicom systems. Almost the whole thing is an
obfuscated AGI script.

As it is a commercial application, you should ask Bicom support how to achieve
what you want to.

Antony.


I bought a book on memory techniques, but I’ve forgotten where I put it.

Your current dialplan removes the first digit from caller IDs beginning with 05 and having 8 more digits. Other caller ID formats, for the same context, will not find a priority 1, so if the context is specified in the endpoint definitions, for the customer, will result in the call failing with “extension … not found in context t-200” and, if SIP, probably a 404 status code.

I have no knowledge of Bicom systems, but if Pooh is correct, you should not be messing with the dialplan unless you have a deep knowledge of how their system works, and don’t mind losing support from them.