I'm trying to use APE in a POS software we've made. The idea is to push an event when the phone ring. I have a UDP listener written in PHP that send via inlinepush an event with the number to the browser when the phone rings. It works, but on the client side, I HAVE to make a new user to join the same channel every time i refresh the page, and in my case, as it's a POS software, pages refresh very often... How could I connect only one user to only one channel ?
In fact, I'd like to set ONE channel with only ONE user. The server send in PUSH to this channel (how can I send to one user ?) SERVER CODE : : APEserver = 'http://ape.local.ape-project.org:6969/?'; $APEPassword = 'testpasswd'; $cmd = array(array( 'cmd' => 'inlinepush', 'params' => array( 'password' => $APEPassword, 'raw' => 'callerid', 'channel' => 'testchannel', 'data' => array( //Note: data can't be a string 'numero' => $numero, 'ligne' => $ligne ) ) )); CLIENT CODE : var client = new APE.Client(); client.load(); client.addEvent('load', function() { client.core.start({"name":"CALLERID"}); }); client.addEvent('ready', function() { console.log('Connected'); client.core.join('testChannel'); client.onRaw('callerid', function(raw, pipe) { alert('PHONE : '+raw.data.numero+' ON LINE '+raw.data.ligne); }); }); In the client code, every time I refresh the browser, I have a message that say : NICK_USED So, I thought about creating random user, but I am affraid that at the end of the day, I will have too many user conencted... Am I right ? Thanks for your help, Regards, Aurélien. -- You received this message because you are subscribed to the Google Groups "APE Project" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/ape-project?hl=en --- APE Project (Ajax Push Engine) Official website : http://www.ape-project.org/ Git Hub : http://github.com/APE-Project/
