dcsimg
December 2, 2016
Hot Topics:

Introduction to CCXML, Part V

  • December 7, 2002
  • By Jonathan Eisenzopf
  • Send Email »
  • More Articles »

getConference

The getConference subroutine in the Perl script contains CCXML content which answers the call and plays the get_conference_code.vxml VoiceXML dialog. This dialog prompts the caller for their conference number, which is then returned to the CCXML program and assigned to the conference_code variable. The value of this variable is appended to the URL of the next attribute of the goto element for the dialog.exit event handler:

'$thisURL?conference_code='+conference_code

In effect, this executes the Perl script a second time, passing in the conference_code variable.

createConference

The createConference subroutine is executed after the caller has provided their conference number. The script checks for the existance of a file in the directory defined by the $conferenceDirectory variable whose filename is the same as the conference number. If the file doesn't exist, we assume that this is the first caller and that the conference needs to be created. 

One of the first things this subroutine does is in fact create the conference token file in the $conferenceDirectory directory.

Next, the name of the conference is set within the <createconference> element by combining the string conference_ with the unique conference number:

<createconference 
  name="conference_$conferenceCode" />

Once the conference has been successfully created, the caller will hear a prompt indicating that they are the first caller in the conference:

<dialogstart callid="in_callerid" 
  src="'/voicexmlplanet/34/first_caller.vxml'"/>

joinConference

The joinConference subroutine is executed after the caller has provided their conference number and the main body of the script detects that the token file for the conference number exists, meaning that the conference call has already been initiated:

<join sessionid1="in_callerid" 
      sessionid2="conference_$conferenceCode" />

The session1 and session2 attributes of the <join> element specify the two call legs to join, the first one being the id of the caller joining the conference call, and the second one being the unique conference call id.

Once the <join> is successful, a prompt indicating that the caller has joined the conference call is played:

<dialogstart 
 src="'/voicexmlplanet/34/joined_conference.vxml'"/>

Conclusion

Things that should be added to this script in the future are better error handling routines that would end the conference call gracefully. Another drawback of the script is that you can never re-use the conference numbers (unless you delete the token files). Nonetheless, you can use this script as a template to develop more complex conferencing solutions. If you study the script, you will also get a better idea of the conferencing concept where the first caller creates the conference and subsequent callers join the conference. Joining callers to the conference involves patching the caller's unique caller id into the unique conference id.

About Jonathan Eisenzopf

Jonathan is a member of the Ferrum Group, LLC  which specializes in Voice Web consulting and training. Feel free to send an email to eisen@ferrumgroup.com regarding questions or comments about this or any article.





Page 2 of 2



Comment and Contribute

 


(Maximum characters: 1200). You have characters left.

 

 


Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.

Sitemap | Contact Us

Thanks for your registration, follow us on our social networks to keep up-to-date
Rocket Fuel