| 1 |
;------------------------------------------------------------------------------- |
;------------------------------------------------------------------------------- |
| 2 |
; Controlled conference demo. |
|
| 3 |
; Assumes that conference id 1 is configured with "mode = controlled" on DiaStar. |
; Menu for all conference demos |
| 4 |
|
[conference_menu] |
| 5 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 6 |
|
exten => s,2,Set(OVERLAY=id=text_box&header=Video Conferencing&line1=1 Animal Conference&line2=2 PIN Conference&line3=3 Conference Record&line4=4 Controlled Conferencing&line5=5 Demo Menu&footer=Diastar) |
| 7 |
|
exten => s,3,Set(TIMEOUT_CNT=0) |
| 8 |
|
exten => s,4,WoomeraBackground(${APPNAME}/conference_menu,${APPNAME}/black,${OVERLAY}) |
| 9 |
|
exten => s,5,WaitExten(30) |
| 10 |
|
exten => 1,1,Goto(animal_conference,s,1) |
| 11 |
|
exten => 2,1,Goto(pin_conference,s,1) |
| 12 |
|
exten => 3,1,Goto(confrecord_menu,s,1) |
| 13 |
|
exten => 4,1,Goto(controlled_conf_menu,s,1) |
| 14 |
|
exten => 5,1,Goto(demo_menu,s,1) |
| 15 |
|
exten => t,1,Set(TIMEOUT_CNT=$[${TIMEOUT_CNT} + 1]) |
| 16 |
|
exten => t,n,GotoIf($[${TIMEOUT_CNT} > 1]?hangup,s,1) |
| 17 |
|
exten => t,n,WoomeraStop |
| 18 |
|
exten => t,n,Goto(conference_menu,s,4) |
| 19 |
|
exten => i,1,Goto(conference_menu,s,1) |
| 20 |
|
|
| 21 |
|
|
| 22 |
|
[pin_conference] |
| 23 |
|
; |
| 24 |
|
; A file-based DB keeps track of the allowed conferences and the number of participants |
| 25 |
|
; in each. The caller is asked if he wants to start a new conference, in which case an ID |
| 26 |
|
; is supplied, the DB record updated accordingly and the caller is the first conferee in |
| 27 |
|
; that conference. He relays the ID to other people and they call in and enter the conference |
| 28 |
|
; by supplying the ID. |
| 29 |
|
|
| 30 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 31 |
|
; |
| 32 |
|
; Query to ask if starting new conference or joining existing |
| 33 |
|
exten => s,2,Set(OVERLAY=id=text_box&header=PIN Conference&line1=1 Start New Conference&line2=2 Enter PIN Conference&line3=3 Demo Menu&footer=Diastar) |
| 34 |
|
exten => s,3,Set(TIMEOUT_CNT=0) |
| 35 |
|
exten => s,4,WoomeraBackground(${APPNAME}/pin_conference,${APPNAME}/black,${OVERLAY}) |
| 36 |
|
exten => s,5,WaitExten(30) |
| 37 |
|
exten => 1,1,Goto(new_pin_conference,s,1) |
| 38 |
|
exten => 2,1,Goto(get_existing_pin,s,1) |
| 39 |
|
exten => 3,1,Goto(demo_menu,s,1) |
| 40 |
|
exten => t,1,Set(TIMEOUT_CNT=$[${TIMEOUT_CNT} + 1]) |
| 41 |
|
exten => t,n,GotoIf($[${TIMEOUT_CNT} > 1]?hangup,s,1) |
| 42 |
|
exten => t,n,WoomeraStop |
| 43 |
|
exten => t,n,Goto(pin_conference,s,4) |
| 44 |
|
exten => i,1,Goto(pin_conference,s,1) |
| 45 |
|
|
| 46 |
|
[new_pin_conference] |
| 47 |
|
; |
| 48 |
|
; AGI script will check DB for next available conference ID and voice it to caller. |
| 49 |
|
; Then we put him into that conference. Conferencd ID returned in PIN_CONF_ID |
| 50 |
|
|
| 51 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 52 |
|
exten => s,n,WoomeraPlayback(${APPNAME}/new_pin_conference) |
| 53 |
|
exten => s,n,AGI(enter_new_pin_conf.agi) |
| 54 |
|
; |
| 55 |
|
; Get either the next available ID or "NONE" - all conferences in use |
| 56 |
|
exten => s,n,GotoIf($["${PIN_CONF_ID}" = "NONE"]?all_confs_in_use,s,1) |
| 57 |
|
; When done with the conference [remove_from_pin_conference] context will take care |
| 58 |
|
; of DB update that marks a caller leaving the conference |
| 59 |
|
exten => s,n,Dial(WOOMERA/conf:${PIN_CONF_ID}/tiles=4,30,F(remove_from_pin_conf^s^1)) |
| 60 |
|
|
| 61 |
|
[get_existing_pin] |
| 62 |
|
; |
| 63 |
|
; AGI script will check DB to validate conference ID. If OK, |
| 64 |
|
; we put him into that conference |
| 65 |
|
|
| 66 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=PIN Conference&line1=Please enter your 3&line2=digit conference PIN&footer=Diastar) |
| 67 |
|
exten => s,2,Set(TIMEOUT_CNT=0) |
| 68 |
|
exten => s,3,WoomeraBackground(${APPNAME}/pin_entry_prompt,${APPNAME}/black,${OVERLAY}) |
| 69 |
|
exten => s,4,WaitExten(10) |
| 70 |
|
; 101-106 are valid entries |
| 71 |
|
exten => _XXX,1,AGI(validate_pin_conf.agi, ${EXTEN}) |
| 72 |
|
exten => _XXX,n,Set(COLLECTED_PIN=${EXTEN}) |
| 73 |
|
exten => _XXX,n,GotoIf($["${VALID_PIN}" = "T"]?join_existing_pin_conference,s,1) |
| 74 |
|
exten => _XXX,n,GotoIf($["${VALID_PIN}" = "F"]?bad_pin,s,1) |
| 75 |
|
exten => t,1,Set(TIMEOUT_CNT=$[${TIMEOUT_CNT} + 1]) |
| 76 |
|
exten => t,n,GotoIf($[${TIMEOUT_CNT} > 1]?hangup,s,1) |
| 77 |
|
exten => t,n,WoomeraStop |
| 78 |
|
exten => t,n,Goto(get_existing_pin,s,3) |
| 79 |
|
exten => i,1,Goto(get_existing_pin,s,1) |
| 80 |
|
|
| 81 |
|
[bad_pin] |
| 82 |
|
; |
| 83 |
|
; Deliver "Entered bad PIN" message and resolicit |
| 84 |
|
|
| 85 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=PIN Conference&line1=Invalid PIN&line2=Please re-enter PIN&footer=Diastar) |
| 86 |
|
exten => s,n,WoomeraBackground(${APPNAME}/bad_pin,${APPNAME}/black,${OVERLAY}) |
| 87 |
|
exten => s,n,WaitExten(6) |
| 88 |
|
exten => t,1,WoomeraStop |
| 89 |
|
exten => t,n,Goto(get_existing_pin,s,1) |
| 90 |
|
|
| 91 |
|
|
| 92 |
|
[join_existing_pin_conference] |
| 93 |
|
; |
| 94 |
|
; Good conference PIN - can join |
| 95 |
|
exten => s,1,AGI(enter_existing_pin_conf.agi,${COLLECTED_PIN}) |
| 96 |
|
; When done with the conference [remove_from_pin_conference] context will take care |
| 97 |
|
; of DB update that marks a caller leaving the conference |
| 98 |
|
exten => s,n,Dial(WOOMERA/conf:${PIN_CONF_ID}/tiles=4,30,F(remove_from_pin_conf^s^1)) |
| 99 |
|
|
| 100 |
|
[remove_from_pin_conf] |
| 101 |
|
; |
| 102 |
|
; Land in this context when have left a pin conference. |
| 103 |
|
; Use AGI to decrement the pin conference database for this particular conference |
| 104 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 105 |
|
exten => s,n,AGI(leave_pin_conf.agi,${CHANNEL:13:3}) |
| 106 |
|
exten => s,n,Hangup |
| 107 |
|
|
| 108 |
|
[all_confs_in_use] |
| 109 |
|
; |
| 110 |
|
; No open conference IDs - deliver nice message and dump |
| 111 |
|
; |
| 112 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=Conferences Busy&line1=All Conference IDs&line2=are currently in use!&line3=Please try later&footer=Diastar) |
| 113 |
|
exten => s,n,WoomeraBackground(${APPNAME}/all_confs_in_use,${APPNAME}/black,${OVERLAY}) |
| 114 |
|
exten => s,n,WaitExten(10) |
| 115 |
|
exten => t,1,WoomeraStop |
| 116 |
|
exten => t,n,hangup |
| 117 |
|
|
| 118 |
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 119 |
|
; |
| 120 |
|
; Animal Conference |
| 121 |
|
; |
| 122 |
|
; Play an intro still with some voiceover, then kick off the 3 animals that |
| 123 |
|
; come into the conference using SIPP plays |
| 124 |
|
; |
| 125 |
|
[animal_conference] |
| 126 |
|
; |
| 127 |
|
; AGI script will check DB for next available animal conference ID. |
| 128 |
|
; Then we put him into that conference. Conferencd ID returned in ANIMAL_CONF_ID |
| 129 |
|
|
| 130 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 131 |
|
exten => s,n,WoomeraPlayback(${APPNAME}/animalconference,${APPNAME}/animalconference) |
| 132 |
|
exten => s,n,AGI(get_new_animal_conf_id.agi) |
| 133 |
|
; Get either the next available ID or "NONE" - all conferences in use |
| 134 |
|
exten => s,n,GotoIf($["${ANIMAL_CONF_ID}" = "NONE"]?all_confs_in_use,s,1) |
| 135 |
|
exten => s,n,System(${SIPP_LOC}/CIF/startanimalconf.sh ${ANIMAL_CONF_ID}) |
| 136 |
|
exten => s,n,Dial(WOOMERA/conf:${ANIMAL_CONF_ID}/tiles=4,30,F(leave_animal_conf^s^1)) |
| 137 |
|
|
| 138 |
|
[leave_animal_conf] |
| 139 |
|
; |
| 140 |
|
; Land in this context when have left an animal conference. |
| 141 |
|
; Conference ID is embedded in the channel name |
| 142 |
|
; Use AGI to decrement the pin conference database for this particular conference |
| 143 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 144 |
|
exten => s,n,AGI(leave_animal_conf.agi,${CHANNEL:13:3}) |
| 145 |
|
exten => s,n,Hangup |
| 146 |
|
|
| 147 |
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 148 |
|
; |
| 149 |
|
; Conference Recording |
| 150 |
|
; |
| 151 |
|
[confrecord_menu] |
| 152 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 153 |
|
exten => s,2,Set(OVERLAY=id=text_box&header=Conference Record&line1=1 Start/Record New&line2= Conference&line3=2 Enter Existing Conference&line4=3 Replay Conference&line5=4 Demo Menu&footer=Diastar) |
| 154 |
|
exten => s,3,Set(TIMEOUT_CNT=0) |
| 155 |
|
exten => s,4,WoomeraBackground(${APPNAME}/confrecord_menu,${APPNAME}/black,${OVERLAY}) |
| 156 |
|
exten => s,5,WaitExten(30) |
| 157 |
|
exten => 1,1,Goto(confrecord,1,1) |
| 158 |
|
exten => 2,1,Goto(confrecord,2,1) |
| 159 |
|
exten => 3,1,Goto(confrecord,3,1) |
| 160 |
|
exten => 4,1,Goto(demo_menu,s,1) |
| 161 |
|
exten => t,1,Set(TIMEOUT_CNT=$[${TIMEOUT_CNT} + 1]) |
| 162 |
|
exten => t,n,GotoIf($[${TIMEOUT_CNT} > 1]?hangup,s,1) |
| 163 |
|
exten => t,n,WoomeraStop |
| 164 |
|
exten => t,n,Goto(confrecord_menu,s,4) |
| 165 |
|
exten => i,1,Goto(confrecord_menu,s,1) |
| 166 |
|
|
| 167 |
|
[confrecord] |
| 168 |
|
; This conferee enters the recorded conference, already knowing the conference PIN |
| 169 |
|
; Recording is only started and stopped by the first person who generates the conferenc PIN |
| 170 |
|
; This one enters and triggers recording |
| 171 |
|
; And ends conference record on leaving |
| 172 |
|
exten => 1,1,Answer |
| 173 |
|
exten => 1,n,Set(CHANNEL(language)=en_US) |
| 174 |
|
exten => 1,n,AGI(enter_new_conf_record.agi) |
| 175 |
|
; Get either the next available ID or "NONE" - all conferences in use |
| 176 |
|
exten => 1,n,GotoIf($["${CONF_RECORD_ID}" = "NONE"]?all_confs_in_use,s,1) |
| 177 |
|
exten => 1,n,System(${AMI_SCRIPT_LOC}/confrec_originate.sh ${CONF_RECORD_ID}) |
| 178 |
|
exten => 1,n,Dial(WOOMERA/conf:${CONF_RECORD_ID}/tiles=2,30,F(done_with_recorded_conference^s^1)) |
| 179 |
|
|
| 180 |
|
exten => 2,1,Answer |
| 181 |
|
exten => 2,n,Set(CHANNEL(language)=en_US) |
| 182 |
|
exten => 2,n,Goto(get_existing_recorded_pin,s,1) |
| 183 |
|
|
| 184 |
|
; Conference recording playback - |
| 185 |
|
exten => 3,1,Answer |
| 186 |
|
exten => 3,n,Set(CHANNEL(language)=en_US) |
| 187 |
|
exten => 3,n,Verbose(Replay conference recording) |
| 188 |
|
exten => 3,n,Goto(get_pin_for_replay,s,1) |
| 189 |
|
|
| 190 |
|
; Conexts to trigger conference recording. Extension and recording file name |
| 191 |
|
; corresponds to conference ID |
| 192 |
|
; Recording terminates when the originator leaves the conference |
| 193 |
|
[conf_record_131] |
| 194 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 195 |
|
exten => s,n,WoomeraRecord(${CONF_RECORDING_LOC}/conference_recording_131,${CONF_RECORDING_LOC}/conference_recording_131,${MAX_CONF_RECORD_TIME}) |
| 196 |
|
exten => s,n,Hangup |
| 197 |
|
[conf_record_132] |
| 198 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 199 |
|
exten => s,n,WoomeraRecord(${CONF_RECORDING_LOC}/conference_recording_132,${CONF_RECORDING_LOC}/conference_recording_132,${MAX_CONF_RECORD_TIME}) |
| 200 |
|
exten => s,n,Hangup |
| 201 |
|
[conf_record_133] |
| 202 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 203 |
|
exten => s,n,WoomeraRecord(${CONF_RECORDING_LOC}/conference_recording_133,${CONF_RECORDING_LOC}/conference_recording_133,${MAX_CONF_RECORD_TIME}) |
| 204 |
|
exten => s,n,Hangup |
| 205 |
|
[conf_record_134] |
| 206 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 207 |
|
exten => s,n,WoomeraRecord(${CONF_RECORDING_LOC}/conference_recording_134,${CONF_RECORDING_LOC}/conference_recording_134,${MAX_CONF_RECORD_TIME}) |
| 208 |
|
exten => s,n,Hangup |
| 209 |
|
[conf_record_135] |
| 210 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 211 |
|
exten => s,n,WoomeraRecord(${CONF_RECORDING_LOC}/conference_recording_135,${CONF_RECORDING_LOC}/conference_recording_135,${MAX_CONF_RECORD_TIME}) |
| 212 |
|
exten => s,n,Hangup |
| 213 |
|
[conf_record_136] |
| 214 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 215 |
|
exten => s,n,WoomeraRecord(${CONF_RECORDING_LOC}/conference_recording_136,${CONF_RECORDING_LOC}/conference_recording_136,${MAX_CONF_RECORD_TIME}) |
| 216 |
|
exten => s,n,Hangup |
| 217 |
|
|
| 218 |
|
[done_with_recorded_conference] |
| 219 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 220 |
|
exten => s,n,AGI(leave_recorded_conf.agi, ${CHANNEL}) |
| 221 |
|
exten => s,n,System(${AMI_SCRIPT_LOC}/confrec_hangup.sh ${CHANNEL}) |
| 222 |
|
exten => s,n,Hangup |
| 223 |
|
|
| 224 |
|
; Enter Existing Conference |
| 225 |
|
;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 226 |
|
|
| 227 |
|
[get_existing_recorded_pin] |
| 228 |
|
; |
| 229 |
|
; AGI script will check DB to validate conference ID. If OK, |
| 230 |
|
; we put him into that conference |
| 231 |
|
|
| 232 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=Conference Record&line1=Please enter your 3&line2=digit conference PIN&footer=Diastar) |
| 233 |
|
exten => s,2,Set(TIMEOUT_CNT=0) |
| 234 |
|
exten => s,3,WoomeraBackground(${APPNAME}/pin_entry_prompt,${APPNAME}/black,${OVERLAY}) |
| 235 |
|
exten => s,4,WaitExten(10) |
| 236 |
|
; 131-136 are valid entries |
| 237 |
|
exten => _XXX,1,AGI(validate_record_pin.agi, ${EXTEN}) |
| 238 |
|
exten => _XXX,n,Set(COLLECTED_PIN=${EXTEN}) |
| 239 |
|
exten => _XXX,n,GotoIf($["${VALID_RECORD_PIN}" = "T"]?join_existing_recorded_conference,s,1) |
| 240 |
|
exten => _XXX,n,GotoIf($["${VALID_RECORD_PIN}" = "F"]?bad_pin_for_recorded_conf,s,1) |
| 241 |
|
exten => t,1,Set(TIMEOUT_CNT=$[${TIMEOUT_CNT} + 1]) |
| 242 |
|
exten => t,n,GotoIf($[${TIMEOUT_CNT} > 1]?hangup,s,1) |
| 243 |
|
|
| 244 |
|
exten => t,n,WoomeraStop |
| 245 |
|
exten => t,n,Goto(get_existing_recorded_pin,s,3) |
| 246 |
|
exten => i,1,Goto(get_existing_recorded_pin,s,1) |
| 247 |
|
|
| 248 |
|
[bad_pin_for_recorded_conf] |
| 249 |
|
; |
| 250 |
|
; Deliver "Entered bad PIN" message and resolicit |
| 251 |
|
|
| 252 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=Conference Record&line1=Invalid PIN&line2=Please re-enter PIN&footer=Diastar) |
| 253 |
|
exten => s,n,WoomeraBackground(${APPNAME}/bad_pin,${APPNAME}/black,${OVERLAY}) |
| 254 |
|
exten => s,n,WaitExten(6) |
| 255 |
|
exten => t,1,WoomeraStop |
| 256 |
|
exten => t,n,Goto(get_existing_recorded_pin,s,1) |
| 257 |
|
|
| 258 |
|
[join_existing_recorded_conference] |
| 259 |
|
; |
| 260 |
|
; Good conference PIN - can join recorded conference |
| 261 |
|
exten => s,1,AGI(enter_existing_recorded_conf.agi,${COLLECTED_PIN}) |
| 262 |
|
; When done with the conference [done_with_recorded_conference] context will take care |
| 263 |
|
; of DB update that marks a caller leaving the conference |
| 264 |
|
exten => s,n,Dial(WOOMERA/conf:${COLLECTED_PIN}/tiles=4,30,F(done_with_recorded_conference^s^1)) |
| 265 |
|
|
| 266 |
|
; Replay |
| 267 |
|
;;;;;;;; |
| 268 |
|
|
| 269 |
|
[get_pin_for_replay] |
| 270 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=Conference Record&line1=Please enter the 3&line2=digit conference ID&line3=to replay&footer=Diastar) |
| 271 |
|
exten => s,n,WoomeraBackground(${APPNAME}/enter_replay_id,${APPNAME}/black,${OVERLAY}) |
| 272 |
|
exten => s,n,WaitExten(15) |
| 273 |
|
; 131-136 are valid entries |
| 274 |
|
exten => _XXX,1,AGI(validate_record_pin_for_replay.agi, ${EXTEN}) |
| 275 |
|
exten => _XXX,n,Set(COLLECTED_PIN=${EXTEN}) |
| 276 |
|
exten => _XXX,n,GotoIf($["${VALID_RECORD_PIN}" = "F"]?bad_record_pin,s,1) |
| 277 |
|
; |
| 278 |
|
; Play one of the recordings |
| 279 |
|
exten => _XXX,n,WoomeraPlayback(confrecord/conference_recording_${COLLECTED_PIN},confrecord/conference_recording_${COLLECTED_PIN}) |
| 280 |
|
exten => _XXX,n,Hangup |
| 281 |
|
exten => t,1,WoomeraStop |
| 282 |
|
exten => t,n,Goto(get_pin_for_replay,s,1) |
| 283 |
|
exten => i,1,Goto(get_pin_for_replay,s,1) |
| 284 |
|
|
| 285 |
|
[bad_record_pin] |
| 286 |
|
; |
| 287 |
|
; Deliver "Entered bad PIN" message and resolicit |
| 288 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=Conference Record&line1=Invalid PIN&line2=Please re-enter PIN&footer=Diastar) |
| 289 |
|
exten => s,n,WoomeraBackground(${APPNAME}/bad_pin,${APPNAME}/black,${OVERLAY}) |
| 290 |
|
exten => s,n,WaitExten(6) |
| 291 |
|
exten => t,1,WoomeraStop |
| 292 |
|
exten => t,n,Goto(get_pin_for_replay,s,1) |
| 293 |
|
|
| 294 |
|
|
| 295 |
|
|
| 296 |
|
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 297 |
|
; |
| 298 |
|
; Controlled Conference |
| 299 |
|
; Assumes that conference ids used are configured with "mode = controlled" on DiaStar. |
| 300 |
; |
; |
| 301 |
; The controller's connection in managed by the dialplan by passing the 'G' |
; The controller's connection in managed by the dialplan by passing the 'G' |
| 302 |
; option to the Dial() application. This has been done to allow an image to be |
; option to the Dial() application. This has been done to allow an image to be |
| 304 |
; controllers audio remains connected at all times and should be muted locally |
; controllers audio remains connected at all times and should be muted locally |
| 305 |
; if necessary. |
; if necessary. |
| 306 |
; |
; |
| 307 |
; Entry points: |
|
| 308 |
; |
[controlled_conf_menu] |
|
; Controller controlled_conf,1,1 |
|
|
; Presenter(s) controlled_conf,2,1 |
|
|
; Attendee(s) controlled_conf,3,1 |
|
|
; |
|
|
;------------------------------------------------------------------------------- |
|
|
; |
|
|
[controlled_conf] |
|
| 309 |
; |
; |
| 310 |
|
; A file-based DB keeps track of the allowed conferences and the number of participants |
| 311 |
|
; in each. The caller is asked if he wants to start a new conference, in which case an ID |
| 312 |
|
; is supplied, the DB record updated accordingly and the caller is the first conferee in |
| 313 |
|
; that conference. He relays the ID to other people and they call in and enter the conference |
| 314 |
|
; by supplying the ID. |
| 315 |
|
|
| 316 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 317 |
|
exten => s,2,Set(OVERLAY=id=text_box&header=Controlled Conference&line1=1 Start New Conference&line2= as Controller&line3=2 Enter as Presenter&line4=3 Enter as Atendee&line5=4 Demo Menu&footer=Diastar) |
| 318 |
|
exten => s,3,Set(TIMEOUT_CNT=0) |
| 319 |
|
exten => s,4,WoomeraBackground(${APPNAME}/controlled_conf_menu,${APPNAME}/black,${OVERLAY}) |
| 320 |
|
exten => s,5,WaitExten(35) |
| 321 |
|
exten => 1,1,Goto(controller,s,1) |
| 322 |
|
exten => 2,1,Set(CONFEREE_TYPE=presenter) |
| 323 |
|
exten => 2,n,Goto(get_controlled_pin,s,1) |
| 324 |
|
exten => 3,1,Set(CONFEREE_TYPE=attendee) |
| 325 |
|
exten => 3,n,Goto(get_controlled_pin,s,1) |
| 326 |
|
exten => 4,1,Goto(demo_menu,s,1) |
| 327 |
|
exten => t,1,Set(TIMEOUT_CNT=$[${TIMEOUT_CNT} + 1]) |
| 328 |
|
exten => t,n,GotoIf($[${TIMEOUT_CNT} > 1]?hangup,s,1) |
| 329 |
|
exten => t,n,WoomeraStop |
| 330 |
|
exten => t,n,Goto(controlled_conf_menu,s,4) |
| 331 |
|
exten => i,1,Goto(controlled_conf_menu,s,1) |
| 332 |
|
|
| 333 |
|
|
| 334 |
|
[controller] |
| 335 |
; The conference controller dials into here. |
; The conference controller dials into here. |
| 336 |
; Setting the number of tiles to 0, overrides the configuration and allows for |
; Setting the number of tiles to 0, overrides the configuration and allows for |
| 337 |
; the number of tiles shown to grow and shrink dynamically along with the number |
; the number of tiles shown to grow and shrink dynamically along with the number |
| 338 |
; of presenters. |
; of presenters. |
| 339 |
; |
; |
| 340 |
exten => 1,1,Answer |
; |
| 341 |
exten => 1,n,Wait(2) |
; AGI script will check DB for next available conference ID and voice it to caller. |
| 342 |
exten => 1,n,Set(_PARENT=${CHANNEL}) |
; Then we put him into that conference. Conferencd ID returned in PIN_CONF_ID |
|
exten => 1,n,Dial(WOOMERA/${WOOMERA_PROFILE}/conf:1/role=controller:tiles=0,30,G(cc_connected,s,1)) |
|
|
exten => 1,n,Hangup |
|
| 343 |
|
|
| 344 |
; Presenters dial into here. These are full members of the conference whose |
exten => s,1,Set(_PARENT=${CHANNEL}) |
| 345 |
; media are included in the output. |
exten => s,n,WoomeraPlayback(${APPNAME}/new_controlled_conference) |
| 346 |
|
exten => s,n,AGI(enter_new_controlled_conf.agi) |
| 347 |
|
; |
| 348 |
|
; Get either the next available ID or "NONE" - all conferences in use |
| 349 |
|
exten => s,n,GotoIf($["${CONTROLLED_CONF_ID}" = "NONE"]?all_confs_in_use,s,1) |
| 350 |
|
exten => s,n,Dial(WOOMERA/${WOOMERA_PROFILE}/conf:${CONTROLLED_CONF_ID}/role=controller:tiles=0,30,G(cc_connected,s,1))) |
| 351 |
|
exten => s,n,Hangup |
| 352 |
|
|
| 353 |
|
[get_controlled_pin] |
| 354 |
; |
; |
| 355 |
exten => 2,1,Answer |
; AGI script will check DB to validate conference ID. If OK, |
| 356 |
exten => 2,n,Wait(2) |
; we put him into that conference |
|
exten => 2,n,Dial(WOOMERA/${WOOMERA_PROFILE}/conf:1/role=presenter,30) |
|
|
exten => 2,n,Hangup |
|
| 357 |
|
|
| 358 |
; Attendees dial into here. These are passive observers of the conference whose |
exten => s,1,Set(OVERLAY=id=text_box&header=Controlled Conference&line1=Please enter your 3&line2=digit conference PIN&footer=Diastar) |
| 359 |
|
exten => s,2,Set(TIMEOUT_CNT=0) |
| 360 |
|
exten => s,3,WoomeraBackground(${APPNAME}/pin_entry_prompt,${APPNAME}/black,${OVERLAY}) |
| 361 |
|
exten => s,4,WaitExten(10) |
| 362 |
|
; 111-116 are valid entries |
| 363 |
|
exten => _XXX,1,AGI(validate_controlled_conf.agi, ${EXTEN}) |
| 364 |
|
exten => _XXX,n,Set(COLLECTED_PIN=${EXTEN}) |
| 365 |
|
exten => _XXX,n,GotoIf($["${VALID_PIN}" = "T"]?enter_existing_controlled_conf,s,1) |
| 366 |
|
exten => _XXX,n,GotoIf($["${VALID_PIN}" = "F"]?bad_controlled_pin,s,1) |
| 367 |
|
exten => t,1,Set(TIMEOUT_CNT=$[${TIMEOUT_CNT} + 1]) |
| 368 |
|
exten => t,n,GotoIf($[${TIMEOUT_CNT} > 1]?hangup,s,1) |
| 369 |
|
exten => t,n,WoomeraStop |
| 370 |
|
exten => t,n,Goto(get_controlled_pin,s,3) |
| 371 |
|
exten => i,1,Goto(get_controlled_pin,s,1) |
| 372 |
|
|
| 373 |
|
[bad_controlled_pin] |
| 374 |
|
; |
| 375 |
|
; Deliver "Entered bad PIN" message and resolicit |
| 376 |
|
|
| 377 |
|
exten => s,1,Set(OVERLAY=id=text_box&header=Controlled Conference&line1=Invalid PIN&line2=Please re-enter PIN&footer=Diastar) |
| 378 |
|
exten => s,n,WoomeraBackground(${APPNAME}/bad_pin,${APPNAME}/black,${OVERLAY}) |
| 379 |
|
exten => s,n,WaitExten(6) |
| 380 |
|
exten => t,1,WoomeraStop |
| 381 |
|
exten => t,n,Goto(get_controlled_pin,s,1) |
| 382 |
|
|
| 383 |
|
[enter_existing_controlled_conf] |
| 384 |
|
; Presenters are full members of the conference whose |
| 385 |
|
; media are included in the output. |
| 386 |
|
; |
| 387 |
|
; Attendees are passive observers of the conference whose |
| 388 |
; own media are not included in the output. |
; own media are not included in the output. |
| 389 |
; |
; |
| 390 |
exten => 3,1,Answer |
; Both enter a conference here. |
| 391 |
exten => 3,n,Wait(2) |
exten => s,1,AGI(enter_existing_controlled_conf.agi,${CONTROLLED_CONF_ID}) |
| 392 |
exten => 3,n,Dial(WOOMERA/${WOOMERA_PROFILE}/conf:1/role=attendee,30) |
exten => s,n,Dial(WOOMERA/${WOOMERA_PROFILE}/conf:${CONTROLLED_CONF_ID}/role=${CONFEREE_TYPE},30) |
| 393 |
exten => 3,n,Hangup |
exten => s.n,Hangup |
| 394 |
|
|
| 395 |
; Invalid number. |
[remove_from_controlled_conf] |
| 396 |
exten => i,1,Hangup |
; The conference controller lands in this context when he leaves a controlled conference. |
| 397 |
|
; Extension matches conference ID to decrement. |
| 398 |
|
; Use AGI to set the pin conference database to zer for this particular conference, since |
| 399 |
|
; everyone will be tossed out when the controller leaves |
| 400 |
|
exten => s,1,Set(CHANNEL(language)=en_US) |
| 401 |
|
; Conference ID is embedded in the channel name |
| 402 |
|
exten => s,n,AGI(leave_controlled_conf.agi,${CHANNEL:14:3}) |
| 403 |
|
exten => s,n,Hangup |
| 404 |
|
|
| 405 |
|
[cc_connected] |
| 406 |
; When the conference controller call connects to the conference, the Dial() |
; When the conference controller call connects to the conference, the Dial() |
| 407 |
; application jumps to the context. |
; application jumps to the context. |
| 408 |
; |
; |
|
[cc_connected] |
|
| 409 |
exten => s,1,Goto(cc_caller,s,1) |
exten => s,1,Goto(cc_caller,s,1) |
| 410 |
exten => s,2,Goto(cc_callee,s,1) |
exten => s,2,Goto(cc_callee,s,1) |
| 411 |
|
|
| 423 |
exten => s,1,Set(CHANNEL(language)=en_US) |
exten => s,1,Set(CHANNEL(language)=en_US) |
| 424 |
exten => s,n,WoomeraBackground(,conference_demo/diastar-video-conf) |
exten => s,n,WoomeraBackground(,conference_demo/diastar-video-conf) |
| 425 |
exten => s,n,Bridge(${PARENT}) |
exten => s,n,Bridge(${PARENT}) |
| 426 |
|
; After controller hangs up, we continue here and need to zero out the |
| 427 |
|
; number of people in the conference |
| 428 |
|
exten => s,n,Goto(remove_from_controlled_conf,s,1) |
| 429 |
exten => s,n,Hangup |
exten => s,n,Hangup |
|
exten => t,1,NoOp |
|
|
exten => h,1,Hangup |
|
|
|
|
| 430 |
;------------------------------------------------------------------------------- |
;------------------------------------------------------------------------------- |
| 431 |
|
|
| 432 |
|
|