I guess you are using ejabberd contributed module. However, a new official MAM module has been added to official ejabberd and it support latest version of MAM (0.3) and MUC archiving. It will be released in ejabberd 15.06, but you can already use it from source from Github repository. The...
The typical Erlang way of doing things is to spawn a process per independent task (or set of tasks). Process spawning is cheap and the scheduling is both extremely lightweight and generally handled for you automatically -- so this is the easy way of modeling a massively concurrent problem in...
No, you cannot have port reserved specifically for some vhosts. Port are shared for vhost. However, you can have a different databases for different vhost. See ejabberd documentation for reference: http://docs.ejabberd.im/admin/guide/configuration/#virtual-hosting In the following example, two vhosts are configured to use different database backends: host_config: "example1.com": auth_method: odbc odbc_type: odbc...
I resolve issue by setting server name and port Server name : localhost Port : 5222...
apache,xmpp,openfire,ejabberd,converse.js
You need to configure OpenFire to support BOSH (Bidirectional-streams Over Synchronous HTTP). Log in to the admin console, then go to Server-> Server Settings -> HTTP Binding....
ssl,xmpp,openfire,ejabberd,xmppframework
I'd recommend trying to get some logs to find out exactly what is taking the most amount of time. Figuring out exactly how many roundtrips you are using will help you determine what to optimize. There's a XEP for XMPP Quickstart, XEP-0305. This has some general recommendation, but also a...
Here is a sequence that should work fine: Send the presence subscribe. Wait for reply. Set the name on roster item. We will have a look to see if we can improve to handle this case better as well....
It was a problem with my own understanding with DNS .The domain name you set up when you set up your xmpp server should be an already existing ACCESSIBLE address on the network. I found the name of my pc simply by running the famous ipconfig/all on windows and used...
For example, when use this record -record(cuser, { id, login_id, email}). to create mnesia table, then the primary key is id, but when you change this recode to this: -record(cuser, { {id,login_id}, email})., then the primary key is {id,login_id}. You can use an tuple as the primary key....
You do not want to do that. This is not a scalable design. Having a roster for the bot with all presence of the server is the best way to create a deadly bottleneck as you scale. Consider writing a native ejabberd module that intercept the packet you want and...
In my understanding the behaviour of ejabberd is correct from the XMPP specification point of view. It is doing the right thing and should not in that case forward message to the offline store, because you are not offline technically. It is just not the right place to place your...
It appears that from Ejabberd 15.03 version, WebSockets are fully supported as stated here: Ejabberd 15.03...
In my understanding, a slave get the data replicated but would simply not be active. The slave needs the data to be able to take over the task of the master at some point. It seems to means that the core of the setup you describe is not about disabling...
erlang,global-variables,ejabberd
Other ways are using ETS tables (simpler to use than Mnesia, but don't offer distribution, persistence or transactions), or using a gen_server process to store global values.
I think you need to use mod_shared_roster_ldap
You should try replacing the dependancy link to Github using https:// instead of git:// It should fix your issue. We will check the project to make sure all our dependancies use https url scheme instead of ssh....
I see you are using port 5280. This is HTTP port for XMPP over Bosh. However, you are trying to connect using XMPP over standard TCP socket. Are you sure you should not use port 5222 ?
you will have to use mnemosyne getRecords(ListMember)-> F = fun() -> Q = qlc:q( [ Record || Record <- mnesia:table(table_name_here), exists(Record#table_name_here.member_list, ListMember) ]), qlc:e(Q) end, {atomic, L}=mnesia:transaction(F), L. you then need to implement function exists(Member_list, Member) which scans the Member_list for the member and returns true if found and false...
You're passing Packet (a tuple: {From, To, XML}) to xml:append_subtags/2 while you should pass just XML. Your add_child/1 should look more like: add_child({From, To, XML} = Packet) -> Tag = {<<"a">>, <<"b">>}, NewPacket = {From, To, xml:append_subtags(XML, [Tag])}, ?INFO_MSG(" To party: ~p~n",[To]), NewPacket. I also changed {"a", "b"} to {<<"a">>,...
When the user gets offline, the default behaviour is the same, no matter which method is used (explicit session close or unvoluntary disconnect). This is per XMPP specification. If you want to customise the behaviour, it will not be easy as there is no way to know the reason why...
Guys i have figured out the issue for this. I have installed Ejabberd 14.05 version. The mod_rest module was including the ejabberd_http.hrl file for its dev_include directories.In the Ejabberd 14.05 the record for ejabberd_http.hrl are changed. "opts = [] :: list()," is an extra header in the ejabber-contrib`s include folder....
file:write_file takes an iolist, not a plain Erlang term. You could format the term as an iolist using io_lib:format: file:write_file("/tmp/logs.txt", io_lib:format("~p.~n", [Result]), [append]) ...
If your request find multiple row, the answer is (I guess) {atomic,List} where List is a list that contains more than one element and thus cannot match with [R] which is a list of one single element. What you can do is receive the list and traverse it to print...
As mentioned in ejabberd forums, mysql backend for mod_mam is not available in ejabberd community edition, but it is expected to be released on june 2015.
android,sockets,ssl,erlang,ejabberd
Here is how you can go about it. I work on the sandbox environment and after a bit of patching, i could make it work. Follow the patching done here: http://erlang.org/pipermail/erlang-questions/2015-June/084868.html You would be required to make changes in ssl_cipher.erl and ssl_handshake.erl files. These 2 files are a part of...
xmpp,openfire,ejabberd,mongoose-im
What you are trying to do is to basically store a counter of unseen stuff in your account. I think you do not need flexible offline retrieval as when you connect the messages would simply become unseen. You thus only have to deal with one case: Unseen. I will reply...
android,xmpp,ejabberd,smack,asmack
As the error stanza says, this is an internal server error. The server is not able to generate a CAPTCHA for the registration form for some reason. You'll have to ask the server administrator to have a look at the configuration.
xmpp,message,ejabberd,xmppframework
I guess the reason is that B lost connection suddenly and the server still think B is online. Thus the offline message does work under this condition Yes you are absolutely correct,this is well known limitation of TCP connections. There are two approaches to your problem 1 Server side...
This is what I am doing. During registration process in my Android Chat application, I post data like the desired userid (jabberid), password, email, display name, gender, mobile etc. to my PHP API. The PHP code validates if userid already exists and if it doesn't then it creates the user...
You can use ejabberd xml:element_to_binary/1:...
It depends if you configured your room as anonymous or not. Configure that room as anonymous and it will behave as you expect. The behaviour you mention is from XEP-0045 v1.25. For non-anonymous room the original from field should be defined with Extended Stanza Addressing. Changes are not yet supported,...
I guess you are using external authentication or a custom authentication. In that case, ejabberd cannot access to the full user database and thus can only dispatch to known users, that are the ones that are online.
android,google-app-engine,backend,ejabberd,google-cloud-messaging
Announced last week: Engage your users across Android, iOS and Chrome via Google Cloud Messaging 3.0: https://developers.google.com/cloud-messaging/ https://www.youtube.com/watch?v=gJatfdattno ...
I do not think it is possible as default, without customizing ejabberd application code.
To get full roster list, you need to send a roster request: - (void)FetchFriends { NSError *error = [[NSError alloc] init]; NSXMLElement *query = [[NSXMLElement alloc] initWithXMLString:@"<query xmlns='jabber:iq:roster'/>"error:&error]; NSXMLElement *iq = [NSXMLElement elementWithName:@"iq"]; [iq addAttributeWithName:@"type" stringValue:@"get"]; [iq addAttributeWithName:@"id" stringValue:@"ANY_ID_NAME"]; [iq addAttributeWithName:@"from" stringValue:@"[email protected]"]; [iq addChild:query]; [xmppStream sendElement:iq]; }...
mysql,ios,chat,ejabberd,xmppframework
In order for registration to work, you would need to ensure that the stream is connected. I have shown below a sample of how to register a user. - (IBAction)signUpButtonPressed:(UIButton *)sender { // when the sign up button is pressed, set the JID for the xmpp stream [self.xmppStream setMyJID:[XMPPJID jidWithString:jid]];...
offline_message_hook is only called when the server is routing a message to a user who is not online. user_send_packet is run every time the server receives a stanza from a client. This might explain why the handler is not run, though it depends on how you test. There's an article...
Finally! after learning more about erlang nodes and ejabberd I found a bash script here that would allow you to kill any erlang node. After running epmd -names I made sure ejabberd was running on "ejabberd" node and not "[email protected]", All I had to do was to excute ./kill-erlang-node.sh ejabberd...
I don't know why, but make clean then make again made it work. I figured this out by making that Canillita thing from the tutorial and seeing that it had no problem with Jiffy, so I assumed it was because I was making it clean.
The jlib.hrl file in ejabberd repository contains -include("ns.hrl"). (line 21) and -include_lib("p1_xml/include/xml.hrl"). line 22. The include_lib means that it will search the file in library path. You could modify this and add the necessary files in your directory (maybe a simple solution to test?) but I think that the clean...
This feature is not available in ejabberd Community Edition at the moment. This is part of ejabberd Business offering....
xmpp,ejabberd,service-discovery
Access to the all users info node is hard-coded to use the configure access rule. In the default configuration, it's set to only allow server admins: %% Only admins can use the configuration interface: {access, configure, [{allow, admin}]}. There is no way to configure ejabberd to give access to just...
XMPP does not have the concept of whatsapp group as default. You need to roll out a custom approach to build it. However, with the existing building bricks in ejabberd, MUC, MAM and a bit of customization, you can get very close to the same behaviour....
postgresql,unicode,erlang,ejabberd
Erlang ODBC driver perfectly fetched the status column from your database. Indeed, PostgreSQL encodes your data is UTF-8, and the value you get is UTF-8 encoded. Status = <<209,139,209,132,208,178,208,176,209,139,209,132,208,178,208,176>>. This is a binary representing the string ыфваыфва in UTF-8. You can directly use UTF-8 encoded binaries in your code. If...
android,xmpp,ejabberd,smack,asmack
I have found the problem all i did is adding this line: ConnectionConfiguration.setSecurityMode(SecurityMode.disabled); and i was connected to server successfully here's my configuration in the end : ConnectionConfiguration ConnectionConfiguration = new ConnectionConfiguration(HOST, PORT); ConnectionConfiguration.setDebuggerEnabled(true); ConnectionConfiguration.setSecurityMode(SecurityMode.disabled); ...
You may want to look into ejabberd.yml which is the new Yaml config file format.
apache,xmpp,ubuntu-14.04,ejabberd,ejabberd-http-bind
XMPP Prebind for PHP needs PHP5 curl extension. While Enabling Curl extension , it solved the issue of 'Internal Server Error'.
First you need to check if server supports In-Band Registration. As far as I know, public registration at jabber.org is disabled for a long time.
You can use function xml:get_path_s, asking it to descend into the element called received to get the attribute called id: > xml:get_path_s(Packet, [{elem, "received"}, {attr, "id"}]). "018A12FB-0718-4304-87FD-430C59EDB4F9" ...
13.12 uses different type for xmlelement. Packet is a type of record #xmlel, so you need to insert new element to Packet#xmlel.children. on_filter_packet({From, To, #xmlel{ children=OldChildren } = Packet}=Input) -> ... TimeElem = #xmlel{ name = <<"time">>, children = [{xmlcdata, <<"testtime">>}]}, NPacket = Packet#xmlel{ children = [TimeElem|OldChildren] }, ... Not...
Module_value=?MODULE.Will give value in string.You can use list_to_binary() function to convert it into binary
Body Variable:- Body = lists:flatten(mochijson2:encode( { struct,[ { registration_ids, ['KEY']}, { data,[{ message,[Message] } This is the final JSON Packet that worked with Google GCM API....
android,keystore,ejabberd,asmack,sasl
Here is the answer for this problem... AndroidConnectionConfiguration config = new AndroidConnectionConfiguration(server, port); if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) { config.setTruststoreType("AndroidCAStore"); config.setTruststorePassword(null); config.setTruststorePath(null); } else { config.setTruststoreType("BKS"); String path = System.getProperty("javax.net.ssl.trustStore"); if (path == null) path = System.getProperty("java.home") + File.separator + "etc" + File.separator + "security" +...
google-app-engine,xmpp,ejabberd
To address your questions: Am I understanding this correctly? You use to have to use Google Talk XMPP service, but I guess, yes, now you need to deploy your own server. If so- does that mean I must host my own xmpp server (ejabbered) if I want on-the-fly session-based clients?...
android,xmpp,toast,ejabberd,instant-messaging
You've got an extra semi-colon here if (chat.getLastText().contains("Mom") && (!messageItem.isRead())); <------ So your next block of code containing the Toast show statement will always be executed. Remove the semi-colon...
javascript,xmpp,ejabberd,strophe
I've changed the callback function like this : function callback(iq){ $(iq).find('item').each(function(){ var jid = $(this).attr('jid'); alert(jid); }); } Works well.....
At the moment, ejabberd only support multicasting to local user and does not support relaying. I created a feature request for you on ejabberd ticket tracker: https://github.com/processone/ejabberd/issues/583...
Since Erlang webserver (Yaws) CAN run PHP scripts, this is an example. first on the yaws.conf, write this. the env variable. php_exe_path = /usr/bin/php-cgi Also be sure you enable the php processing for the individual server, like this. <server www.example.org> port = 80 listen = 0.0.0.0 allowed_scripts = php yaws...
exception,error-handling,exception-handling,erlang,ejabberd
Seems the reason is an exception happens in mochijson2:decode/1. The function doesn't return a error as a tuple, instead the process crashes. There isn't enough information to tell what exactly the reason is. However I guess that the data format of Ccode might be wrong. You can handle exception using...
mod_mam from ejabberd-contrib works perfect. Problem solved.
database,postgresql,xmpp,ejabberd
As a default, message history are not stored in the database. You may want to look into the Message Archive Management (XEP-0313, aka MAM) XMPP extension, supported in ejabberd 15.06. You can use the mod_mam (Message Archive Management - XEP-0313) module. It works perfect. And dont forget the add the...
python-2.7,ubuntu-14.04,openfire,ejabberd
Solved the issue problem wan with my settings,and then restarted the server using sudo service ejabbers restart.It worked
I guess that you want to do Packet_Type = xml:get_tag_attr_s("type", XML), not Packet_Type = xml:get_tag_attr_s("type", Packet)
android,erlang,xmpp,ejabberd,user-presence
Scenario 1: When I swipe-right the app (kill the app), the user goes offline on the server immediately. Its status is changed to offline at that very instant. In above case your Android xmpp client is sending presence as unavailable before closing your Android application, maybe your Android XMPP...
Your question is "how do I store data in Erlang?" There are many answers. Probably, you want to read about Mnesia. Or use a relational database. Or use basically any other data store (Redis, MongoDB, DynamoDB, etc, etc, etc) depending on your needs and situation....
This can be get by Host=?MYHOSTS.?MYHOSTS is a Macro in erlang...
First and foremost, it looks like you're trying to connect directly to port 5222 (typically used for XMPP), but in order to use Strophe from a client-side webpage, you must use HTTP-Binding (aka BOSH). XMPP vs BOSH Strophe speaks XMPP, but it is unique in that it does not actually...