server = 'jabber.de.cw.net'; $JABBER->port = 5222; $JABBER->username = 'asterisk'; $JABBER->password = 'xxxx'; $JABBER->resource = 'ClassJabberPHP'; $JABBER->Connect() or die('Could not connect!'); $JABBER->SendAuth() or die('Could not authenticate!'); $JABBER->SendPresence(NULL,NULL,'online'); // $JABBER->SendMessage('xxx@jabber.de.cw.net', 'chat', NULL, array( 'body' => 'Call from '.$agi['callerid'].' on '.$agi['dnid'] )); $JABBER->SendMessage('xxx@jabber.de.cw.net', 'chat', NULL, array( 'body' => 'Call from '.htmlspecialchars($agi['callerid']).' on '.$agi['dnid'] )); $JABBER->Disconnect(); fclose($in); fclose($err); ?>