I then installed and tried both version .26 and .27 of the Flash Operator Panel, but can't get it to work completely. I'm trying to drag one phone to the other to create a call, however when I do this the first phone rings and when I answer, the 2nd never rings and the first simply hangs up. I ran op_server.pl with debug on and it looks like the callerid variable is never getting set so it doesn't know where to dial back to.
** DIGEST_EVENT: GOT SIP/D3877|ocupado1|&incoming,[]|1153925740.55-0|SIP/D3877-9666
** DIGEST_EVENT: canal: SIP/D3877
** DIGEST_EVENT: quehace: ocupado1
** DIGEST_EVENT: dos: &incoming,[] <------ BLANK????
** DIGEST_EVENT: uniqueid: 1153925740.55-0
** DIGEST_EVENT: canalid: SIP/D3877-9666
Below is my op_buttons.cfg:
[SIP/D3877]
Position=1
Label='D3877';
Extension=3877
Context=internal
Mailbox=100@internal
No_Rectangle=0
Background=bg.jpg
Privacy=false
callerid='D3877'
[SIP/D3878]
Position=n
Label='D3878'
callerid='D3878'
Extension=3878
Context=internal
Mailbox=101@internal
Icon=1
Here is the output I get from the Asterisk console as well:
-- Executing Goto('SIP/D3877-9666', 'internal') in new stack
Jul 26 09:55:45 NOTICE[11816]: pbx.c:1753 pbx_extension_helper: No such label 'internal' in extension 's' in context 'default'
Jul 26 09:55:45 WARNING[11816]: pbx.c:6514 ast_parseable_goto: Priority 'internal' must be a number > 0, or valid label
Spawn extension (default, s, 1) exited non-zero on 'SIP/D3877-9666'
Any help is appreciated, thanks.
- You need PERL and basic knowledge on how to use Asterisk, if you want to learn Asterisk start here and come back later.
- You have to add a user to asterisk's manager.conf and reload asterisk for the changes to take effect.
- For better compatibility you should use Asterisk 1.2. Most functionality is available in Asterisk 1.0 but with some glitches.
- You also need to define in your dialplan the conferences in a proper way and in their own context, as explained in op_server.cfg comments and here.
- If you plan to use the 'Info' box to set the callerid text when transferring or originating a call, you need to modify your dialplan. See extensions.conf.sample
- You also need to be wary, as English is not my first language.
manager_user is the user defined in manager.conf (following this example configuration, it should be myuser)
manager_secret is the secret or password defined for the above user in manager.conf
event_mask allows you to specify what type of event you want to receive. Possible values are 'on', 'off', 'system', 'call', 'log'
You can monitor multiple asterisk servers: just repeat the sequence manager_host, manager_user, manager_secret and event_mask as many times as servers you want to monitor, without interleaving any other parameter in between. The first to appear will be considered number one, and so on. Then you can specify to what server a button belongs with the Server parameter in the button definition, inside op_buttons.cfg
astmanproxy_host
astmanproxy_port You can connect to astmanproxy instead of the asterisk manager port by specifying these parameters.
astmanproxy_server Then you have to specify the ip addresses of every asterisk manager listed in astmanproxy config in the same order, each in its own astmanproxy_server line.
listen_addr (optional) specify the ip address you want op_server.pl to bind to. If you leave this commented, it will try to bind to all ip addresses.
listen_port is the port the server will use to accept incomming connections from flash clients. Flash and the server talk to each other using TCP to this port. Default: 4445
web_hostname (optional) must be the same hostname you use to access the web server. Eg: if you access the web server using 'http://www.myserver.com' then web_hostname must be 'www.myserver.com'. If you use an IP address instead of a name, you should write that IP. Don't include 'http://' at the begining. Flash clients will only work if the web_hostname is the same as the url your browser is pointing to, you can use it as an extra security measure. If you want to access the flash client from different addresses (like a local net and an external ip address, you will need to comment this field out).
security_code is the password you will use to authorize incomming commands from flash (transfers, hangups, origination, etc). If you want to perform any action from flash, you will have to enter this code in the proper box within flash. Just write it there and then perform the action (there is no submit button in the flash applet).
flash_dir must be the exact location of the directory where the html and swf files are placed. Following this examples, it should point to /var/www/html/panel
poll_interval is the frequency in seconds the server will poll asterisk for sip and iax2 status. Default: 240. Newer asterisk versions should be fine without polling too much, as the manager generates register/unregister/lagged events by itself. If you have several sip or iax peers, consider setting the polling to a large value (Ex: 7200) because the server uses lots of resources to parse the results, and the events are sent anyways by Asterisk.
poll_voicemail if you check voicemail from a web interface, the manager won't notify when a voicemail was deleted. You can enable this option and the voicemail will be checked every poll_interval seconds.
auth_md5 set this to one if you want to authenticate to asterisk manager using MD5 hashing. There is no reason to turn it off.
kill_zombies if enabled (1) the server will try to hangup zombie channels if they happen. This option should not be used, it is disabled by default (0).
debug it sets the debug level of the server. The log is writen to stdout. Its a bitmap parameter.
Bit 1: shows events comming from Asterisk
Bit 2: shows commands sent to Asterisk
Bit 4: shows commands comming from Flash
Bit 8: shows commands sent to Flash
Bits 16,32,64: debug for the server
Default is 0 (no debug). If you want to see the events comming from Asterisk and the commands sent to it, set it to 3 (1+2). If you want to enable full debug, set it to 255. You can override this setting from the command line with -X
queue_hide If set, queue position buttons won't be displayed if they are unused (so you only see the actual number of people waiting on the queue). See button types for more info.
clid_format a pattern to format the caller id number. Every 'x' will be replaced by a number. Default: (xxx) xxx-xxxx
clid_privacy if set to 1, the panel won't show the callerid or the dialed number on the buttons.
show_ip if set to 1, the panel will show the ip address for sip and iax peers.
reverse_transfer In its default configuration, when you drag & drop buttons for performing transfers, the point of view is from the PBX, not the user. So, if you are talking using SIP/myphone and drag the button for that channel, you will transfer that leg (yourself), not the one of the person you are talking to. If you want to transfer the other leg (that is, like the phone perspective instead of asterisk perspective), set this option to one.
transfer_timeout (optional) If set, you will have an aditional element in the toolbar with a dropdown list of values. If you select one of them, the next time you perform a transfer within the panel, that call will end after the timeout is reached. The format for the value is:'timeout_in_seconds,label|timeout_in_seconds,label'. If the timeout is set to zero, then the transferred call will not be limited in time. Example:
enable_restart if set to 1, the reload button on the flash client (that in its original form just reloads the flash client) will instead perform an asterisk restart. If you want asterisk to actually restart, be sure to run it with safe_asterisk or some other mechanism that will relaunch asterisk when it ends. It is an actual RESTART, not a RELOAD
rename_label_wildcard if you have REGEXP buttons width a wildcard, you can set this option to 1, and the label for that button will change to the actual name of the channel that is using that slot. A channel with a wildcard is any channel that contains an asterisk '*' inside. (Not all regexps contain wildcards)
rename_label_agentlogin if set to 1, it will change the label of the button to the agent number for that button when using asterisk AgentLogin application.
rename_label_callbacklogin if set to 1, it will change the label of the button to the agent number for that button when using asterisk's AgentCallbacklogin. If you login through an extension that is defined in the Extension and Context parameters for that button, then its label will change to Agent/XXXX on login. If you do not have a button who's Extension and Context matches, then it won't work.
rename_to_agent_name if set to 1 the renaming above will be performed with the name defined in agents.conf instead of Agent/XXXXX.
rename_queue_member if you add channels as members of a queue by means of AddQueueMember, without using agents.conf, then this option is for you.
change_led_agent if set to 1, the led for the button that represents a logged in agent will change to the color defined in op_style.cfg as ledcolor_agent (default yellow). This way you can see at a glance if the agent is logged in or not.
barge_muted if set to 1 and you drag an unused button to any leg of an active call, the three will be thrown into a meetme room, and the dragged channel will be set to muted automatically, so both original parties won't hear to the 3rd party. You can then mute or unmute any of the meetme participants by single clicking on the little arrow icon on each button.
barge_rooms are the meetme room number to use for barge-in functionality.
conference_context is the context where you have defined all of your meetme rooms, used for barge in. Default: conferences
For barge in to work, you have to add some extensions in their own context inside your dialplan. Edit /etc/asterisk/extensions.conf and add something like this (the extension number must match the meetme room number):And in /etc/asterisk/meetme.conf you need something like this:
You can define different security_codes conference_context, barge_rooms, flash_dir and web_hostname in a different context. Just start a new context definition between brackets and put the new values below that line. In this way you can have different web pages to serve different contexts for hosted pbx.
voicemail_extension is the extension and context in your extensions.conf to reach the voicemailmain application. For example, if you have defined the 1234 extension in context 'features' to reach voicemailmain, set this parameter to '1234@features'. Then, when you double click on the MWI icon on a button, it will dial to voicemail directly.
Panel_Context Starting from version .10, you can have panel 'contexts'. This means only one server running, and several flash clients with different buttons layouts connected to this unique server. If you omit this parameter, the 'default' context will be asumed. To specify the context to load in flash, you have to modify the page that loads the swf file. Just add '?context=mycontext' after every appearance of 'operator_panel.swf'.
URL if set, the button label will become an hyperlink that links to this URL when clicked.
Target to set the hyperlinks target. If omited, it will use the current window. You can use the standard html targets, like _parent, _new, etc.
No_Rectangle if set to true, the rectangle will not be drawn, only the other elements (label, icon, caller id, timer, etc). You can use your custom background image to draw your own buttons.
Label is the button label. You have to enclose it with quotes if you plan on using spaces.
International Characters
If you want to display foreign characters in button labels, you have to savethe configuration file with UTF-8 encoding. To convert the file to UTF-8utilizing vi and the command line just perform:
vi -c ':wq! ++enc=utf8' op_buttons.cfg
Note that the button label is used as the caller id text when originating calls within the panel. If you use international characters, the caller id will be mangled and not displayed correctly in your user agent.
Extension is the extension number. It must be defined in your dialplan to reach that channel. If there is no extension for that button (eg: its an external line) you must set it to -1, this way, the server will discard attempts on transfers to that channel.
Context: if the extension is not reachable from the default context in your dialplan, you should also specify its context. If you have extension number 100 inside the 'from-sip' context, then you should write 100 for the extension and from-sip for the context.
Icon is the icon. There are six icons available:
Icon 1 | Icon 2 | Icon 3 | Icon 4 | Icon 5 | Icon 6 |
Mailbox is the voicemail mailbox to monitor. If you have voicemail accounts for the extension, you have to specify the voicemail user and context. If you leave this field empty, the server will not check the mailbox for that extension.
Button Types
Meetme (summary)
To make a button for a conference, the channel name should be just the conference number. That button will show the total number of people inside that conference room. If you have a conference number 900, the channel name would be, you guessed it: 900. Example:Meetme (participants)
Just specify more than one position for a meetme button and they will show meetme participants indiviually as they join or leave the conference. You then can mute/unmute each one by single clicking on the led.Queue (summary)
To make a button for a queue, the channel name should be the queue name prefixed by 'QUEUE/'. The button will show the total number of people waiting on the queue, and the maximum current wait time. For example, if you have a queue named 'sales', the button config should look something like:Queue (positions)
You can reserve several buttons for queue positions. Each position will be used by the users waiting on that queue. Say you have 3 people waiting on queue 'support' then the first three slots will be taken, one for each person, in the positions they are on that queue (slot 1 for position 1, slot 2 for position 2 and so on). Queue position buttons show the Callerid Name and Callerid Number of the person, as well as the waiting time for each. To define queue position buttons, the channel name is the same as queue summary, but you have to use more than one position for that button (as many as you like). For example:Queue Agents (experimental)
This kind of button can be used to show agents that are members of a particular queue, by means of agentlogin, agentcallbacklogin, addqueuemember or statically configured, without worrying about the method you use. For now this feature is resource intensive and there are problems when you use Local channels because there is no way to know to what actual channel a Local channel points to. If you are adventourus, try it. Example (will use 7 slots for agents for the queue 'sales'):Agents
For monitoring a particular agent by number. It works most of the time. Example:Park slots
You can use buttons to display park slots. The button is lit when a call is parked on that slot and it will show a countdown with the park timeout instead of a regular timer. Example config:Callerid Buttons
There are times that you need to monitor a channel based on its callerid (Maybe because you use SER and the channel name is not meaningfull, or because you are interfacing asterisk with a traditional pbx trhough Zap channels that are not related to particular extensions, etc). For such cases, you can try to monitor by using CLID buttons. There are some shortcommings to these kind of buttons, but they are mostly functional. Example:Regexp Buttons
There are times that you need to monitor several channels or dynamically generated channel names. Regular expressions can come handy. To use a regular expression to match a channel name, you need to prefix it with an underscore.This kind of buttons cannot be used to originate a call because you don't know for certain the channel that will be originating the call. The regular expression is always case insensitive. There are some reserved character that cannot be used: & and =. Example:Channel Buttons
The standard button type. Just use TECHNOLOGY/channel_name. Some TECH types require special naming conventions as shown in the examples below. If one button use just one position, it will pile up all lines activity on that button (there are some phones capables of having more than one call handled at a time). If you use more than one position they will be treated as trunk buttons (explained below). Examples:Trunk Buttons
When specifying more than one position for a button, that button will be considered a trunk. A normal button will display all instances of the same channel name in that sole button. In a trunking button, each instance will be displayed in the next available button for that trunk. If you have a DID from an IAX or SIP provider, and you receive more than one call from that user, you must define that button as a trunk with as many 'instances' as you like. This way you can transfer individual calls from the same provider.For example:show_security_code | Security Code input box |
show_clid_info | Extra Info in CLID box |
show_btn_help | Help button |
show_btn_debug | Debug button |
show_btn_reload | Reload button |
show_status | Status Bar |
- 0 for available status (channel not in use)
- 1 for busy status (channel in use)
- 2 for agent status (channel not in use and logged in agent)
- Be sure to set the executable bit in op_server.pl if not set (chmod a+x op_server.pl). And check the location of your perl binary. It is assumed to be /usr/bin/perl. If it is not, modify the path in op_server.pl.To run the server just type in the same directory as the file itself:
./op_server.pl
The server does not detach from the console. If you want it to run in the background daemonized, append '-d' in the command line. If the debug level is other than 0, the output will be logged on stdout. To find out if the server works well, set the debug level to 1, the output should look like this:
You can run the server from your rc.local script to have it running on startup. There are also example init scripts in the init directory if you prefer to use your distro init system. Be sure to start op_server.pl after asterisk. If you restart asterisk, the op_server will try to reconnect 60 times with 10 seconds intervals (10 minutes). If it fails to connect after these many attemps, it will shutdown.
- Just point the browser to the directory where you placed the html and swf files. You should see something similar to the live demo
- Hangup a channel: (double click the colored dot on the button)
- Transfer a call leg via drag&drop (drag the phone icon on a talking button to another button)
- Originate calls via drag&drop (drag the phone icon from one available button to another available button)
- Barge in in a call via drag&drop (drag the phone icon from one available button to a bridged/busy one)
When a channel is busy, or there is someone in a conference or queue, the oval will be red. If it is available or there is nobody on the queue or conference, it will be green. A flashing oval indicates ringing. If all the ovals are flashing, its because the flash applet lost connection from the op_server.
When your mouse is over a button, and there is activity going on for that button, you can see the details on the status bar.
Before performing actions, you have to enter the Security Code in the box. If the code does not match, your actions will be ignored. After typing the code, you can:
Please note! If you want to transfer an available channel to an already connected call, you have to configure your dialplan correctly and have the context properly defined, if you don't do that you will experience hanged channels and asterisk lockups. Thats because when you redirect a call within the asterisk manager with an incorrect context, asterisk does not handle the error gracefully.
- CRM stands for 'Customer Relationship Manager'. You can use the Flash Operator Panel in a call center environment and integrated with a web based CRM software. This feature of the panel lets you load a web page based on the callerid of an incomming call.
You can have a web page with all the customer details before answering the phone.
This feature was introduced in version 0.11 of the Panel. To set it up, you have to specify some variables in the html page that loads the flash operator panel:
mybutton | The button number of the extension you like to monitor |
url | The URL to call when the above extension is ringing |
target | The target frame or window where the URL will be loaded (if you leave it blank, it will use '_self') |
When a call comes in for the button monitored (mybutton), it will open a browser window pointing to url in the target. It will use method get to send the variable clid to that url, so you can perform your search for the customer record.
You have to add the variables when loading the .swf file. Open the index.html supplied and look for all the instances of operator_panel.swf and append the variables like:
operator_panel.swf?mybutton=4&url=customer.php&target=bottom
You can use an invisible frame (0 width and no borders) to load the .swf file and not clobber the screen with the panel itself if you want. To have a different button monitored, user logins, etc, you can use the method of your choice: php,modperl,asp, etc, to modify the frame that loads the swf file and set the variables accordingly. If you do not specify a mybutton variable, or if the url is empty, the CRM feature will be disabled.
An example customer.php should be like:
- FOP can monitor the status of queues and agents of an Asterisk PBX. There are several ways on Asterisk to handle queues, each one has its own 'way', so it does the Flash Operator Panel.
- rename_label_agentlogin
If you are using Agentlogin in your Asterisk setup, you can change the Label of a button to the Agent number or name (see rename_to_agent_name below) when they log in to the system. The button renamed will be the one corresponding to the channel used by the Agent to login. - rename_label_callbacklogin
Another way to setup Agent on Asterisk is by using Agentcallbacklogin. The events used by the two applications are different, so you have to turn this one on if you are using callback logins instead of regular agent logins. The result is the same, but the way it works its different: Agentcallbacklogin return a call to an extension@context specified in its parameters. FOP will match a button for callbacklogins based on this extension@context, they will match the Extension and Context parameter for a button definition. - rename_to_agent_name
If you set this one to 1, the label will be renamed to the full name of the agent specified on agents.conf instead of the agent number. - rename_queue_member
Another way to handle queues is by ways of AddQueueMember/RemoveQueueMember. As this option does not generate a manager event, you will have to modify your dialplan to generate the needed events so FOP can display their status. For example:- exten => 1000,1,Answer
exten => 1000,2,AddQueueMember(myqueue|SIP/${CALLERIDNUM})
exten => 1000,3,UserEvent(Agentlogin|Agent: ${CALLERIDNUM})
exten => 1000,4,Playback(agent-logged)
exten => 1000,5,Hangup
exten => 1001,1,Anser
exten => 1001,2,RemoveQueueMember(myqueue|SIP/${CALLERIDNUM})
exten => 1001,3,UserEvent(RefreshQueue)
exten => 1001,4,Playback(agent-loggedoff)
exten => 1001,5,Hangup - change_led_agent
If you set this option to one, the LED of the button corresponding to a logged on agent will change its color to led_color_agent (specified in op_style.cfg) When a button corresponds to an Agent, if you double click on the little arrow for that button, you will see the number of calls taken for each queue the agent is member off. If you double click on the little arrow for a queue button, you will see statistics about that queue, like total number of calls taken, missed, average hold time, etc.
The agent features in op_server.cfg are: