Asterisk cmd SetCallerPres

SetCallerPres


Set CallerID Presentation

This application performs the identical operation to CallingPres(), but accepts descriptive text names instead of numeric values.

SetCallerPres(presentation):

Set Caller*ID presentation on a call to a new value.
Always returns 0. Valid presentations are:

allowed_not_screened : Presentation Allowed, Not Screened
allowed_passed_screen : Presentation Allowed, Passed Screen
allowed_failed_screen : Presentation Allowed, Failed Screen
allowed : Presentation Allowed, Network Number
prohib_not_screened : Presentation Prohibited, Not Screened
prohib_passed_screen : Presentation Prohibited, Passed Screen
prohib_failed_screen : Presentation Prohibited, Failed Screen
prohib : Presentation Prohibited, Network Number
unavailable : Number Unavailable

CLIR

This example shows how to dial out with CLIR (Calling Line Identification Restriction)

; for zap channels I needed to put "usecallingpres=yes" in the zapata.conf to get
; the SetCallerPres(prohib) work (tested on Asterisk 1.0.7 +bristuff +zaphfc)
exten 2000,1,SetCallerPres(prohib)
exten 2000,2,Dial(Zap/4/0401234567)


User example: Incoming calls


For me in the end SetCallerPres(allowed) did the trick.

exten => <msn>,n,SetCallerPres(allowed)

If an ISDN (BRI) call arrives with the flag CallerPres() set to prohib, you can change the CALLERID(num) or CALLERID(name) with the corresponding set function and the CDRs look good, but the sip channel still has something like sip:Unknown <at> 192.168.161.18 in the from field. So the Phone/Softphone only reports about Unknown number and Unknown name.


Asterisk 1.6 change

SetCallerPres is deprecated. Please use Set(CALLERPRES()=allowed) instead.


See also:



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

SetCallerPres


Set CallerID Presentation

This application performs the identical operation to CallingPres(), but accepts descriptive text names instead of numeric values.

SetCallerPres(presentation):

Set Caller*ID presentation on a call to a new value.
Always returns 0. Valid presentations are:

allowed_not_screened : Presentation Allowed, Not Screened
allowed_passed_screen : Presentation Allowed, Passed Screen
allowed_failed_screen : Presentation Allowed, Failed Screen
allowed : Presentation Allowed, Network Number
prohib_not_screened : Presentation Prohibited, Not Screened
prohib_passed_screen : Presentation Prohibited, Passed Screen
prohib_failed_screen : Presentation Prohibited, Failed Screen
prohib : Presentation Prohibited, Network Number
unavailable : Number Unavailable

CLIR

This example shows how to dial out with CLIR (Calling Line Identification Restriction)

; for zap channels I needed to put "usecallingpres=yes" in the zapata.conf to get
; the SetCallerPres(prohib) work (tested on Asterisk 1.0.7 +bristuff +zaphfc)
exten 2000,1,SetCallerPres(prohib)
exten 2000,2,Dial(Zap/4/0401234567)


User example: Incoming calls


For me in the end SetCallerPres(allowed) did the trick.

exten => <msn>,n,SetCallerPres(allowed)

If an ISDN (BRI) call arrives with the flag CallerPres() set to prohib, you can change the CALLERID(num) or CALLERID(name) with the corresponding set function and the CDRs look good, but the sip channel still has something like sip:Unknown <at> 192.168.161.18 in the from field. So the Phone/Softphone only reports about Unknown number and Unknown name.


Asterisk 1.6 change

SetCallerPres is deprecated. Please use Set(CALLERPRES()=allowed) instead.


See also:



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

Created by: JustRumours, Last modification: Mon 29 of Dec, 2008 (11:53 UTC) by dichis
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+