Koozali.org: home of the SME Server

Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: Teviot on June 14, 2010, 05:31:21 AM

Title: Privacy Manager
Post by: Teviot on June 14, 2010, 05:31:21 AM
Hi

I would like some help putting in a privacy manager into my SARK/SAIL pbx.

I have found http://www.asterisk.org/astdocs/node59.html (http://www.asterisk.org/astdocs/node59.html) which explains something like what I want to do, but I don't have the know how to do it.

Could someone help me with this please?
Title: Re: Privacy Manager
Post by: Teviot on June 17, 2010, 08:06:12 AM
Has anyone had experiance adding the privacy manager feature into SARK/SAIL pbx?
Title: Re: Privacy Manager
Post by: SARK devs on June 17, 2010, 10:10:25 PM
The only way it could be done would be to write your own inbound dial routine using a custom app.   Send the inbound call to your app and then issue your own dial with the necessary settings for the privacy manager.  You can do pretty much whatever you like in the app, including checking for caller IDs and so on, so you could probably just follow the guide you mentioned in your earlier mail.

Kind Regards

S
Title: Re: Privacy Manager
Post by: Teviot on June 28, 2010, 02:30:20 AM
I don't know anything about custom apps programing.  Is there somewhere I can get all the information that I need to attempt this?
Title: Re: Privacy Manager
Post by: SARK devs on June 28, 2010, 10:46:01 AM
custom apps are just a way of giving you access to extensions.conf to write your own asterisk dialplan algorithms.  I suggest you buy a book on Asterisk (there is one from O'Reilly) and start from there.

Kind Regards

Title: Re: Privacy Manager
Post by: Teviot on September 19, 2010, 07:00:21 PM
I'm still having trouble with this Privacy Manager thing

I can't get it to work. 

Has anyone got this to work on SAIL?

How do you do it?
Title: Re: Privacy Manager
Post by: PWDasterisk on October 04, 2010, 06:04:26 AM
I did this as a quick and simple intercept to stop several pesky telemarketers...
you SHOULD change/add the {CALLERID(num) & {CALLERID(name) variables as required...
you MUST change the exten => s,n(other),Goto(mainmenu,Zap1-1,1) to match YOUR mainmenu in extensions.conf

---------------------------------------------------------------
Create these greetings to say whatever
----------------------------------------------------------------
Greeting     Description     
1111          Telemarketers    
2222           No Caller ID    

----------------------------------------------------------------
Create these IVR Menus to point to Greetings
----------------------------------------------------------------
IVR Menu          Cluster     Greeting           
No_Caller_ID      default     No Caller ID       
Telemarketers    default    Telemarketers    

----------------------------------------------------------------
Create these dummy trunks and point to IVR trees
----------------------------------------------------------------
DID Number
SIP/IAX Name     Trunkname                Carrier       Open Inbound Route    Closed Inbound Route

telemarketer       Telemarketer_Call       PTT_CLID     Telemarketers           Telemarketers           
unknown            No_Caller_ID              PTT_CLID     No Caller ID               No Caller ID           

----------------------------------------------------------------
Create this Custom App and direct your trunk(s) to it
----------------------------------------------------------------
[custom-incoming]
;;; custom incoming call context
exten => s,1,NoOp(custom-incoming: DISPLAY CALL INFORMATION)
exten => s,n,NoOp(EXTEN : ${EXTEN})
exten => s,n,NoOP(CONTEXT : ${CONTEXT})
exten => s,n,NoOP(SIPDOMAIN : ${SIPDOMAIN})
exten => s,n,NoOP(SIPCALLID : ${SIPCALLID})
exten => s,n,NoOP(SIPUAGENT : ${SIPUSERAGENT})
exten => s,n,NoOP(CALLERNAME: ${CALLERID(name)})
exten => s,n,NoOP(CALLERNUM : ${CALLERID(num)})
exten => s,n,NoOP(RDNIS : ${RDNIS})
exten => s,n,NoOP(DNID : ${DNID})
;
exten => s,n,NoOp(custom-incoming: EVALUATE THE CALLER-ID INFO)
;;; CALLERID(name) must be 15 characters padded with trailing spaces for ZAP USA CID;;;
exten => s,n,Gotoif($["${CALLERID(num)}"=""]?unknown)
exten => s,n,Gotoif($["${CALLERID(num)}"="5712145430"]?telemarketer)
exten => s,n,Gotoif($["${CALLERID(num)}"="8668252610"]?telemarketer)
exten => s,n,Gotoif($["${CALLERID(name)}"="ACLJ"]?telemarketer)
exten => s,n,Gotoif($["${CALLERID(name)}"="ACLJ           "]?telemarketer)
exten => s,n,Gotoif($["${CALLERID(name)}"="MA FOP"]?telemarketer)
exten => s,n,Gotoif($["${CALLERID(name)}"="MA FOP         "]?telemarketer)
;
; YOU MUST CHANGE THIS NEXT LINE TO MATCH YOUR MAINMENU ENTRY/EXIT point
exten => s,n(other),Goto(mainmenu,Zap1-1,1) 
exten => s,n(other),NoOp(custom-incoming: RETURN from Goto->mainmenu)
exten => s,n(other),Goto(end,1)
;
;;; known telemarketer call
exten => s,n(telemarketer),NoOp(custom-incoming: THIS IS A KNOWN TELEMARKETER)
; exten => s,n(telemarketer),Zapateller(answer)
exten => s,n(telemarketer),Wait(6)
exten => s,n(telemarketer),Answer()
exten => s,n(telemarketer),Wait(1)
exten => s,n(telemarketer),Playback(hello)
exten => s,n(telemarketer),Goto(mainmenu,telemarketer,1)
exten => s,n(telemarketer),NoOp(custom-incoming: RETURN from Goto->mainmenu->telemarketer)
exten => s,n(telemarketer),Goto(end,1)
;
;;; no Caller ID from caller
exten => s,n(unknown),NoOp(custom-incoming: THIS CALL HAS NO CALLER-ID NUMBER)
;  exten => s,n(unknown),Answer()
;  exten => s,n(unknown),Wait(1)
;  exten => s,n(unknown),Playback(hello)
exten => s,n(unknown),Goto(mainmenu,unknown,1)
exten => s,n(unknown),NoOp(custom-incoming: RETURN from Goto->mainmenu->unknown)
exten => s,n(unknown),Goto(end,1)
;
;
exten => end,1,NoOp(custom-incoming: This reached the context END)
exten => end,n,Hangup()
;
exten => i,1),Hangup()
exten => t,1,Hangup()


----------------------------------------------------------------
If you want to manually transfer calls create this Custom App
----------------------------------------------------------------
[route_to_IVR]
; transfer calls from telemarketers to IVR trees
exten => 1111,1,agi(selintra,Inbound,${EXTEN},telemarketer)
exten => 1111,n,Hangup()
exten => 2222,1,agi(selintra,Inbound,${EXTEN},unknown)
exten => 2222,n,Hangup()