Set CallerID

Adds the ability to change the CallerID within a call flow.

Set CallerID allows you to change the caller id of the call and then continue on to the desired destination. For example, you may want to change the caller id from "John Doe" to "Sales: John Doe". Please note, the text you enter is what the callerid is changed to. To append to the current callerid, use the proper asterisk variables, such as "${CALLERID(name)}" for the currently set callerid name and "${CALLERID(num)}" for the currently set callerid number.

The latest release can be found at:
http://www.freepbx.org/trac/browser/contributed_modules/release


Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Force International CID

Kinslayer's picture

My DID provider (DIDWW) provides caller id info like this:

  • 0LLNNNNNNN - call from a local number
  • 00CCLLNNNNNNN - call from abroad

where CC is a country code prefix and LL is a local city prefix.
Ideally I want all CIDs to be in international format, CCLLNNNNNNN.

This is very helpful especially when accepting calls in one country and connecting it to a number in another country (so you don't see a "local number" which is actually a local number in some other country that isn't clear).

Here's the rule I made to do that (for country code 972):

${IF( $[ ${CALLERID(num):0:2} : "00" ] ? "${CALLERID(num):2}" : ${IF( $[ ${CALLERID(num):0:1} : "0"] ? "972${CALLERID(num):1}" : "${CALLERID(num)}" )})}

It basically says:

  1. If the number starts with 00, strip those digits off.
  2. If the number starts with 0, strip that zero off and prefix the country code.
  3. As a future proof failsafe, leave any other number as is (already in intl fmt)

If you use this rule, make sure to change the 972 in the last part to the country code of the DID accepting the calls.

Good luck :)

Hello there!

sm3yfx's picture

I have some problems i whan to do almost the other way.

if i have 00xxxxx let it be if i have 0 let it be but if 46xx change to 0 and all other not have 0 in the begining change this to 00

the result i interested of is

4685001001 changed to 085001001
3587210054 changed to 003587210054

Regards Lars-Gunnar