Chat Capture Question

Ice/DBus, Web-Interfaces, Management tools

Chat Capture Question

Postby daekesh » Thu Jan 12, 2012 3:57 pm

Hi. Recently installed mumble. I don't know much about it. I had a google around and looked at the ice interface a bit. I'm wondering if it's possible to access the chat (text chat) that goes on in mumble from the ice interface (or any other way.) The server/meta callbacks only really mentioned users joining, servers starting, etc. I didn't see a channel or text callback or anything.

Reason being is that I wrote a TS3/irc bridge and want to do the same thing for mumble. It was fairly easy with the ts3 query login, but I'm not sure if it will work with mumble. I just wanted to check if it were possible before I really dived into anything.

Thanks.
daekesh
 
Posts: 1
Joined: Thu Jan 12, 2012 3:52 pm

Re: Chat Capture Question

Postby pcgod » Fri Jan 13, 2012 10:35 pm

IIRC someone added a text message callback to in the current snapshot versions, so it should be possible to write the same thing for Mumble.
User avatar
pcgod
Team member
Team member
 
Posts: 68
Joined: Tue Nov 24, 2009 12:24 am

Re: Chat Capture Question

Postby mishagale » Thu Aug 30, 2012 9:24 pm

daekesh wrote:Hi. Recently installed mumble. I don't know much about it. I had a google around and looked at the ice interface a bit. I'm wondering if it's possible to access the chat (text chat) that goes on in mumble from the ice interface (or any other way.) The server/meta callbacks only really mentioned users joining, servers starting, etc. I didn't see a channel or text callback or anything.

Reason being is that I wrote a TS3/irc bridge and want to do the same thing for mumble. It was fairly easy with the ts3 query login, but I'm not sure if it will work with mumble. I just wanted to check if it were possible before I really dived into anything.

Thanks.


How did you get on with this? I'm planning to do something similar, do you have any code that I might be able to re-use?
mishagale
 
Posts: 1
Joined: Thu Aug 30, 2012 8:39 pm

Re: Chat Capture Question

Postby sirdiego » Wed Sep 25, 2013 11:13 am

Hi guys,
I just tried to figure out how to add a Channel-/UserCallback so I can capture chatmessages respectively the URI posted so i can collect them.
I could not find any on the Slice Api Doc. I also looked into the code like pcgod has suggested but I couldn't find anything. I need some help finding them (if they are there).
Thank you in advance
diego

[edit]Okay, maybe it is the userTextMessage method on the ServerCallback. But I have no clue to use it with php. I tried playing around with the weblist.php Script and every normal stuff works, but I just don't know how to add my own callbacks to the Server. I added two comments to my Example Code:
Code: Select all
<?php
$ICE = Ice_initialize();
   class MyServerCallback implements Murmur_ServerCallback {

      public function userConnected($state) {
         var_dump($state);
      }

      public function userDisconnected($state) {
         // TODO: Implement userDisconnected() method.
      }

      public function userStateChanged($state) {
         // TODO: Implement userStateChanged() method.
      }

      public function userTextMessage($state, $message) {
         var_dump($message);
      }

      public function channelCreated($state) {
         // TODO: Implement channelCreated() method.
      }

      public function channelRemoved($state) {
         // TODO: Implement channelRemoved() method.
      }

      public function channelStateChanged($state) {
         // TODO: Implement channelStateChanged() method.
      }

   }

   $base = $ICE->stringToProxy("Meta:tcp -h 127.0.0.1 -p 6502");
   $meta = $base->ice_checkedCast("::Murmur::Meta");


   $servers = $meta->getBootedServers();
   $default = $meta->getDefaultConf();

   // I have no idea if this ist the right way to create a callback
   $callback = Murmur_ServerCallbackPrxHelper::uncheckedCast($base, 'MyServerCallback');
   foreach ($servers as $s) {
      $s->addCallback($callback);
   }
   while(true) {
      // I need a loop, right?
   }
?>
sirdiego
 
Posts: 3
Joined: Wed Sep 25, 2013 11:09 am

Re: Chat Capture Question

Postby kissaki » Wed Sep 25, 2013 5:59 pm

I do not think PHP works for callbacks.

For python, see how authenticator attaches itself as a callback for example: https://gitorious.org/mumble-scripts/mu ... th.py#L253
MumPI: Your Mumble Web Interface in PHP
User avatar
kissaki
Team member
Team member
 
Posts: 1280
Joined: Sat Jan 09, 2010 12:15 pm

Re: Chat Capture Question

Postby sirdiego » Wed Sep 25, 2013 6:16 pm

kissaki wrote:I do not think PHP works for callbacks.

For python, see how authenticator attaches itself as a callback for example: https://gitorious.org/mumble-scripts/mu ... th.py#L253

Uh, okay. That's a pity. So I have to switch at least the listener for this to python? :/
sirdiego
 
Posts: 3
Joined: Wed Sep 25, 2013 11:09 am

Re: Chat Capture Question

Postby kissaki » Fri Sep 27, 2013 5:01 pm

If you get it to work with PHP, please report back.
But PHP is pretty much made for run-once web requests rather than command line programs that may run continuously.
Just that I never heard someone getting the callbacks to work or that it did not work in the past does not mean it does not work at all or now.

I am not sure what your actual issue is.
The slice doc ís universal and not language specific.
Actually, I guess the slice doc is no up to date.
See https://github.com/mumble-voip/mumble/b ... ur.ice#L75
and https://github.com/mumble-voip/mumble/b ... r.ice#L291
and that is probably what you asked for?

I am gonna see if/how I can update the slice doc to the stable versions stuff.
MumPI: Your Mumble Web Interface in PHP
User avatar
kissaki
Team member
Team member
 
Posts: 1280
Joined: Sat Jan 09, 2010 12:15 pm

Re: Chat Capture Question

Postby sirdiego » Sat Sep 28, 2013 9:21 pm

For me at least PHP worked out for CLI scripts pretty well. I'll still give it a shot before I give up and try it with python.
Thank you for your support, I stuck at getting the ServerCallback running so I can read the TextMessage.

I'll let you guys know if I (at some time) get it runnign with PHP.

Thank you again.

kissaki wrote:If you get it to work with PHP, please report back.
But PHP is pretty much made for run-once web requests rather than command line programs that may run continuously.
Just that I never heard someone getting the callbacks to work or that it did not work in the past does not mean it does not work at all or now.

I am not sure what your actual issue is.
The slice doc ís universal and not language specific.
Actually, I guess the slice doc is no up to date.
See https://github.com/mumble-voip/mumble/b ... ur.ice#L75
and https://github.com/mumble-voip/mumble/b ... r.ice#L291
and that is probably what you asked for?

I am gonna see if/how I can update the slice doc to the stable versions stuff.
sirdiego
 
Posts: 3
Joined: Wed Sep 25, 2013 11:09 am


Return to Scripting

Who is online

Users browsing this forum: No registered users and 1 guest