📄 privacy.tex
字号:
\end{verbatim}\end{astlisting}The 't' allows the dialed party to transfer the call using '\#'. It'soptional.The 'm' is for music on hold. I suggest it. Otherwise, the callingparty gets to hear all the ringing, and lack thereof. It is generallybetter to use Music On Hold. Lots of folks hang up after the 3rd or4th ring, and you might lose the call before you can enter an option!The 'P' option alone will database everything using the extension as adefault 'tree'. To get multiple extensions sharing the same database, useP(some-shared-key). Also, if the same person has multiple extensions,use P(unique-id) on all their dial commands.Use little 'p' for screening. Every incoming call will include aprompt for the callee's choice.the A(beep), will generate a 'beep' that the callee will hear if theychoose to talk to the caller. It's kind of a prompt to let the calleeknow that he has to say 'hi'. It's not required, but I find ithelpful.When there is no CallerID, P and p options will always record an introfor the incoming caller. This intro will be stored temporarily in the\path{/var/lib/asterisk/sounds/priv-callerintros} dir, under the nameNOCALLERID\_$<$extension$>$ $<$channelname$>$ and will be erased after thecallee decides what to do with the call.Of course, NOCALLERID is not stored in the database. All those with noCALLERID will be considered "Unknown".\subsection{The 'N' and 'n' options}Two other options exist, that act as modifiers to the privacy options'P' and 'p'. They are 'N' and 'n'. You can enter them as dialingoptions, but they only affect things if P or p are also in theoptions.'N' says, "Only screen the call if no CallerID is present". So, if acallerID were supplied, it will come straight thru to your extension.'n' says, "Don't save any introductions". Folks will be asked tosupply an introduction ("At the tone, say your name") every time theycall. Their introductions will be removed after the callee makes achoice on how to handle the call. Whether the P option or the p optionis used, the incoming caller will have to supply their intro everytime they call.\subsection{Recorded Introductions}\subsubsection{Philosophical Side Note}The 'P' option stores the CALLERID in the database, along with thecallee's choice of actions, as a convenience to the CALLEE, whereasintroductions are stored and re-used for the convenience of the CALLER.\subsubsection{Introductions}Unless instructed to not save introductions (see the 'n' option above),the screening modes will save the recordings of the caller's names inthe directory \path{/var/lib/asterisk/sounds/priv-callerintros}, if they havea CallerID. Just the 10-digit callerid numbers are used as filenames,with a ".gsm" at the end.Having these recordings around can be very useful, however...First of all, if a callerid is supplied, and a recorded intro for thatnumber is already present, the caller is spared the inconvenience ofhaving to supply their name, which shortens their call a bit.Next of all, these intros can be used in voicemail, played overloudspeakers, and perhaps other nifty things. For instance:\begin{astlisting}\begin{verbatim}exten => s,6,Set(PATH=/var/lib/asterisk/sounds/priv-callerintros)exten => s,7,System(/usr/bin/play ${PATH}/${CALLERID(num)}.gsm&,0)\end{verbatim}\end{astlisting}When a call comes in at the house, the above priority gets executed,and the callers intro is played over the phone systems speakers. Thisgives us a hint who is calling.(Note: the ,0 option at the end of the System command above, is alocal mod I made to the System command. It forces a 0 result code tobe returned, whether the play command successfully completed ornot. Therefore, I don't have to ensure that the file exists ornot. While I've turned this mod into the developers, it hasn't beenincorporated yet. You might want to write an AGI or shell script tohandle it a little more intelligently)And one other thing. You can easily supply your callers with an optionto listen to, and re-record their introductions. Here's what I did inthe home system's extensions.conf. (assume that aGoto(home-introduction,s,1) exists somewhere in your main menu as anoption):\begin{astlisting}\begin{verbatim}[home-introduction]exten => s,1,Background(intro-options) ;; Script: ;; To hear your Introduction, dial 1. ;; to record a new introduction, dial 2. ;; to return to the main menu, dial 3. ;; to hear what this is all about, dial 4.exten => 1,1,Playback,priv-callerintros/${CALLERID(num)}exten => 1,2,Goto(s,1)exten => 2,1,Goto(home-introduction-record,s,1)exten => 3,1,Goto(homeline,s,7)exten => 4,1,Playback(intro-intro) ;; Script: ;; This may seem a little strange, but it really is a neat ;; thing, both for you and for us. I've taped a short introduction ;; for many of the folks who normally call us. Using the Caller ID ;; from each incoming call, the system plays the introduction ;; for that phone number over a speaker, just as the call comes in. ;; This helps the folks ;; here in the house more quickly determine who is calling. ;; and gets the right ones to gravitate to the phone. ;; You can listen to, and record a new intro for your phone number ;; using this menu.exten => 4,2,Goto(s,1)exten => t,1,Goto(s,1)exten => i,1,Background(invalid)exten => i,2,Goto(s,1)exten => o,1,Goto(s,1)[home-introduction-record]exten => s,1,Background(intro-record-choices) ;; Script: ;; If you want some advice about recording your ;; introduction, dial 1. ;; otherwise, dial 2, and introduce yourself after ;; the beep.exten => 1,1,Playback(intro-record) ;; Your introduction should be short and sweet and crisp. ;; Your introduction will be limited to 4 seconds. ;; This is NOT meant to be a voice mail message, so ;; please, don't say anything about why you are calling. ;; After we are done making the recording, your introduction ;; will be saved for playback. ;; If you are the only person that would call from this number, ;; please state your name. Otherwise, state your business ;; or residence name instead. For instance, if you are ;; friend of the family, say, Olie McPherson, and both ;; you and your kids might call here a lot, you might ;; say: "This is the distinguished Olie McPherson Residence!" ;; If you are the only person calling, you might say this: ;; "This is the illustrious Kermit McFrog! Pick up the Phone, someone!!" ;; If you are calling from a business, you might pronounce a more sedate introduction,like, ;; "Fritz from McDonalds calling.", or perhaps the more original introduction: ;; "John, from the Park County Morgue. You stab 'em, we slab 'em!". ;; Just one caution: the kids will hear what you record every time ;; you call. So watch your language! ;; I will begin recording after the tone. ;; When you are done, hit the # key. Gather your thoughts and get ;; ready. Remember, the # key will end the recording, and play back ;; your intro. Good Luck, and Thank you!"exten => 1,2,Goto(2,1)exten => 2,1,Background(intro-start) ;; OK, here we go! After the beep, please give your introduction.exten => 2,2,Background(beep)exten => 2,3,Record(priv-callerintros/${CALLERID(num)}:gsm,4)exten => 2,4,Background(priv-callerintros/${CALLERID(num)})exten => 2,5,Goto(home-introduction,s,1)exten => t,1,Goto(s,1)exten => i,1,Background(invalid)exten => i,2,Goto(s,1)exten => o,1,Goto(s,1)\end{verbatim}\end{astlisting}In the above, you'd most likely reword the messages to your liking,and maybe do more advanced things with the 'error' conditions (i,o,t priorities),but I hope it conveys the idea.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -