System information

been dialed and answered (or perhaps not answered), the organizer will be placed into
the call, at which point the meeting will start.
This type of functionality increases the likelihood that the meeting will start on time,
and it means the meeting organizer doesn’t have to continually perform roll call as new
participants continue to join after the call is supposed to start (which invariably hap-
pens, with people’s schedules typically being fairly busy).
The dialplan we’re going to show you isn’t necessarily a polished, production-ready
installation (for example, the data returned from the calendar comes from the descrip-
tion field, only deals with device names, and assumes the technology is SIP). However,
we’ve done the hard work for you by developing the Local channel usage, along with
the M() flag (macro) usage with Dial(). With some testing and tweaks this code could
certainly be developed more fully for your particular installation, but we’ve kept it
general to allow for it to be usable for more people in more situations. The example
dialplan looks like this:
[AutomatedMeetingSetup]
exten => start,1,Verbose(2,Calling multiple people and placing into a conference)
; Get information from calendar and save that information. Prefix
; CalLocation with an underscore so it is available to the Local
; channel (variable inheritance).
;
same => n,Set(CalDescription=${CALENDAR_EVENT(description)})
same => n,Set(_CalLocation=${CALENDAR_EVENT(location)})
same => n,Set(X=1)
; Our separator is a caret (^), so the description should be in the
; format of: 0000FFFF0001^0000FFFF0002^etc...
;
same => n,Set(EndPoint=${CUT(CalDescription,^,${X})})
; This loop is used to build the ${ToDial} variable, which contains
; a list of Local channels to be dialed, thereby triggering the multiple
; Originate() actions simultaneously instead of linearly
;
same => n,While($[${EXISTS(${EndPoint})}])
; This statement must be on a single line
same => n,Set(ToDial=${IF($[${ISNULL(${ToDial})}]?
:${ToDial}&)}Local/${EndPoint}@MeetingOriginator)
same => n,Set(X=$[${X} + 1])
same => n,Set(EndPoint=${CUT(CalDescription,^,${X})})
same => n,EndWhile()
; If no values are passed back, then don't bother dialing
same => n,GotoIf($[${ISNULL(${ToDial})}]?hangup)
same => n,Dial(${ToDial})
; After our Dial() statement returns, we should be placed into
; the conference room. We are marked, so the conference can start
; (which is indicated by the 'A' flag to MeetMe).
406 | Chapter 18:External Services