Can't dial or transfer with FOP

I’m running the latest 2.4 on Asterisk 1.4.19. When I try to use FOP to originate a call I get “the call cannot be completed as dialed”. When I try to transfer a call via FOP, I get the feature is not enabled on the line. I know I’m missing something basic…so let me have it!

Rob

OK, I’ve figured out this is because I have it set up for deviceanduser mode and devices don’t have a dialplan. Thus when devices are dragged on other devices the call will not work.

I tried creating a ticket but apparently don’t have the privileges. When FreePBX is set for deviceanduser configuration, the Extension in the op_buttons_additional.cfg file is still the device id. If in deviceanduser mode, the extension should be the extension, not the device. Manually editing the file allows FOP features to work (such as drag and drop to make a call). Otherwise the features do not work.

Rob

It looks like the retrieve_op_conf_from_mysql.pl script only pulls information from the sip and iax tables right now to get get the information for the buttons. This will not work for a deviceanduser configuration when the extension ID is different from the SIP device ID.

It seems that the select statement needs to be a join between the sip and devices table based on id, and then apply some basic logic to correct the extension. The logic would have to determine if the devicetype was fixed or not. For those that are not fixed it would just report the device ID as the extension which is the way it is done today. Otherwise, if fixed, it would fill in the extension from the devices table.

I would be willing to open a ticket and create a patch file for this enhancement but the ticketing system will not allow me to create a ticket.

Rob

Rob,

Logout and log backin to the site. The cookie your computer stored must have expired or become corrupt. That will fix so you can post.

The other issue you will find is the following: retrieve_op_conf_from_mysql.pl is only called when there is a extension/trunk/parking lot/queue update via the gui. Since your system is in device and user mode it will not call that routine every time a user logs in or out so will be out of date with the names quickly from my understanding of when retrieve_op_conf_from_mysql.pl is called. It is possible that I’m wrong but I’m pretty sure I’m correct.

Thanks for the cookie tip. I logged out and logged back in and all is great. I’ll create a ticket for the issue since the dialplan doesn’t work. I’ll then modify the retrieve_op_conf_from_mysql.pl and see how it works with login and logouts. I think it only makes sense change the Extension value for fixed SIP and IAX devices. Otherwise you are right, you won’t know when someone is logged in and logged out. So for those we could leave it at the device level like it is today. The script just needs to check from the devices table if a user is assigned as fixed.

Rob

Replace the device ID in op_buttons_additional.cfg with the extension by creating a patch for retrieve_op_conf_from_mysql.pl. Ticket is 2804 with patch file.

Rob

What is really needed is to have the modifcation implemented in the /var/www/html/panel/op_server.pl code so that it can detect if it is running under FreePBX, and if so check if it is in device and user mode, then check the database once every x minutes (make it programmable) for changes and update the names that way. That would be the proper way.

But before taking a look at the code you have resident though you might want to take a look at the new posted code for version .28 that came out on March 31st. That has not been integrated with FreePBX yet. You can find the FOP project at http://www.asternic.org.

I’m sure he would love a patch that could support FreePBX in Device and User mode.

I’m not sure we have to detect device and user mode. The patch I submitted just fixed the .cfg file for an “initial state”. I was looking at the op_server.pl code and what I’m not sure about is if a non-FreePBX install would have the same information in the database regarding SIP devices. If so, then it should be a simple check to see if there is a user associated with the device. If so, that becomes the “extension”, otherwise it is the device ID.

I’ll look at the script and see what I can do.

Rob