Splitting the Caller ID and ScreenPop AGI script to allow more flexibility

Registered by ValdecDev

Smarter use of the Asterisk AGI interfacing to OpenERP to allow for more flexible choices / decisions to be made on both sides

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
None
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Blueprints aren't configured so I thought I'd make the suggestion here. In a system like FreePBX having both callerid lookup and screen pop connection handled at the same time may not be desirable. I'm not sure what the interaction of the script as is would be with ring groups (may depend on where you insert it of course) but I think splitting the functions will also help.

I posted a patch to FreePBX to add AGI to the list of supported callerid lookup sources. This works from the point of allowing OpenERP to be used as a callerid source but will not allow screen pop to function as the extension is not known.

If the 2 functions are split it could allow a lot more flexibility e.g. make call_manager trigger screen_pop when an extension actually picks up. It may also be nice for busy extensions not to have additional screen pops if there on the phone, not sure whether or not that would be the case at the moment.

It would be nice to turn on/off the 'Name Not Found' in get_cid_name.py as a customisation depending on preference.
It would be nice to turn on/off whether or not anonymous and unknown contacts trigger screen pop depending on preference.
It would be nice to handle the situation where user has multiple extensions or allow for override of extension in required instances (perhaps just another script param).

In def stdout_write(string): (get_cid_name.py) you should read stdin and process the result in order to prevent ast_write broken pipe error messages in Asterisk.

-------------
Also wondering about whether it would be worth adding support for extra phone numbers. I guess ideally there should be a phone directory style module allowing one to many for each partner contact or user. I think that would be easier for the callerid lookup too but its considerably more work than just adding something like phone2, mobile2 and extension for each partner contact.

If there was a phone directory style module I think there could be some issues with integrating the regular phone fields back with the partner model. I think you might be able to get round it by creating a new derived class and using computed fields to override the existing phone fields. I believe you can also use the OpenERP framework to store the calculated fields back over the existing fields in the corresponding table for compatibility with any SQL queries. Unfortunately this all sounds like rather a lot of work for a relatively simple application.

-------------

At the moment OpenERP thinks of the phone log as being manually entered. Might be nice to extend the functionality of the phone log so it records the original phone number that called (i.e. the caller id) vs the manually selected contact (which currently overrides this). This is useful where the main trunk number is displayed and the contact must be manually selected (i.e. for audit purposes, also good if you select the wrong contact or something as you don't loose the original inbound phone number).

Different NHS trusts sometimes appear to route via the same trunk which means the automatic selection of a partner / contact may not be appropriate in some instances. If there was an additional phone directory module this could be an appropriate place to put in trunk codes / switchboards and any flags that prompt for selection of an appropriate partner and or contact.

-------------

Might look at adding a link for recorded messages somewhere as would be nice to listen to them straight from openerp if available.

-------------

I'm not sure if there is any interest in cisco xml phone extensions. There is an abandoned project called openxmldir which I use for my phones http://www.freshports.org/www/openxmldir. I've updated this once or twice and will probably make it pull the contacts out of OpenERP too just for completeness.

--------------

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.