Dock, jag sparade skriptet och idag hittade jag det när jag gick igenom en gammal disk.
Håll tillgodo, detta är ett exempel på en absolut lysande IVR (tryck 1 för, tryck 2 för etc etc)
Denna kod sattes upp som en custom dialplan och den kombinerades med kända telefonnummer i en databas, om man fick en träff på numret skickades samtalet till detta skript.
"koden" är skriven i Asterisk skript för dialplan.
Kod: Markera allt
;
; AN EXERCISE IN BAD DIALPLAN DESIGN
; (What better test ground than on telemarketers?)
;; Should I admit this? Written by Steve Murphy, Electronic Tools Co.
;;; BAD DESIGN: long, boring introductions followed by long, drawn out menus of choices.
;;; if they survive to the last option, how will they remember the choices?
;;;
;;; BAD DESIGN: Amateur Recording. Poor voice quality, too quiet.
;;; Also, the announcer is definitely not vocally gifted.
;;; Also, the long pauses and clicks between the intro
;;; and menu choices might lead some to think that
;;; the announcements are over, and hang up. Too bad!
;;; One Last Note on this subject- Your regard for the caller is reflected in the
;;; quality of the sound of your recorded prompts. As to my prompts, well, all I can
;;; say is, at least I didn't record them with "Marvin the Martian" or "Donald Duck" voices!!!!
;; GOOD/BAD, ER INSIDIOUS -- DANGLE A CARROT-- GIVE THE LISTENER A GOOD REASON TO
;; HANG ON AND VOLUNTARILY LISTEN TO THE TORTURE.
;; BUT, DON'T MAKE PROMISES YOU WON'T KEEP!
[telemarket]
exten => s,1,Background,telemarketer-intro ; Script:
;; Due to the extremely high volume of calls from everything from telemarketers
;; to Septic System Bacteria vendors, we are asking all such organizations
;; to remove this number from their call list, or as need be, to add this
;; number to their No-Call list, whichever is relevent.
;; [THE CARROT:]
;; We HAVE made some exceptions, and if you wish to see if your organization
;; has been exempted, please listen to and follow the following prompts.
;;
;; Otherwise, please Cease calling this number!
;;
exten => s,2,Background,telemarketer-choices
;; if you represent a charitable organization, please dial 1,
;; if you represent a political organization, please dial 2.
;; if you represent a polling company, please dial 3,
;; if you represent a market research organization, please dial 4.
;; if you represent a magazine or newsletter, please dial 5.
;; if you represent a commercial organization, please dial 6.
;; all others, dial 7.
exten => 1,1,Goto(telemarket-charity,s,1)
exten => 2,1,Goto(telemarket-political,s,1)
exten => 3,1,Goto(telemarket-pollster,s,1)
exten => 4,1,Goto(telemarket-research,s,1)
exten => 5,1,Goto(telemarket-magazine,s,1)
exten => 6,1,Goto(telemarket-commercial,s,1)
exten => 7,1,Goto(telemarket-other,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-charity]
exten => s,1,Background,telemark-charity-intro
;; We have contributed generously to many worthy causes in the past, and will
;; continue to do so in the future. But we suspect that such organizations
;; have sold our name and phone number to each other until we are now hounded
;; day and night by literally hundreds of such organizations.
;; Enough is Enough!
;;
;; If we have contributed to your cause in the past, we may, perhaps, be disposed to
;; do so in the future, at our option,
;; we give no pledges nor make any commitments here.
;; Send us material via the post if you feel this necessary
;; but do not even consider email. Any email or further phone calls from your organization
;; in the future, will be considered an act of aggression, and we will
;; blacklist your organization for the rest of our natural lives.
;;
;; To see if your organization is exempt from these prohibitions, please
;; comply with the following options.
exten => s,2,Background,telemark-charity-choices
;; If your organization is disease or genetic defect related, dial 1,
;; If your organization is handicap related, dial 2.
;; If your organization is a police or fireman or other similar support entity, please dial 3.
;; If your organization is a grade school to high school related
;; fund raiser or other type of activity, please dial 4.
;; If your organization is a college or university or alumnis organization, please dial 5.
;; If your organization is animal rights or ecology related organization, please dial 6.
;; If your organization is a political action or candidate support related, please dial 7.
;; If your organization is a substance abuse related organization or cause, please dial 8.
;; And any other charity or tax exempt organization should dial 9.
exten => 1,1,Goto(telemarket-char-disease,s,1)
exten => 2,1,Goto(telemarket-char-handicap,s,1)
exten => 3,1,Goto(telemarket-char-police,s,1)
exten => 4,1,Goto(telemarket-char-school,s,1)
exten => 5,1,Goto(telemarket-char-college,s,1)
exten => 6,1,Goto(telemarket-char-animal,s,1)
exten => 7,1,Goto(telemarket-char-candidate,s,1)
exten => 8,1,Goto(telemarket-char-abuse,s,1)
exten => 9,1,Goto(telemarket-char-other,s,1)
;;; BAD DESIGN: referring all timeouts,invalid choices, etc, back to the root of the menu tree will frustrate users no end!
;;; WORSE DESIGN: How about having the user have to push a button to repeat the current menu? When a time out could just automatically do it for the user?
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-char-disease]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-handicap]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-police]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-school]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-college]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-animal]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-candidate]~
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-abuse]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-char-other]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-sorry]
exten => s,1,Background,telemarket-sorry
;; Sorry -- your organization is not exempt. Please stop calling us.
;; Thank you. goodbye.
exten => s,2,Hangup
;;; BAD DESIGN: Hanging up on your audience, no matter what the outcome, is not a nice thing to do!
[telemarket-exception]
exten => s,1,Background,telemarket-success
;; Congratulations. Your organization IS exempt. Please call us back,
;; but this time, just act like a normal caller. Thank you. Goodbye.
exten => s,2,Hangup
;;; BAD DESIGN: Making long cascading menu choices is a nasty thing to do to callers!
;;; BAD DESIGN: Putting the most frequently encountered items at the end of a list is also a nasty thing to do!
;; GOOD DESIGN: All rejection notices use a single context. All Acceptance also. To change a rejection to an
;; acceptance, just change the reference from telemarket-sorry to telemarket-exception
[telemarket-political]
exten => s,1,Background,telemark-polit-intro
;; To see if your organization is exempt from our prohibitions,
;; please follow the following prompts.
;; please note that they are not in alphabetical order, and you will have to
;; give them your full attention.
exten => s,2,Background,telemark-polit-choices
;; if You represent the America First Party, dial 1.
;; if You represent the American Party, dial 2.
;; if You represent the American Heritage Party, dial 3.
;; if You represent the American Independent Party, dial 4.
;; if You represent the American Nazi Party, dial 5.
;; if You represent the Pot Party, dial 6.
;; if You represent the American Reform Party, dial 7.
;; if You represent the Christian Falenqist Party of America, dial 8.
;; all others, please dial 9.
exten => 1,1,Goto(telemarket-poli-Am1st,s,1)
exten => 2,1,Goto(telemarket-poli-American,s,1)
exten => 3,1,Goto(telemarket-poli-AmHer,s,1)
exten => 4,1,Goto(telemarket-poli-AmInd,s,1)
exten => 5,1,Goto(telemarket-poli-AmNaz,s,1)
exten => 6,1,Goto(telemarket-poli-Pot,s,1)
exten => 7,1,Goto(telemarket-poli-AmRef,s,1)
exten => 8,1,Goto(telemarket-poli-CFP,s,1)
exten => 9,1,Goto(telemarket-political2,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-political2]
exten => s,1,Background,telemark-politx-intro
;; Thank you for your patience, and I congratulate you for your persistence.
;; Just a few more options!
;;
exten => s,2,Background,telemark-polit2-choices
;; if You represent the Communist Party USA, dial 1.
;; if You represent the Constitution Party, dial 2.
;; if You represent the Family Values Party, dial 3.
;; if You represent the Freedom Socialist Party, dial 4.
;; if You represent the Grass Roots Party, dial 5.
;; if You represent the Green Party, dial 6.
;; if You represent the Greens Party, dial 7.
;; if You represent the Independence Party, dial 8.
;; all others, goto 9.
exten => 1,1,Goto(telemarket-poli-Communist,s,1)
exten => 2,1,Goto(telemarket-poli-Constit,s,1)
exten => 3,1,Goto(telemarket-poli-FamVal,s,1)
exten => 4,1,Goto(telemarket-poli-FreedSoc,s,1)
exten => 5,1,Goto(telemarket-poli-Grassroot,s,1)
exten => 6,1,Goto(telemarket-poli-Green,s,1)
exten => 7,1,Goto(telemarket-poli-Greens,s,1)
exten => 8,1,Goto(telemarket-poli-Independence,s,1)
exten => 9,1,Goto(telemarket-political3,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-political3]
exten => s,1,Background,telemark-politx-intro
exten => s,2,Background,telemark-polit3-choices
;; if You represent the Independent American Party, dial 1.
;; if You represent the Labor Party, dial 2.
;; if You represent the Libertarian Party, dial 3.
;; if You represent the Light Party, dial 4.
;; if You represent the Natural Law Party, dial 5.
;; if You represent the New Party, dial 6.
;; if You represent the New Union Party, dial 7.
;; if You represent the Peace and Freedom Party, dial 8.
;; all others, hang on, dial 9.
exten => 1,1,Goto(telemarket-poli-IndAm,s,1)
exten => 2,1,Goto(telemarket-poli-Labor,s,1)
exten => 3,1,Goto(telemarket-poli-Liber,s,1)
exten => 4,1,Goto(telemarket-poli-Light,s,1)
exten => 5,1,Goto(telemarket-poli-NatLaw,s,1)
exten => 6,1,Goto(telemarket-poli-New,s,1)
exten => 7,1,Goto(telemarket-poli-NewUn,s,1)
exten => 8,1,Goto(telemarket-poli-PeaceFree,s,1)
exten => 9,1,Goto(telemarket-political4,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-political4]
exten => s,1,Background,telemark-politx-intro
exten => s,2,Background,telemark-polit4-choices
;; if You represent the Prohibition Party, dial 1.
;; if You represent the Reform Party, dial 2.
;; if You represent the Revolution , dial 3.
;; if You represent the Socialist Party USA, dial 4.
;; if You represent the Socialist Action Party, dial 5.
;; if You represent the Socialist Equality Party, dial 6.
;; if You represent the Socialist Labor Party, dial 7.
;; if You represent the Socialist Workers Party, dial 8.
;; all others, hang on, and dial 9.
exten => 1,1,Goto(telemarket-poli-Prohib,s,1)
exten => 2,1,Goto(telemarket-poli-Ref,s,1)
exten => 3,1,Goto(telemarket-poli-Revol,s,1)
exten => 4,1,Goto(telemarket-poli-SocPart,s,1)
exten => 5,1,Goto(telemarket-poli-SocAct,s,1)
exten => 6,1,Goto(telemarket-poli-SocEq,s,1)
exten => 7,1,Goto(telemarket-poli-SocLab,s,1)
exten => 8,1,Goto(telemarket-poli-SocWork,s,1)
exten => 9,1,Goto(telemarket-political5,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-political5]
exten => s,1,Background,telemark-politx-intro
exten => s,2,Background,telemark-polit5-choices
;; if You represent the Southern Party, dial 1.
;; if You represent the Southern Independence Party, dial 2.
;; if You represent the US Pacifist Party, dial 3.
;; if You represent the We the People Party, dial 4.
;; if You represent the Workers World Party, dial 5.
;; if You represent the Democratic Party, dial 6.
;; if You represent the Republican Party, dial 7.
;; all others, may dial 8.
exten => 1,1,Goto(telemarket-poli-South,s,1)
exten => 2,1,Goto(telemarket-poli-SoInd,s,1)
exten => 3,1,Goto(telemarket-poli-USPac,s,1)
exten => 4,1,Goto(telemarket-poli-WTP,s,1)
exten => 5,1,Goto(telemarket-poli-WWP,s,1)
exten => 6,1,Goto(telemarket-poli-Democrat,s,1)
exten => 7,1,Goto(telemarket-poli-Repub,s,1)
exten => 8,1,Goto(telemarket-poli-other,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-poli-other]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Repub]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Democat]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-WWP]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-WTP]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-USPac]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-SoInd]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-South]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-SocWork]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-SocLab]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-SocEq]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-SocAct]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-SocPart]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Revol]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Ref]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Prohib]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-PeaceFree]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-NewUn]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-New]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-NatLaw]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Light]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Liber]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Labor]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-IndAm]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Independence]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Greens]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Green]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Grassroot]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-FreedSoc]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-FamVal]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Constit]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Communist]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-CFP]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-AmRef]
exten => s,1,Goto(telemarket-sorry,s,1)
;;; BAD DESIGN: Putting in infinite loops in the menus, whether by design or mistake is not nice!
[telemarket-poli-Pot]
exten => s,1,Goto(telemarket-political,s,2) ;; will the Pot Party Guys even notice an infinite loop?
[telemarket-poli-AmNaz]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-AmInd]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-AmHer]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-American]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-poli-Am1st]
exten => s,1,Goto(telemarket-sorry,s,1)
[telemarket-pollster]
exten => s,1,Background,telemark-poll-intro
;; I'm sorry-- We are just not available for doing any polling at the moment. So,
;; please remove us from your list.
exten => s,3,Goto(telemarket-sorry,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-research]
exten => s,1,Background,telemark-research-intro
;; I'd like to say I'd love to help you with your market survey, but that would be a complete
;; and total lie. I am not interested in helping you with Market Surveys.
;;
;; Please remove me from your call list. It just doesn't pay enough. But Thank you.
exten => s,3,Goto(telemarket-sorry,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-magazine]
exten => s,1,Background,telemark-mag-choices
;; If you are calling to see if I would like a NEW free subscription
;; to your magazine or newsletter, please dial 1.
;; If you are calling to see if I want to Renew an existing subscription, please dial 2.
;; If you are representing some publisher, and want my opinion about something, or are doing
;; some kind of survey, please dial 3.
;; If you are calling to verify that some previous caller actually called me, and the
;; verification information is correct, please dial 4.
;; and if your call purpose doesn't match any of the above, please dial 5.
exten => 1,1,Goto(telemark-mag-new,s,1)
exten => 2,1,Goto(telemark-mag-renew,s,1)
exten => 3,1,Goto(telemark-mag-survey,s,1)
exten => 4,1,Goto(telemark-mag-verify,s,1)
exten => 5,1,Goto(telemark-mag-other,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemark-mag-new]
exten => s,1,Background,telemark-mag-new
;; I'm sorry, I'm maxed out, and the answer is NO.
;; If you really think I'd LOVE to add your publication to the pile I already get,
;; Send something via the post. Don't call me.
;; Thank you. bye.
exten => s,2,Hangup
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemark-mag-renew]
exten => s,1,Background,telemark-mag-renew
;; So, you want to see if I want to Renew, do you? The answer is most likely "YES".
;;
;; But, I will not answer a long list of questions over the phone. Send such
;; categorization info via the post, and stop bothering me over the phone,
;; if this is what you want.
;; Do you need verification information? Normally I opt out of such nonsense, if possible.
;; If not, use whatever of the following you can:
;; My birth month is October.
;; My birthplace is Kigali, in Africa.
;; My eye color is orange.
;; All of these are wonderfully false, but I use them regularly for such purposes. Thank you.
exten => s,2,Hangup
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemark-mag-survey]
exten => s,1,Background,telemark-mag-survey
;; Sorry, I don't have time to answer survey or opinion questions. Find someone
;; else to help build your marketing database, I guess. Good Luck.
exten => s,2,Hangup
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemark-mag-verify]
exten => s,1,Background,telemark-mag-verify
;; If you are calling to verify that your own agents aren't ripping you off,
;; sorry, I can't help you. I opt out whenever I can, mainly because I'm not
;; paid enough for this kind of thing. I always lie, and I can't remember
;; what I might have said. Sorry. Goodbye.
exten => s,2,Hangup
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemark-mag-other]
exten => s,1,Goto(telemarket-sorry,s,1)
;;; BAD DESIGN: Is it entrapment, when you lure telemarketers to reveal their contact information,
;;; Just so you can report them to the FTC/FCC? If it is, isn't it unethical for them
;;; to hide their CID (via Anonymous, usually), to hide their identities from the public?
;; BTW -- What telemarketer would be stupid enough to fall for this? I'll bet not a single one!
;; For that matter, what telemarketer will be stupid enough to even enter any of this? I'll bet not a single one!
;; (but it was fun messing around).
[telemarket-commercial]
exten => s,1,Background,telemark-comm-intro ;; Script: Please leave your name, organization, and phone number, plus
;; a short description of the purpose of your call, at the prompt.
;; We will do our best to respond to your call! And, in the mean time,
;; do not forget to add us to your no-call list!
exten => s,2,Voicemail(u82)
exten => s,3,Goto(telemarket-sorry,s,1)
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)
[telemarket-other]
exten => s,1,Background,telemark-other-intro
;; Please review the previous menu options, and see if you really don't
;; fit in one of the previous categories.
;; If you do not, go ahead, and call me again, and let me know what category
;; I should have included in the above list. I appreciate this. Thank you much!
exten => s,2,Hangup
exten => t,1,Goto(telemarket,s,1)
exten => i,1,Goto(telemarket,s,1)
exten => o,1,Goto(telemarket,s,1)