Unable to receive affiliation change notification from iq - erlang

I am using mod muc_light in MongooseIM from source code(ver-3.1.0) and taking help from this article I am able to perform the below operations successfully without any trouble:
create a new muc light room.
send/receive text message stanza
queries MAM and receives regular groupchat message. ['6.2.1 Groupchat message from occupant' from above article][Even, here I am getting the muc info but since this is related to a particular muc light room. So, not much useful.]
But I am unable to query MAM and receives an affiliation change notification. See topic [6.2.2 Affiliation change] in the above article link.
Following is the request/response for 'affiliation change notification'
// Request to server with type='set'
<iq type='set'
id='mamget2'
to='muclight.localhost'>
<query xmlns='urn:xmpp:mam:1' queryid='f37'/>
</iq>
// Response from server
<iq xmlns='jabber:client'
from='muclight.localhost'
to='ip0a0g0ur63vdjns#localhost/E42B7412598F3B081543-557985-559692'
id='mamget2'
type='error'>
<error code='' type='cancel'>
<not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>The action is not allowed.</text>
</error>
</iq>
// Request to server with type='get'
<iq type='get'
id='mamget2'
to='muclight.localhost'>
<query xmlns='urn:xmpp:mam:1' queryid='f37'/>
</iq>
// Response from server
<iq xmlns='jabber:client'
from='muclight.localhost'
to='ip0a0g0ur63vdjns#localhost/E42B7412598F3B081543-557985-559692'
id='mamget2'
type='error'>
<error code='' type='cancel'>
<not-allowed xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/>
<text xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'>The action is not allowed.</text>
</error>
</iq>
MongooseIM config:
{mod_muc_light, [
{host, "muclight.#HOST#"},
{backend, rdbms},
{max_occupants, 256}
]},
{mod_mam_meta, [
{backend, rdbms},
{no_stanzaid_element, true},
{is_archivable_message, "muclight.#HOST#"},
{pm, false},
{muc, [
{host, "muclight.#HOST#"}
]}
]}
Questions/concerns:
Am I doing something wrong in config? - [I doubt this, because some others operation are working fine like mentioned above]
Am I sending the incorrect IQ stanza - [I doubt this because I am copying the exact same stanza example provided in above link]
Should I update MongooseIM. [May be]
Anything else?
Please help

Related

Policy-Violation Error in Xmpp ios?

HI I'm working with the xmpp framework.every thing working fine till yesterday.But suddenly I'm facing below error then server Disconnected
<stream:error xmlns:stream="http://etherx.jabber.org/streams"><policy-violation xmlns="urn:ietf:params:xml:ns:xmpp-streams"/></stream:error>
Why this error I'm receiving.Please if any body knows help me.Thanks in advance
and also I'm getting another error like below
SEND: <iq type="error" to="manager.ip-1-148" id="30-22829"><query xmlns="jabber:iq:version"/><error type="cancel" code="501"><feature-not-implemented xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/></error></iq>
2016-06-08 03:16:00:834[12715:9b03] RECV: <message xmlns="jabber:client" from="manager.ip--148" to="919553#ip-172-148/Smack"><body>You are using an invalid client, and therefore will be disconnected. Please ask your system administrator for client choices.</body></message>

How to script custom Openfire IQ request in tsung

My IQ request is
<iq id="rn3Nd-0" to="servername#domain.com" type="set">
<query xmlns="my:xmlns:name">
<username>someuser</username>
</query>
</iq>
How do I customize tsung scripts to bombard my openfire with above IQ request. Value in username has to be dynamic and keep changing. I would like to create 1000 request in a minute. How can we achieve this in tsung script.
You can read the usernames from a CSV file. So if you need 100 users you can create a CSV of 1000 names and it will randomly pick names from that.
http://tsung.erlang-projects.org/user_manual/conf-sessions.html#reading-usernames-and-password-from-a-csv-file

FileTransfering in iOS with XMPPFramework and XMPPSiFileTransfer

I got stuck with implementing File Transfer functionality using iOS XMPPFramework(XMPPSiFileTransfer). I have tried out different ways and finally I could sent a file transfer request and the recipient got the request. But even if they accepted nothing seems to tranferring. I tried to sent request to recipients in Spark/Windows machine and iMessage/Mac. In the XMPPSiFileTransfer class itself, I found the developer comment as follow
"It's the other way around when we are the initiator. We send the request by calling initiateFileTransferTo:withData and then wait for the iq result with the si namespace of http://jabber.org/protocol/si, send a disco#info response, open a SOCKS5 socket and then wait for the other side the connect to start the transfer."
When I send a request by calling the method initiateFileTransferTo, SiFileTranfer generates the following XML:
<iq type="set" id="8FF7E518-E518-4A98-B122-914A8345C638" to="rajesh.rajan#chat.speridian.com/Spark 2.6.3" from="sreelash.s#chat.speridian.com/b79f10d5"><si xmlns="http://jabber.org/protocol/si" id="967DAA7A-F159-44D8-AD31-7C532AB459AD" mime-type="image/png" profile="http://jabber.org/protocol/si/profile/file-transfer"><file xmlns="http://jabber.org/protocol/si/profile/file-transfer" name="photoB29D9F41-EC41-41C8-AF6D-EA5E23FF906E.png" size="740"/><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="form"><field var="stream-method" type="list-single"><option><value>http://jabber.org/protocol/bytestreams</value></option></field></x></feature></si></iq>
Then I got the response on didRecieveIq as follows as mentioned in the developer comment.
<iq xmlns="jabber:client" id="8FF7E518-E518-4A98-B122-914A8345C638" to="sreelash.s#chat.speridian.com/b79f10d5" from="rajesh.rajan#chat.speridian.com/Spark 2.6.3" type="result"><si xmlns="http://jabber.org/protocol/si"><feature xmlns="http://jabber.org/protocol/feature-neg"><x xmlns="jabber:x:data" type="submit"><field var="stream-method"><value>http://jabber.org/protocol/bytestreams</value></field></x></feature></si></iq>
When I got the result with si namespace in didRecieveIq, the disco#info is sent as follow
<iq type="get" id="12A7231B-D50A-469E-96B4-BD39278B77EF" to="rajesh.rajan#chat.speridian.com/Spark 2.6.3" from="sreelash.s#chat.speridian.com/b79f10d5"><query xmlns="http://jabber.org/protocol/disco#info"/></iq>
and SOCKS5 socket is tried to open by calling the following method
- (id)initWithStream:(XMPPStream *)stream toJID:(XMPPJID *)aJid sid:(NSString *)sid
But I am getting "SOCKS5 Connection failed!" message. I am not able to identify what's the issue. Can anyone help me to sort out this issue?
Thanks in advance.
you need to make some modifications in the TURNSocket class XEP-0065.
try this xmpp
refer thislink

XEP 0055 (Jabber search) with iphone SDK

I am creating a XMPP sample on ios. What I am trying to do is search user over xmpp. I checked the opernfire server and it has the search plugin enabled. I gone through XEP:0055 and found the stanza. I also gone through this so question but did
I am done with xmpp connection and login. Now here are the details regarding to my server:
Host Name = 10.x.x.x;
Server name = abcd;
The request format I got from the XEP 0055 link is:
<iq type='set' from='romeo#montague.net/home' to='characters.shakespeare.lit' id='search2' xml:lang='en'>
<query xmlns='jabber:iq:search'>
<last>Capulet</last>
</query>
</iq>
I don't know what characters.shakespeare.lit is. I assume this is the server name. So I created following request:
<iq to="abcd" id="search2" xml:lang="en">
<query xmlns="jabber:iq:search">
<Username>kapil</Username>
</query>
</iq>
but I am not getting any response. I tried to replace the to value with following search.abcd and 10.x.x.x but I am not even receiving any response IQ for this rquest.
Any help plz.
shakespeare.lit is the xmpp host name. 'characters' is the Search service Name.
It is the name of a directory service. If you connect to a server, you can retrieve the list of services and use that server's directory service. Alternatively, you can use any server's directory service (depending on the service's configuration, you do not have to be connected to the server hosting the service).
var iq = $iq({
type: 'set',
id: 'search2',
to: 'vjud.yourserver.org'
})
.c('query', {xmlns: 'jabber:iq:search'})
.c('x', {xmlns: 'jabber:x:data', type:'submit'})
.c('field', {var: 'first'}).c('value','Rub*').up();
conn.sendIQ(iq);
note: to: characters.shakespeare.lit
Not your server but the vcard service search.

10001 Internal Error when trying to capture an authorization from PayPal with Activemerchant

I've successfully made authorized a card, and it shows up in my sandbox transaction log. When I try to capture using that authorization (with activemerchant, which uses SOAP), this is the XML it sends to the server:
<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
<env:Header>
<RequesterCredentials xmlns:n1="urn:ebay:apis:eBLBaseComponents" xmlns="urn:ebay:api:PayPalAPI" env:mustUnderstand="0">
<n1:Credentials>
<Username>seller_1249669053_per_api1.synergyeoc.com</Username>
<Password>snip</Password>
<Subject/>
</n1:Credentials>
</RequesterCredentials>
</env:Header>
<env:Body>
<DoCaptureReq xmlns="urn:ebay:api:PayPalAPI">
<DoCaptureRequest xmlns:n2="urn:ebay:apis:eBLBaseComponents">
<n2:Version>52.0</n2:Version>
<AuthorizationID>0RF01309N5838270B</AuthorizationID>
<Amount currencyID="USD">2600.00</Amount>
<CompleteType>Complete</CompleteType>
<Note/>
</DoCaptureRequest>
</DoCaptureReq>
</env:Body>
</env:Envelope>
Paypal returns the ever so descriptive 10001 "Internal Error." Can anyone spot what's not right here?
Just for fun, here is what ActiveMerchant parses as the response from paypal:
=> #<ActiveMerchant::Billing::Response:0x3e00698 #params={"payment_status"=>"None", "correlation_id"=>"a188cc8c5f94c", "timestamp"=>"2009-08-11T06:21:22Z", "pending_reason"=>"none", "build"=>"997644", "transaction_type"=>"none", "error_codes"=>"10001", "version"=>"52.0", "ack"=>"Failure", "message"=>"Internal Error", "reason_code"=>"none", "payment_type"=>"none"}, #test=true, #authorization=nil, #cvv_result={"code"=>nil, "message"=>nil}, #message="Internal Error", #success=false, #fraud_review=false, #avs_result={"code"=>nil, "postal_match"=>nil, "street_match"=>nil, "message"=>nil}>
I'd LOVE it if someone could help!!!
Use non standard credit card number .
I was using standard credit card number '4111111111111111' and getting the 10001 error.
Used "4024007148673576" and it works for me.
All I have are long-shot possibilities.
The interface could have gone down for unannounced reasons after you authorized. Similar thing happened on the 3rd, returning 10001s.
Could be related to https://ppmts.custhelp.com/cgi-bin/ppdts.cfg/php/enduser/std_adp.php?p_faqid=169
I'd also try reauthorizing with a small amount, but it should have given a different error if that was the problem.
Though it shouldn't make a difference if the auth succeeded, you haven't shown us the authorize transaction.

Resources