-
Notifications
You must be signed in to change notification settings - Fork 1
Getting Started
To get started, you need to have the following things installed on your system:
- Erlang (with crypto support) – The latest version is recommended, R13B01 is the minimum version suppported.
- FreeSWITCH (with mod_erlang_event installed and enabled) Install Guide.
- Ruby/Rake
- git – to fetch the OpenACD source
There’s a good chance that your distro doesn’t provide a modern erlang (12b5 is still very common). Unfortunately Erlang is still a somewhat obscure language so the packages don’t get updated often. This is a problem because OpenACD depends on several fixes/features in more recent Erlang releases (the new releases are also quite a bit faster, especially on multicore hardware).
Therefore, he’s a crash course in building erlang from scratch:
- Fetch the latest release from erlang.org
- Untar it somewhere
- Install the OpenSSL development headers (libssl-dev, openssl-devel or whatever the heck your distro names it). For CentOS 5 openssl is too old so do not install openssl-devel, instead install openssl from source. With default options openssl will install into /usr/local/ssl. Please note to use “./config shared” before compiling openssl, or the needed shared libraries will not be compiled. Then, when following erlang’s source installation instructions, add options “—enable-dynamic-ssl-lib —with-ssl=/usr/local/ssl” when erlang ./configure script.
- Run `./configure` and check that it completes and doesn’t complain about the ‘crypto’ application. You can ignore warnings about wx, odbc, jinterface, etc. Ensure file lib/crypto/SKIP does not exist after this step, otherwise erlang will silently not install ssl support.
- Run `make` and check it completes OK
- Run `sudo make install`
The software has been tested to work on Windows, but its currently not supported there.
Once you’ve installed the dependancies, checkout the OpenACD repository somewhere. Then, cd into the OpenACD directory and run ‘rake’. If compilation is successful you should see a success banner giving you some further instructions.
Follow the instructions by running ./boot.rb to launch OpenACD. You’ll then be in an erlang shell where you can evaluate code and issue commands. For now though, open a browser and browse to http://localhost:9999 or whatever the hostname/IP of the machine you’re running OpenACD on is. You should be presented with a login box – use the credentials of administrator/Password123 as noted in the banner you got when you compiled OpenACD. From here, you can configure all aspects of the system.
One of the first things you’ll likely want to do is configure FreeSWITCH interconnection (so calls can get into queue, agents can make outbound calls, etc). In the administration page, click the ‘Media Types’ tab at the top and select ‘freeswitch_media_manager’ from the sidebar. You can now configure the node name of the FreeSWITCH mod_erlang_event instance (it defaults to freeswitch@hostname where hostname is the name of the machine) and the dial string, which is the string used to dial external numbers (outbound calls, agents using a landline, etc). The dial string is described in the tooltip on the page and further information on it can be found on the FreeSWITCH wiki.
To send calls into an OpenACD queue from a FreeSWITCH dialplan, you can configure an extension like the following:
<extension name="My Client's Extension">
<condition field="destination_number" expression="^5551234$">
<action application="answer"/>
<action application="set" data="domain_name=$${domain}"/>
<action application="set" data="brand=1"/>
<action application="set" data="queue=MyQueue"/>
<action application="set" data="allow_voicemail=true"/>
<action application="erlang_sendmsg" data="freeswitch_media_manager nodename@hostname inivr ${uuid}"/>
<action application="playback" data="hello.wav"/>
<action application="erlang" data="freeswitch_media_manager:! nodename@hostname"/>
</condition>
</extension>
So if the call’s destination number matches 5551234 the call is tagged as being for Brand 1, set to be put into a queue named ‘MyQueue’, allowed to leave a voicemail while waiting in queue (by pressing *), OpenACD is sent a message that the call is in IVR (in case you have a long IVR or you wish to track IVR abandonment), a sound file is played and then the call control is yielded to OpenACD. You’ll need to change the erlang nodename to match your setup (obviously). Once the call hits the last step of the dialplan, its put in the queue ‘MyQueue’ (or, if that does not exist, the default queue), played music on hold and waits for an agent to be available.
Be sure you add this to FreeSWITCH where it is not superseded by another dialplan. FreeSWITCH loads files alphabetically, so conf/dialplan/public/00_openacd.xml should ensure it gets used.
The following modules should be enabled in FreeSWITCH’s modules.conf:
- mod_logfile
- mod_console
- mod_event_socket (if you want to use fs_cli)
- mod_erlang_event
- mod_sofia
- mod_commands
- mod_dptools
- mod_commands
- mod_expr
- mod_dialplan_xml
- mod_say_en
You should also enable (or leave enabled) any file format/codec interface modules you plan to use. One module you’ll probably want to disable is mod_voicemail because it can interfere with registrations.
Agents, when they login are allowed to select the telephone device they can be reached at. This includes SIP registrations, SIP URIs and PSTN numbers. If the agent select SIP registration and doesn’t configure a registration name, it defaults to their login name. So an agent logging in as ‘agent’ would configure their phone to register to FreeSWITCH as ‘agent’ with the password their OpenACD account authenticates with. OpenACD computes the a1-hash and serves it to FreeSWITCH so the phone can share credentials with the agent. However, this means that the agent MUST log into the web interface on port 5050 BEFORE they register their phone, or the registration will fail.
Alternatively, a normal FreeSWITCH user directory can be provisioned and the user can enter the registration name in the field provided. They can also provide a sip URI or a normal telephone number to be reached at.