Asterisk2MediaPortal Plugin (1 Viewer)

charli181

Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    Here is the the first version of the Asterisk2MediaPortal Plugin. This has been based on passed plugins but since their source code was not available, had to start from scratch. This has been built against MP 1.1 beta version but shoud be compatible with all recent versions of MP.

    Attached is the MPE1 installer and also the documentation to get you going.

    Current Feature are
    · Monitor 1 extension and 1 voicemail box
    · Displays caller ID when available
    · Displays Callers name when available – (can be used with Caller ID Superfecta within Asterisk)
    · Ability to display caller image
    · Pause & Resume media on Call Ringing/Hangup
    · Displays number of voicemails waiting in inbox
    · Ability to keep notifying on urgent voicemails
    · Notifications on Asterisk Server disconnections.
    Would be good to get some feedback to see if it works in other asterisk environments other than my own.



    New Version Released V1.1.1.2

    Version 1.1.1.2
    (21 Mar 2011)
    • Added Extra logging including version number and some config items to be included in the MediaPortal.log for extra troubleshooting
    • Fixed Issue with HangUp events now being recognised for Asterisk Version 1.4. – fixes un pausing
    • Increased Buffer Size in Asterisk API communication to eliminate messages only being half received.

    --------------------------------------
    Version 1.1.1.1
    (18 Mar 2011)
    • Added extra logging to MediaPortal.log to assist in diagnosis of issues
    • Fixed issue where more than 1 urgent Voicemail would not be considered a continuous Notify criteria
    • Resolved issue with earlier Version on Asterisk API (Version1.0) where the command MailboxCount only returned “NewMessages” and not “UrgMessages” causing an exception to occur. System no skips this check if “UrgMessages” is not found in response (thanks to sircolin for assistance here)
    • Compiled Plugin Installation file to be against MedialPortal Stable release1.1.3
     

    Attachments

    • Asterisk2MediaPortal Plugin Documentation.doc
      401 KB
    • Troubleshooting Asterisk2MediaPortal.doc
      26 KB
    • Asterisk2MediaPortal Plugin Release Notes - v1.1.1.2.doc
      26 KB
    • Asterisk2Mediaportal_V1.1.1.2.MPE1
      18.8 KB

    sPiel

    Portal Pro
    January 5, 2010
    52
    11
    Home Country
    New Zealand New Zealand
    I'm researching Asterisk for home use. Do you know if this should work with Trixbox? Or should I just install standard Asterisk?

    Awesome work btw.

    [edit]
    Ignore that.

    I RTFM'd :)
    [/edit]
     

    charli181

    Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    I'm researching Asterisk for home use. Do you know if this should work with Trixbox? Or should I just install standard Asterisk?

    Awesome work btw.

    [edit]
    Ignore that.

    I RTFM'd :)
    [/edit]

    glad you read the doc. :D

    I used to use Trixbox, but found PIAF - (PBX In A Flash) more suitable for home use. Also, a web site called nerd vittles has some great add ons and tutorials for PIAF, but they could be converted to Trixbox with a bit of work.

    Sean
     

    globaldonkey

    MP Donator
  • Premium Supporter
  • April 23, 2007
    755
    79
    Home Country
    I installed and can connect to the asterisk API per the troubleshooting instructions. Also Mepo pops up the "connection successful" dialogue box at startup, so it is connecting to the API ok. However, I don't get any incoming call notifications. Seem to be getting these errors in the MP error log:

    2011-03-21 14:04:04.388871 [ERROR][(29)]: Plugin :- Ast2MP - An Error Has occured reading the response from Asterisk API
    2011-03-21 14:04:04.388871 [ERROR][(29)]: Plugin :- Ast2MP - Event: Newchannel
    Privilege: call,all
    Channel: SIP/113-0920d610
    State: Down
    CallerIDNum: <unknown>
    CallerIDName: <unknown>
    Uniqueid: 1300680244.47

    Event: Dial
    Privilege: call,all
    Source: SIP/101-092041c8
    Destination: SIP/113-0920d610
    CallerID
    2011-03-21 14:04:04.404497 [ERROR][(29)]: Plugin :- Ast2MP - System.ArgumentException: Argument 'Start' must be greater than zero.
    at Microsoft.VisualBasic.Strings.InStr(Int32 Start, String String1, String String2, CompareMethod Compare)
    at Asterisk2MediaPortal.Asterisk2MediaPortal.Class1.messageReceived(String message)
    2011-03-21 14:04:22.515147 [ERROR][(17)]: Plugin :- Ast2MP - An Error Has occured reading the response from Asterisk API
    2011-03-21 14:04:22.515147 [ERROR][(17)]: Plugin :- Ast2MP - Event: Newchannel
    Privilege: call,all
    Channel: SIP/113-09201df8
    State: Down
    CallerIDNum: <unknown>
    CallerIDName: <unknown>
    Uniqueid: 1300680262.49

    Event: Dial
    Privilege: call,all
    Source: SIP/101-092041c8
    Destination: SIP/113-09201df8
    CallerID
    2011-03-21 14:04:22.515147 [ERROR][(17)]: Plugin :- Ast2MP - System.ArgumentException: Argument 'Start' must be greater than zero.
    at Microsoft.VisualBasic.Strings.InStr(Int32 Start, String String1, String String2, CompareMethod Compare)
    at Asterisk2MediaPortal.Asterisk2MediaPortal.Class1.messageReceived(String message)
     

    charli181

    Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    hi Globaldonkey,
    are you using the latest version 1.1.1.1 which is available in the first post. This was uploaded on Friday afternoon. The error that is being shown, was evident in the first version because earlier versions of Asterisks had a different call alert message. I thought I had fixed this. I am assuming you want call notification to happen on Extn 113.
    Can you confirm your asterisk version please and ensure you are running plugin version 1.1.1.1.

    Sean
     

    globaldonkey

    MP Donator
  • Premium Supporter
  • April 23, 2007
    755
    79
    Home Country
    Hi Sean,

    Definitely running 1.1.1.1. Downloaded it this morning about an hour before I posted ;)

    I'm running trixbox 2.6.2.3, which comes with Asterisk 1.4.22.

    Yes, I'm trying to monitor extension 113. Haven't configured any voicemail monitoring yet.

    EDIT captured a log of the CTI output
     

    charli181

    Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    Hi Sean,

    Definitely running 1.1.1.1. Downloaded it this morning about an hour before I posted ;)

    I'm running trixbox 2.6.2.3, which comes with Asterisk 1.4.22.

    Yes, I'm trying to monitor extension 113. Haven't configured any voicemail monitoring yet.

    EDIT captured a log of the CTI output


    New version is now Available 1.1.1.2. - You can either download the MPE1 file in the first post, or through the the MPE installer, check for updates and install that way - available in MP 1.1.3 - your choice.

    Let me know how you get on. Your issue seems to be related to the plugin only recieving half the message due to the buffer size being 255 characters. I have now increased it to over 1000 just to get all messages when I read the network connect - nerdy stuff but I thought you might want to know.

    Sean
     

    globaldonkey

    MP Donator
  • Premium Supporter
  • April 23, 2007
    755
    79
    Home Country
    1.1.1.2 working well. Only had time for a few test calls so far, but all seems to be working fine.
     

    tringler

    Portal Pro
    July 19, 2009
    100
    6
    Fürth
    Home Country
    Germany Germany
    It's just not working for me. I get no CallerID or Voicemailbox notifications. Only these Logmessages:

    2011-04-10 17:38:31.433888 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.433888 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.439888 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:29, right:19
    2011-04-10 17:38:31.449889 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:30, right:20
    2011-04-10 17:38:31.453889 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.453889 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.459889 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:31, right:21
    2011-04-10 17:38:31.469890 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:32, right:22
    2011-04-10 17:38:31.473890 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.474890 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.479890 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:33, right:23
    2011-04-10 17:38:31.489891 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:34, right:24
    2011-04-10 17:38:31.493891 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.494891 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.499892 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:35, right:25
    2011-04-10 17:38:31.509892 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:36, right:26
    2011-04-10 17:38:31.513892 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.514892 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.519893 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:37, right:27
    2011-04-10 17:38:31.530893 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:38, right:28
    2011-04-10 17:38:31.533894 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.534894 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.540894 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:39, right:29
    2011-04-10 17:38:31.550894 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:40, right:30
    2011-04-10 17:38:31.553895 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.554895 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.560895 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:41, right:31
    2011-04-10 17:38:31.570896 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:42, right:32
    2011-04-10 17:38:31.573896 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.574896 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.580896 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:33
    2011-04-10 17:38:31.590897 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:34
    2011-04-10 17:38:31.593897 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.594897 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.600897 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:35
    2011-04-10 17:38:31.610898 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:36
    2011-04-10 17:38:31.614898 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.614898 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.620898 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:37
    2011-04-10 17:38:31.630899 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:38
    2011-04-10 17:38:31.633899 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.634899 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.640900 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:39
    2011-04-10 17:38:31.650900 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:40
    2011-04-10 17:38:31.653900 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.654900 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.660901 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:41
    2011-04-10 17:38:31.670901 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:42
    2011-04-10 17:38:31.673902 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.674902 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:31.680902 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:43, right:43
    2011-04-10 17:38:31.693903 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:31.694903 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.528923 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:42, right:42
    2011-04-10 17:38:49.533923 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.533923 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.538923 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:41, right:41
    2011-04-10 17:38:49.548924 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:40, right:40
    2011-04-10 17:38:49.553924 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.553924 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.558924 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:39, right:39
    2011-04-10 17:38:49.568925 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:38, right:38
    2011-04-10 17:38:49.573925 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.573925 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.578926 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:37, right:37
    2011-04-10 17:38:49.588926 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:36, right:36
    2011-04-10 17:38:49.593926 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.593926 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.598927 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:35, right:35
    2011-04-10 17:38:49.608927 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:34, right:34
    2011-04-10 17:38:49.613928 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.613928 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.618928 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:33, right:33
    2011-04-10 17:38:49.628929 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:32, right:32
    2011-04-10 17:38:49.633929 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.633929 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.638929 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:31, right:31
    2011-04-10 17:38:49.648930 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:30, right:30
    2011-04-10 17:38:49.653930 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.653930 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.658930 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:29, right:29
    2011-04-10 17:38:49.668931 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:28, right:28
    2011-04-10 17:38:49.673931 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.673931 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.678931 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:27, right:27
    2011-04-10 17:38:49.688932 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:26, right:26
    2011-04-10 17:38:49.693932 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.693932 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.698933 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:25, right:25
    2011-04-10 17:38:49.708933 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:24, right:24
    2011-04-10 17:38:49.713933 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.713933 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.718934 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:23, right:23
    2011-04-10 17:38:49.728934 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:22, right:22
    2011-04-10 17:38:49.733935 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.734935 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.738935 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:21, right:21
    2011-04-10 17:38:49.748935 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:20, right:20
    2011-04-10 17:38:49.753936 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.753936 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.758936 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:19, right:19
    2011-04-10 17:38:49.768937 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:18, right:18
    2011-04-10 17:38:49.773937 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.773937 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.778937 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:17, right:17
    2011-04-10 17:38:49.788938 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:16, right:16
    2011-04-10 17:38:49.793938 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.793938 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.798938 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:15, right:15
    2011-04-10 17:38:49.808939 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:14, right:14
    2011-04-10 17:38:49.813939 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.813939 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:38:49.818939 [Info.][(11)]: PlaneScene: Crop: top:13, bottom:13, left:13, right:13
    2011-04-10 17:38:49.833940 [Info.][(36)]: PlaneScene: video WxH : 720x576
    2011-04-10 17:38:49.833940 [Info.][(36)]: PlaneScene: screen WxH : 1920x1080
    2011-04-10 17:39:02.404659 [Info.][(34)]: Plugin : - Ast2MP - 1.1.1.2 - - Call released

    Any Idea?
    Connected and Authenticated. Tests via cmd OK.
     

    charli181

    Retired Team Member
  • Premium Supporter
  • August 3, 2007
    800
    111
    Sydney
    Home Country
    Australia Australia
    It's just not working for me. I get no CallerID or Voicemailbox notifications. Only these Logmessages:
    ...

    2011-04-10 17:39:02.404659 [Info.][(34)]: Plugin : - Ast2MP - 1.1.1.2 - - Call released

    Any Idea?
    Connected and Authenticated. Tests via cmd OK.

    Hi Tringler,
    what version of asterisk are you running?
    In the Mediaportal.log snippet you have provided, I can only see a log entry for the call released. All log entries for the plugin contain Ast2MP in it so you could search on that criteria to see each output.

    Also for Voicemail, there should be in the logs about checking the voicmail box and also a result from that check. if the mailbox is empty, no dialog will be displayed.

    Just confirming you are running windows 7 and MP 1.1.2?

    The whole mediaportal log would be great so I can see what is going on with Mediaportal as well.

    I am currently away interstate, so I cannot do anything this week, but will back at my dev machine next week.

    Sean
     

    Users who are viewing this thread

    Top Bottom