Asterisk cmd CallingPres


Change the presentation for the callerid

This Application has been removed, and is no longer present.



Changes the presentation for the callerid. Should be called before placing an outgoing call.

The value itself is a means of giving information about the caller's telephone number. (Note that libpri incorrectly processes this as one value, where in actual fact it is two different values, stored within the same byte.)

The values itself is defined as follows in ITU Q931 (note that the bits are being numbered from 1, not 0):

You will need to have "usecallingpres=yes" in the zapata.conf file for this to be passed out onto your PRI.

Presentation indicator (octet 3a)

7 6 Meaning
0 0 Presentation allowed
0 1 Presentation restricted
1 0 Number not available due to interworking
1 1 Reserved

Screening indicator (octet 3a)

2 1 Meaning
0 0 User-provided, not screened
0 1 User-provided, verified and passed
1 0 User-provided, verified and failed
1 1 Network provided

In essence, it says, 'Is the person who has been called allowed to see the callers number?' and 'What authority was used to verify that this is a genuine number?'


Number is a octet, and the only bits you need worry about are bits 1,2,6 and 7
Bits 1 and 2 define the screening indicator, and bits 6 and 7 define the Presentation indicator. The placement of the Bits and Meaning Header messed me up a little bit, as did the '(octet 3a)' as I was wondering what importance the 3a had.

Examples for some general settings:

Bit template: 0PP000SS; where bit positions are 87654321; note that the PP bits are in the 7 and 6 positions and that the SS bits are in the 2 and 1 positions; build the desired binary number then convert to decimal

Presentation Allowed, Network Provided: decimal 3 is binary 00000011
Presentation Restricted, User-provided, not screened: decimal 32 is binary 00100000
Presentation Restricted, User-provided, verified, and passed: decimal 33 is binary 00100001
Presentation Restricted, Network Provided: decimal 35 is binary 00100011

Note: There is a newer version of the function called SetCallerPres() that it is probably better to use, since it accepts textual descriptions instead of numeric values. The result is identical, however.

See Also

Asterisk | Applications | Functions | Variables | Expressions | Asterisk FAQ

Created by: oej, Last modification: Sun 10 of Aug, 2008 (15:28 UTC) by JustRumours
Please update this page with new information, just login and click on the "Edit" or "Discussion" tab. Get a free login here: Register Thanks! - Find us on Google+