Esempio n. 1
0
 public function handle($stanza, $parent = false)
 {
     $from = (string) $parent->attributes()->from;
     $to = (string) $parent->attributes()->to;
     $id = (string) $parent->attributes()->id;
     $action = (string) $stanza->attributes()->action;
     $ack = new Send();
     $ack->setTo($from)->setId($id)->request();
     switch ($action) {
         case 'session-initiate':
             $this->event('jingle_sessioninitiate', [$stanza, $from]);
             break;
         case 'transport-info':
             $this->event('jingle_transportinfo', $stanza);
             break;
         case 'session-terminate':
             $this->event('jingle_sessionterminate', $stanza);
             break;
         case 'session-accept':
             $this->event('jingle_sessionaccept', $stanza);
             break;
     }
 }
Esempio n. 2
0
 function ajaxAckRequest($to, $id)
 {
     $ack = new Send();
     $ack->setTo($to)->setId($id)->request();
 }