New Plugin - Asterisk Caller ID Notify (ACID Notify) (1 Viewer)

CCob

Portal Pro
November 10, 2008
111
8
Hi Everyone,

I was wanting an Asterisk Caller Id notification system for my MePo install, I cam across this thread https://forum.team-mediaportal.com/threads/asterisk2mediaportal-plugin.94172/ but it seems development has ceased and the sources are no longer available due to a machine crash at the developers side.

So I have decided to dive in a write my own, so here is the first preview. I will host on GitHub or similar soon enough once I have tidied up the code.

So far I have added support for the DefaultWide and Avalon (this is what I am using) skin

Features Implemented so far
  • Connects with Asterisk AMI server to listen on new channels (calls)
  • Connects to the Google Data services and synchronises contacts locally (with photo if present)
  • Shows notification dialog of Caller Number, Name and Photo
  • Pause/Resume playback on new call
  • Filter extensions to that only certain channels are monitored (incoming only for example)
For those who would like to contribute or simply play with the source, I have setup a GitHub project here.

https://github.com/CCob/MediaPortal-AsteriskCid

Planned Features
  • Send call to answer phone from within MediaPortal
  • Contacts management from Configuration
  • And more.... (when you or I can think of them)
Release 0.1 - 04 Aug 2012
Initial release​
Release 0.2 - 05 Aug 2012
  • Pause/Resume playback when notification occurs
  • Auto resume playback on call hangup
  • Single channel filter, can now limit which incoming channel to listen on
  • First mpe1 based release
Release 0.3 - 12 Aug 2012
  • Added supported for monitoring an extensions mailbox
  • Can now alter full name and photo for contacts
  • Retry Asterisk connection when not available
Release 0.4 - 22 Jun 2013
  • Removed custom dialog in favor of standard DialogNotify (should be compatible with all skins now)
  • Caller thumbnails are now saved and loaded from Thumbs folder
  • Worked on custom addition of contacts instead of using google contacts, still needs work though
  • Only works with MP 1.4 and above, since previous versions of the plugin used log4net and MP 1.4 now also uses it. This was to prevent conflicts

Download
https://www.team-mediaportal.com/extensions/plugins/asterisk-caller-id-lookup?lang=en
Thanks,
Ceri
 

Attachments

  • AcidLookup.zip
    1.6 MB
  • AcidLookup 0.2.mpe1
    2.4 MB
Last edited:

mhuett

Portal Member
July 23, 2012
7
0
62
Home Country
Australia Australia
Thanks for your work on this ... I love the concept!!

I've run it on MP1.2.3 with Avalon skin and it 'mostly' seems to work ... had a few occasions where it didn't respond to incoming calls but I'm sure it will get ironed out over time. My PBX is one of the Atcomm boxes (IP101).

I have been looking at going to MP1.3 and have set this up on one of my PCs ... found that the plugin is unsupported in that version - do you plan on getting it into MP1.3?

Also - skin support. I like StreamedMP however the app currently only supports the defaultwide and Avalon skins - can I manually make any changes/mods to get it operational under another skin?

Thanks again for the work you are doing on this!
 

CCob

Portal Pro
November 10, 2008
111
8
I have also noticed the odd ocasion where notification doesn't happen, and it seem to lie inside the open source Asterisk.NET library that I am using. I will obviously investigate this over time.

MP1.3 should be fairly simple, I just don't have any 1.3 installations at home, since they are all actively used. If you let me know the full version number of MP1.3 (assuming alpha), I can recompile it with 1.3 as a supported version and you could give it a try, if it works I'll be happy to update the official MPE1 for it then.

In regards to other skin support, the dialog is currently a direct copy of the DialogNotify.xml, so make a copy of this file from the skin folder and rename it to DialogIncomingCall.xml, then open the file inside a text editor and change the Id element to 123456 instead of 2016. In time though this will change as I plan to alter the dialog to have buttons on there to send the call to answer phone, etc... at which point, hopefully some of the popular skins (and their designers) will add support for the notify dialog because I assure you, you wont want me designing it :)
 

mhuett

Portal Member
July 23, 2012
7
0
62
Home Country
Australia Australia
OK ... I've downloaded V0.3

I have taken my MP1.3 back to V1.2.3 so as to keep it working with this plugin ... but later on will be happy to do any testing needed for 1.3.

I have also gone back to Avalon on all my seats .... went to StreamedMP becasue I could not get Weather working with Avalon but since going back to it I now have it running OK ... maybe the reinstall of MPv1.2.3 reset something.

With v0.3 you say 'Can now alter full name and photo for contacts' ... what do you mean by this - I was hoping it would allow me to edit the caller ID info from within the plugin but that doesn't seem to be the case.

I've also noticed that (apparently) CID will work only sometimes IF you have no particular extension set ... if I have it looking for all calls then the CID works 'at times' but if I set up to monitor just one extension (eg SIP/10) then I never get the caller ID (unknown name:unknown number) - may just be conincidence.

Thanks again for what you have done so far ....looking forward to seeing just how far this plugin can go ... like I said last time I LOVE the concept:)
 

CCob

Portal Pro
November 10, 2008
111
8
OK ... I've downloaded V0.3
With v0.3 you say 'Can now alter full name and photo for contacts' ... what do you mean by this - I was hoping it would allow me to edit the caller ID info from within the plugin but that doesn't seem to be the case.

Are you currently synchronizing with Google Contacts? You can use the data table to alter contact information that has synchronized, using the data table with the list of contacts in it. Only the full name and photo (double click on the photo) are changeable at the moment, I'm still working on modifying the numbers.

OK ... I've downloaded V0.3
I've also noticed that (apparently) CID will work only sometimes IF you have no particular extension set ... if I have it looking for all calls then the CID works 'at times' but if I set up to monitor just one extension (eg SIP/10) then I never get the caller ID (unknown name:unknown number) - may just be conincidence.

The lookup into the database is based on the telephone number that is supplied from Asterisk, in your case above, there wasn't one supplied as number is set to unknown. Generally though, you monitor an incoming SIP trunk and not an extension, so if you have a SIP provider, you use that trunks SIP channel id.
 

mhuett

Portal Member
July 23, 2012
7
0
62
Home Country
Australia Australia
Are you currently synchronizing with Google Contacts? You can use the data table to alter contact information that has synchronized, using the data table with the list of contacts in it. Only the full name and photo (double click on the photo) are changeable at the moment, I'm still working on modifying the numbers.

Yes - I have set up a Google account, added some ID's/numbers but no photos .... I have 22 enteries but I can't edit any of the details from within the plugin config. I have tried double click, right click, highlight the entire line etc ...


The lookup into the database is based on the telephone number that is supplied from Asterisk, in your case above, there wasn't one supplied as number is set to unknown. Generally though, you monitor an incoming SIP trunk and not an extension, so if you have a SIP provider, you use that trunks SIP channel id.

Ahhhh.... OK that makes sense. I'll try to figure out how to 'listen' to the trunk and see how that goes.
 

mhuett

Portal Member
July 23, 2012
7
0
62
Home Country
Australia Australia
Ok ...makes sense but is not as easy as it sounds ... I can not for the life of me work out how to access/identify the trunk. It seems that it should be done by the callerid for each trunk however both of my trunks (2 seperate DIDs) both come through as the same number. I'll have to give up for now and get back onto this when I have a bit more time.
 

mhuett

Portal Member
July 23, 2012
7
0
62
Home Country
Australia Australia
Couldn't help myself ...still trying :)

I eventually found out that because both of my trunks are coming from the same provider (MNF Australia) they would both be identified through the SIP servers ip address and as both trunks pointed to the same IP all comes come in on the same trunk - net result is that no matter which DID I called I would always get the ID of the first phone line... Asterisk INTERNALLY decides the final destination. (Hope that makes sense).

I knew that MNF had multiple SIP server DNS names so I started pinging them all and looking at the returned IP addresses - turns out that they have multiple IP address too (even though multiple DNS names can point to the same IP).:)

So in Asterisk I pointed each trunk different SIP servers (DNS) that had different IP addresses ... net result is that NOW Asterisk at least identifies the two lines as different trunks.

I still have a problem in that I can't work out how to get the plugin to work off the trunk id .... if I leave filtering blank all calls show up in all MP installations with the correct telephone number (CID) and the name if it's one I have in the database. If I point to the extension (eg SIP/10) then I can get the inbound message to pop up on the correct screen for the given extension but without any CID (unknow,unkown). If I point the plugin to what I think is the correct trunk I get nothing. From what you've mentioned above I need to have the plugin work with the trunk (not the extension) - but I can't work out the filter syntax to look at trunks.

Just to clarify WHY I'm trying to do this ... I have a MP client/server set up in the house, other PC's we have just run the MP client. I run a business from home and use the PC in my workshop to watch TV/movies. I have VoIP phones with one DID for the house (ie our 'private' number) and another DID for the businesss - this comes through to the workshop. I want 'private' calls to be notified on MP throught the house and 'business' calls to be notified on the PC in the workshop...

Getting there VERY slowly (y)
 

Users who are viewing this thread

Top Bottom