Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Messages - Scripting 1

Status
Not open for further replies.

Pir8Radio

Technical User
Jul 31, 2004
291
US
Hi, i need ot have 4 (lets call them greetings), i need the four greetings to be played to on to ever fourth caller.

For exampler,

caller 1 gets greeting 1
caller 2 gets greeting 2
caller 3 gets greeting 3
caller 4 gets greeting 4
caller 5 gets greeting 1
caller 6 gets greeting 2
etc....

Is there a way to script this? if so can you give me an example? im using access ports to play my messages.
 
geesh i should have read over my own post....

" i need the four greetings to be played one for every fourth caller."

"for example
 
That would be a wild variable command. What release are you working with?
 
7.0

If you have time to give an example, thats the best way i learn... :)

Thanks,
 
Think this might work;

Create a variable f.e. 'Caller_Count', type Integer, Call variable with value 0.
Setup scripting:

READVAR Caller_Count
Caller_Count Assigned (Caller_Count + 1) /* adds 1 */
SAVEVAR

READVAR Caller_Count
SAVEVAR
WHERE Caller_Count EQUALS
VALUE 1 : /* Play message 1 */
VALUE 2 : /* Play message 2 */
VALUE 3 : /* Play message 3 */
VALUE 4 : /* Play message 4 */
ASSIGN 0 TO Caller_Count /* Resets the counter */
END WHERE
 
Wouldnt that reset the variable back to 0 after ever one caller? if so could i do something like,

VALUE 5: ASSIGN 0 TO Caller_Count

Is the Caller_Count variable global? or assigned/tracked per caller? Still learning.... let me know how far off base i am please.
 
oh... nevermind... I see assign is at the end... of 4, ok i will try this. thanks.
 
Correct, the assign is for option 4 only.
But my example was not complete, this should be (for option 4):

READVAR Caller_Count
ASSIGN 0 TO Caller_Count /* Resets the counter */
SAVEVAR

Without these extra scriptcomments it will not rember it's settings...
 
I’m relatively new to scripting, would the below work?


READVAR caller_count_timetempline_cv
caller_count_timetempline_cv ASSIGNED (caller_count_timetempline_cv + 1)
SAVEVAR

READVAR caller_count_timetempline_cv
WHERE caller_count_timetempline_cv EQUALS
VALUE 1: EXECUTE message_one
VALUE 2: EXECUTE message_two
VALUE 3: EXECUTE message_three
VALUE 4: EXECUTE message_four
END WHERE

SECTION message_one
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_weather_maintenance
ROUTE CALL 6939

SECTION message_two
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_weather_maintenance
ROUTE CALL 6939

SECTION message_three
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_weather_maintenance
ROUTE CALL 6939

SECTION message_four
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_weather_maintenance
ASSIGN 0 TO caller_count_timetempline_cv
SAVEVAR
ROUTE CALL 6939



Granted i will have different messages not all the same.
 
Almost, the READVAR and SAVEVAR statements belong together.
So add the lines indicated with --> below.

Note: Is 6939 a CDN? If so the check and further routing (in the Master_Script) of this CDN has to be done before this new scripting.

..
READVAR caller_count_timetempline_cv
--> SAVEVAR
WHERE caller_count_timetempline_cv EQUALS
..

SECTION message_four
..
--> READVAR caller_count_timetempline_cv
ASSIGN 0 TO caller_count_timetempline_cv
SAVEVAR


 
Yes i figured out over the weekend when i tried to save the script, it got mad at me that i didnt have savevar in there.. all fixed up, seems to work! Thanks again! Yes this CDN already existed... my old script was ROUTE TO and i used CCMA for reports.. Below was my final script, incase anyone wanted to see it:

READVAR caller_count_timetempline_cv
caller_count_timetempline_cv ASSIGNED (caller_count_timetempline_cv + 1)
SAVEVAR

READVAR caller_count_timetempline_cv
SAVEVAR
WHERE caller_count_timetempline_cv EQUALS
VALUE 1: EXECUTE msg_one
VALUE 2: EXECUTE msg_two
VALUE 3: EXECUTE msg_three
VALUE 4: EXECUTE msg_four
END WHERE

SECTION msg_one
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_mun_ad1_vs
ROUTE CALL 6939

SECTION msg_two
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_mun_ad2_vs
ROUTE CALL 6939

SECTION msg_three
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_mun_ad3_vs
ROUTE CALL 6939

SECTION msg_four
GIVE CONTROLLED BROADCAST ANNOUNCEMENT 79002
PLAY PROMPT VOICE SEGMENT acd_mun_ad4_vs
READVAR caller_count_timetempline_cv
ASSIGN 0 TO caller_count_timetempline_cv
SAVEVAR
ROUTE CALL 6939
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top