This is a basic configuration for a Conference Bridge Application using ARI and Node.js.
This application requires Node.js 0.10.X.
$git clone https://github.com/semidy/node-confbridge-js.git
$npm install$npm install pgOnce you have created and configured your database, you will want to modify the dbConnection in the config.json to point to your database. For example:
postgres://user:secret@localhost/userRun the following commands to create and/or reset all default tables, indexes, user profile, group profile, and bridge profile settings:
$cd scripts
$node defaultdatabase.jsAfter you have created and configured your specific database and run the defaultdatabase.js script, you are now able to setup your own specific user, group, and bridge profiles, within the scripts folder, that are to be added to the database.
Run the following commands to add a new user to the database:
$node adduser.jsRun the following commands to add a new group to the database:
$node addgroup.jsRun the following commands to add a new bridge to the database:
$node addbridge.jsModify the ariConnection in the config.json to point to your Asterisk Instance.
Add the following to your dialplan to test the default connection:
exten => 8888,1,NoOp()
same => n,Stasis(confbridge)
same => n,Hangup()Also you can add the name of your user_type and group_type in the stasis application if you have changed it from default. For example:
exten => 9999,1,NoOp()
same => n,Stasis(confbridge, usertypename, grouptypename)
same => n,Hangup()Start the application:
$node app.jsDial 8888
- Press 1 to toggle mute on and off
- Press 2 to toggle deafmute on and off
- Press 3 to leave the conference and execute dialplan(which can have a specified context, extension, and priority within the config.json)
- Press 4 to decrease the speakers volume
- Press 5 to reset the speakers volume
- press 6 to increase the speakers volume
- Press 7 to decrease microphone volume
- Press 8 to reset microphone volume
- Press 9 to increase microphone volume
- Press 0 to change microphone pitch from normal to low to high
- Press # to access the admin menu(if you have admin set to true in user profile)
- Press 1 to toggle the bridge lock on and off
- Press 2 to kick the last user that joined the conference
- Press 3 to record the conference, if it isn't already recording, but if the conference is already recording then it toggles pausing and unpausing the recording
- Press # to return to the normal menu
These are the various options that are specified in the database for users, groups, and bridges.
The name of the bridge profile.
- type: varchar(50)
- default: default
Determines what sound is to be played when a user joins the conference. The user profile option quiet must be set to false.
- type: varchar(50)
- default: confbridge-join
Determines what sound is to be played when a user leaves the conference. The user profile option quiet must be set to false.
- type: varchar(50)
- default: confbridge-leave
The PIN number that users must enter in order to join the conference. The user profile option pin_auth must be set to true.
- type: integer
- default: 1234
Determines the number of retries a user is allowed while entering the PIN. The user profile option pin_auth must be set to true.
- type: integer
- default: 3
Determines what sound is played when the user is prompted to enter in a PIN number. The user profile option pin_auth must be set to true.
- type: varchar(50)
- default: conf-getpin
Determines what sound is played if the user enters an invalid PIN number. the user profile option pin_auth must be set to true.
- type: varchar(50)
- default: conf-invalidpin
Determines what sound is played if the user attempts to join a locked conference.
- type: varchar(50)
- default: confbridge-lock-no-join
Determines what sound is played when an admin locks the conference.
- type: varchar(50)
- default: confbridge-locked
Determines what sound is played when an admin unlocks the conference.
- type: varchar(50)
- default: confbridge-unlocked
Determines what sound is played when a channel is muted.
- type: varchar(50)
- default: confbridge-muted
Determines what sound is played when a channel is unmuted.
- type: varchar(50)
- default: confbridge-unmuted
Determines what sound is played when a user is kicked out of the conference.
- type: varchar(50)
- default: confbridge-removed
Determines whether or not the conference starts off recording after the first user is present within the conference.
- type: boolean
- default: false
Determines what sound is played when the conference starts or resumes recording
- type: varchar(50)
- default: conf-now-recording
Determines what sound is played when a follower is waiting for a leader to join the conference.
- type: varchar(50)
- default: conf-waitforleader
The name of the user profile.
- type: varchar(50)
- default: default
Determines whether or not a user is assigned admin functionality within the conference, such as access to the admin menu.
- type: boolean
- default: false
plays music on hold when there is one participant in the conference.
- type: boolean
- default: true
Determines whether there is a sound to be played when a user enters or leaves the conference.
- type: boolean
- default: false
Determines whether or not a user is required to have to enter in a PIN number in order to join the conference.
- type: boolean
- default: false
The name of the group profile.
- type: varchar(50)
- default: default
Determines how a group shall behave within the conference. There are three types of group behavior options that can be specified in the group profile and each of them have differing functional conferencing purposes.
- type: varchar(50)
- default: participant
- participant: the group in which the user can join the conference as a normal user. If no group is specified, this becomes the default group.
- follower: the group that receives music on hold until a leader joins, once a leader joins the conference they enter the conference as well.
- leader: the group that the followers wait on in order to join the conference
Determines how many users are allowed in each specified group.
- type: integer
- default: 100