ejabberd

“Host key verification failed” using PHP Script - CentOS

依然范特西╮ 提交于 2019-12-11 10:27:07
问题 I am trying to create eJabberd users using PHP script. The following script is working perfectly on my local system(Ubuntu 14.04) : <?php error_reporting(E_ALL); ini_set('display_errors', '-1'); $username = 'userx1'; $password = '123456'; $node = 'localhost'; exec('ssh -t -t <hostname> ejabberdctl register '.$username.' '.$node.' '.$password.' 2>&1', $output, $status); if($output == 0) { echo "User created successfully."; } else { // Failure, $output has the details echo '<pre>'; foreach(

Ejabberd: error in simple module to handle offline messages

吃可爱长大的小学妹 提交于 2019-12-11 09:26:06
问题 I have an Ejabberd 17.01 installation where I need to push a notification in case a recipient is offline. This seems the be a common task and solutions using a customized Ejabberd module can be found everywhere. However, I just don't get it running. First, here's me script: -module(mod_offline_push). -behaviour(gen_mod). -export([start/2, stop/1]). -export([push_message/3]). -include("ejabberd.hrl"). -include("logger.hrl"). -include("jlib.hrl"). start(Host, _Opts) -> ?INFO_MSG("mod_offline

INFO_MSG method fails in ejabberd

自闭症网瘾萝莉.ら 提交于 2019-12-11 08:46:53
问题 I am trying to write a custom module in ejabberd XMPP server. This is the erl module i'v written. -module(mod_wish). -behavior(gen_mod). -include("logger.hrl"). -export([ start/2, stop/1 ]). start(_Host, _Opt) -> ?INFO_MSG("Loading module 'mod_wish' ", []), ok. stop(_Host) -> ok. I can compile it without any errors. But after i add this module to config file and restart the ejabberd server, serve does not start. it says C(<0.38.0>:gen_mod:75) : Problem starting the module mod_wish for host

Not able to connect ejabberd server on Amazon using XMPP framework of iOS

白昼怎懂夜的黑 提交于 2019-12-11 05:55:57
问题 I am working on XMPP framework to create Text chat application. We have configure ejabberd server on amazaon ec2. I have tested my application on locally configured server and was working fine but as i replaced host and username with amazone ec2 details i am getting error "Read Operation timed out". I searched for help but issue is still unresolved. Please help me in find out the solution for this. 回答1: I find out solution for my own problem. I downloaded the latest framework from https:/

Accessing ejabberd ReST API through node js app

泪湿孤枕 提交于 2019-12-11 04:47:57
问题 I have an ejabberd (16.01) server running on Ubuntu 16.04. I have another NodeJs application running on different server. Through NodeJs application, I wish to add users, add rosters, etc by using ReST API given at https://docs.ejabberd.im/developer/ejabberd-api/. I am doing simple configuration given at https://docs.ejabberd.im/developer/ejabberd-api/simple-configuration/ for this exercise. The configuration says to add below snippet: commands_admin_access: - allow: - user: "admin@localhost"

Ejabberd not sending presence stanza to other roster members

妖精的绣舞 提交于 2019-12-11 03:56:51
问题 I have an internal web chat application implemented in python/django and using ejabberd 2.1.3 and Strophe.js. When you open the website with a special access link, a cmd line call is executed to add you to a shared roster group: ejabberdctl srg_user_add 00024-540-1mCYpYTTCRcjJK5OWI7cWs xmpp.mydomain.com 1mCYpYTTCRcjJK5OWI7cWs xmpp.mydomain.com The executes successfully and if I execute this cmd manually the members are shown fine: ejabberdctl srg_get_members 1mCYpYTTCRcjJK5OWI7cWs xmpp

XMPP - Roster Subscription Explaination

风格不统一 提交于 2019-12-11 03:08:45
问题 Consider I've 2 users Alice and Bob on my Jabber Server. To add into the rosters with subscription as both , I need to do the following steps: Alice sends a subscription request to Bob. When Bob receives the request, he approves it. Bob may also be interested in Alice's presence, so he subscribes to her. And Alice needs to approve Bob's request. BUT Now consider, Bob was not on the server, i.e. he is unregistered and Alice tries to add him into her roster. Following are the steps which will

Extracting multiple row corresponding to a value in mnesia

混江龙づ霸主 提交于 2019-12-11 03:07:51
问题 Situation is:- i have mnesia tuples like {"Groupid(Primary key)","groupname","grouptype","creatorid","adminid","Member_list"}. Member_list="memberone@xyz,membertwo@xyz,memberthree@xyz".Now i want to extract all those rows in which membertwo@xyz exists.How to apply guard while selecting from mnesisa for this??Any pointers Now after going through the approach given by sherif following error is appearing in function checktable1:getRecords/1 (checktable1.erl, line 201) 37> checktable1:getRecords(

Efficient XMPP user search

痞子三分冷 提交于 2019-12-11 02:46:23
问题 I want to efficiently check for all local address book contacts if they have a jabber account. The users are registered on the XMPP server with the mobile phone number. I currently send the following XEP-0055 stanza to the ejabberd server and evaluate the result. <iq type="set" id="searchByUserName" to="vjud.ecoimac1.local" from="+1222333444@ecoimac1.local"> <query xmlns="jabber:iq:search"> <x xmlns="jabber:x:data" type="submit"> <field type="hidden" var="FORM_TYPE"> <value>jabber:iq:search<

ejabberd connection using Smack in android giving connection timed out error

。_饼干妹妹 提交于 2019-12-11 01:07:33
问题 Hello we have downloaded the ejabberd from this. domain is localhost and we have set the xmppDomain as my computer's ip address. I have used the following code for connection public static final String XMPP_DOMAIN = "localhost"; public static final String XMPP_HOST = "10.0.2.2";//kept for emaulator //public static final String XMPP_HOST = "192.168.1.152"; //ip of my pc public static final int XMPP_PORT = 5222; public static final String XMPP_RESOURCE = "xmppdemo"; public static final boolean