Prepend caller ID for known callers

Hello. I’d like to prepend caller IDs with either Cust or New depending on whether they have an entry in the database.

For example, a known customer calls from number 0123456789. A CID lookup is made, it sees that the number is in the database and the extensions ring displaying Cust:0123456789.

The alternative would be a non-customer calling from 0987654321. A CID lookup is made but the number is not present in the database, so the extensions ring displaying New:0987654321.

Right now we are only using the internal phonebook, but if an SQL or HTTP lookup is required for this to function properly I will set that up instead.

Thanks a lot

It can be done but only with custom dialplan or by editing the cid lookup function that freepbx uses.

In order to do this in a way that survives updates, you will need to put your custom context (if you decide to edit the existing one) into the extensionoverrideconf: file. Note that this is NOT recommended - it is almost always better to set up your own custom extension and use it instead of modifying the “system level” routine.