Beispiel #1
0
 function onSessionInitiate($jingle)
 {
     $jts = new \JingletoSDP($jingle);
     $sdp = $jts->generate();
     $cd = new \Modl\ContactDAO();
     $contact = $cd->get(cleanJid((string) $jingle->attributes()->initiator));
     if (!isset($contact)) {
         $contact = new Modl\Contact();
     }
     if ($sdp) {
         RPC::call('movim_desktop_notification', $contact->getTrueName(), $this->__('visio.calling'), $contact->getPhoto('m'));
         RPC::call('remoteSetJid', (string) $jingle->attributes()->initiator);
         RPC::call('remoteCall', 'onOffer', $sdp);
         RPC::commit();
     }
 }
Beispiel #2
0
 function onTransportInfo($jingle)
 {
     $jts = new \JingletoSDP($jingle);
     RPC::call('onCandidate', $jts->generate(), $jts->media);
 }