login | register
Sun 12 of Oct, 2008 [18:17 UTC]

voip-info.org

Discuss [1] History

Asterisk cmd SetCallerPres

Created by: JustRumours,Last modification on Fri 12 of Oct, 2007 [07:42 UTC] by chandave

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.

See also:



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


Comments

Comments Filter
222

3331.6 Change

by dennisd, Sunday 30 of March, 2008 [21:19:58 UTC]
For 1.6 SetCallerPres is deprecated. Please use Set(CALLERPRES()=allowed) instead.