home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
ISDN CallerID and MP1.2
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="RoChess" data-source="post: 828991" data-attributes="member: 18896"><p>Ok, it took a long time with some trial and error and I'm sure my copy and pasted C# code is not the best way to go about it, but I've solve it for my situation.</p><p></p><p>[code]</p><p>if (parsedCall == false)</p><p>{</p><p> Log.Info("failed to parse call");</p><p>}</p><p>else</p><p>{</p><p> Log.Info("correct call, going to sleep until server.Pending() is false");</p><p> while (server.Pending())</p><p> {</p><p> TcpClient flushClient = server.AcceptTcpClient();</p><p> NetworkStream flushStream = flushClient.GetStream();</p><p> StreamReader flushReader = new StreamReader(flushStream);</p><p> inboundRawYACData = flushReader.ReadToEnd();</p><p> flushClient.Close(); // Shutdown and end connection</p><p> Thread.Sleep(1000);</p><p> Log.Info("Flushing: " + inboundRawYACData);</p><p> }</p><p> Log.Info("server.Pending() is cleared, waiting for next call");</p><p>}[/code]</p><p></p><p>That leads now to the following log entries:</p><p></p><p>[code]</p><p>2012-01-04 19:38:24.775600 [Info.][YAC Listener(25)]: ***** INCOMING CALL: Wednesday, January 04, 2012 7:38:24 PM *****</p><p>2012-01-04 19:38:24.776600 [Info.][YAC Listener(25)]: Name: YAC Test Call</p><p>2012-01-04 19:38:24.776600 [Info.][YAC Listener(25)]: Number: (425) 555-1212</p><p>2012-01-04 19:38:24.776600 [Info.][YAC Listener(25)]: Image: C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\YAC\4255551212.jpg</p><p>2012-01-04 19:38:24.777600 [Info.][YAC Listener(25)]: VideoPlayer:Successfully set rate to 1</p><p>2012-01-04 19:38:24.777600 [Info.][YAC Listener(25)]: VideoPlayer:SetRate to:1</p><p>2012-01-04 19:38:24.778600 [Debug][YAC Listener(25)]: VMR9: SetRepaint()</p><p>2012-01-04 19:38:24.795600 [Debug][YAC Listener(25)]: WindowManager: route MediaPortal.GUI.Video.GUIVideoFullscreen:2005->MediaPortal.Dialogs.GUIDialogNotify:2016</p><p>2012-01-04 19:38:24.961600 [Debug][YAC Listener(25)]: DialogWindow: MediaPortal.Dialogs.GUIDialogNotify init</p><p>2012-01-04 19:38:34.840600 [Debug][YAC Listener(25)]: WindowManager: unroute to MediaPortal.Dialogs.GUIDialogNotify:2016->MediaPortal.GUI.Video.GUIVideoFullscreen:2005</p><p>2012-01-04 19:38:34.849600 [Info.][YAC Listener(25)]: VideoPlayer:Successfully set rate to 1</p><p>2012-01-04 19:38:34.850600 [Info.][YAC Listener(25)]: VideoPlayer:SetRate to:1</p><p>2012-01-04 19:38:34.850600 [Info.][YAC Listener(25)]: correct call, going to sleep until server.Pending() is false</p><p>2012-01-04 19:38:34.858600 [Info.][(99)]: planescene:PresentImage() frame:0 enabled:True allowed:False</p><p>2012-01-04 19:38:34.869600 [Debug][MPMain(1)]: VMR9: Repainting -> Playing, Frames: 1</p><p>2012-01-04 19:38:35.850600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:36.850600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:37.850600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:38.855600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:39.856600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:40.857600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:41.857600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:42.857600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212</p><p>2012-01-04 19:38:42.857600 [Info.][YAC Listener(25)]: server.Pending() is cleared, waiting for next call[/code]</p><p></p><p>Tested it with 10 seconds auto-close of notify setting with pausing of media enabled, and it perfectly paused media, showed dialog once and closed itself to resume media playback.</p><p></p><p>No idea why my YAC server sends out 9x the data, because it only shows it once in YAC log and once on all the external YAC listners. Perhaps it is because I got YAC server running on same system as MediaPortal, or the concurrent-RDP hack I've applied, or whatever gremlin.</p><p></p><p>Either way it works, so I'm happy <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>I also changed the way the YAC dialog shows inside MediaPortal.</p><p></p><p>[code]</p><p> titlebarStr = "Call at " + currentTime.ToLower() + " from:";</p><p> bodyStr = callernameStr + "\n" + phonenumStr;[/code]</p><p></p><p>Because I wanted the number and name to be larger and did not care much about the time itself.</p></blockquote><p></p>
[QUOTE="RoChess, post: 828991, member: 18896"] Ok, it took a long time with some trial and error and I'm sure my copy and pasted C# code is not the best way to go about it, but I've solve it for my situation. [code] if (parsedCall == false) { Log.Info("failed to parse call"); } else { Log.Info("correct call, going to sleep until server.Pending() is false"); while (server.Pending()) { TcpClient flushClient = server.AcceptTcpClient(); NetworkStream flushStream = flushClient.GetStream(); StreamReader flushReader = new StreamReader(flushStream); inboundRawYACData = flushReader.ReadToEnd(); flushClient.Close(); // Shutdown and end connection Thread.Sleep(1000); Log.Info("Flushing: " + inboundRawYACData); } Log.Info("server.Pending() is cleared, waiting for next call"); }[/code] That leads now to the following log entries: [code] 2012-01-04 19:38:24.775600 [Info.][YAC Listener(25)]: ***** INCOMING CALL: Wednesday, January 04, 2012 7:38:24 PM ***** 2012-01-04 19:38:24.776600 [Info.][YAC Listener(25)]: Name: YAC Test Call 2012-01-04 19:38:24.776600 [Info.][YAC Listener(25)]: Number: (425) 555-1212 2012-01-04 19:38:24.776600 [Info.][YAC Listener(25)]: Image: C:\ProgramData\Team MediaPortal\MediaPortal\Thumbs\YAC\4255551212.jpg 2012-01-04 19:38:24.777600 [Info.][YAC Listener(25)]: VideoPlayer:Successfully set rate to 1 2012-01-04 19:38:24.777600 [Info.][YAC Listener(25)]: VideoPlayer:SetRate to:1 2012-01-04 19:38:24.778600 [Debug][YAC Listener(25)]: VMR9: SetRepaint() 2012-01-04 19:38:24.795600 [Debug][YAC Listener(25)]: WindowManager: route MediaPortal.GUI.Video.GUIVideoFullscreen:2005->MediaPortal.Dialogs.GUIDialogNotify:2016 2012-01-04 19:38:24.961600 [Debug][YAC Listener(25)]: DialogWindow: MediaPortal.Dialogs.GUIDialogNotify init 2012-01-04 19:38:34.840600 [Debug][YAC Listener(25)]: WindowManager: unroute to MediaPortal.Dialogs.GUIDialogNotify:2016->MediaPortal.GUI.Video.GUIVideoFullscreen:2005 2012-01-04 19:38:34.849600 [Info.][YAC Listener(25)]: VideoPlayer:Successfully set rate to 1 2012-01-04 19:38:34.850600 [Info.][YAC Listener(25)]: VideoPlayer:SetRate to:1 2012-01-04 19:38:34.850600 [Info.][YAC Listener(25)]: correct call, going to sleep until server.Pending() is false 2012-01-04 19:38:34.858600 [Info.][(99)]: planescene:PresentImage() frame:0 enabled:True allowed:False 2012-01-04 19:38:34.869600 [Debug][MPMain(1)]: VMR9: Repainting -> Playing, Frames: 1 2012-01-04 19:38:35.850600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:36.850600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:37.850600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:38.855600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:39.856600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:40.857600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:41.857600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:42.857600 [Info.][YAC Listener(25)]: Flushing: @CALLYAC Test Call~(425) 555-1212 2012-01-04 19:38:42.857600 [Info.][YAC Listener(25)]: server.Pending() is cleared, waiting for next call[/code] Tested it with 10 seconds auto-close of notify setting with pausing of media enabled, and it perfectly paused media, showed dialog once and closed itself to resume media playback. No idea why my YAC server sends out 9x the data, because it only shows it once in YAC log and once on all the external YAC listners. Perhaps it is because I got YAC server running on same system as MediaPortal, or the concurrent-RDP hack I've applied, or whatever gremlin. Either way it works, so I'm happy :) I also changed the way the YAC dialog shows inside MediaPortal. [code] titlebarStr = "Call at " + currentTime.ToLower() + " from:"; bodyStr = callernameStr + "\n" + phonenumStr;[/code] Because I wanted the number and name to be larger and did not care much about the time itself. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
ISDN CallerID and MP1.2
Contact us
RSS
Top
Bottom