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
Related
I am listening to incoming call on one of my endpoints and trying to generate a twilio response to forward that email to few other phone numbers. I also want to have action tag configured for each of this messages. My xml looks something like this -->
<?xml version="1.0" encoding="UTF-8"?>
<Response>
<Message action="https://test-5411.twil.io/test-log" to="+1831273xxxx" from="+1516407xxxx">
Hello 1!
</Message>
<Message action="https://test-5411.twil.io/test-log" to="+1831555xxxx" from="+1516407xxxx">
Hello 2!
</Message>
<Message action="https://test-5411.twil.io/test-log" to="+1831444xxxx" from="+1516407xxxx">
Hello 3!
</Message>
</Response>
Twilio docs say that -
There are certain situations when the TwiML interpreter may not reach verbs in a TwiML document because control flow has passed to a different document. This usually happens when a verb's 'action' attribute is set.
I think I am running into this exact situation. In my case, only the first phone number receives the SMS and the other 2 don't. Is there a workaround for this ?
Twilio developer evangelist here.
I had a play around with this and in this case you are right that using an action will mean that the subsequent <Message>s won't ever be reached. I also tried putting further <Message> elements in the response to the webhook to the action, but that didn't work either.
So the workaround here is to use the REST API to send the messages instead of using TwiML.
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
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
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.
I am trying to run the following YQL query:
select * from xml where url='LinkToMyServer/PerformSomeOperationAndGetXml'
However, I am getting the following result:
<?xml version="1.0" encoding="UTF-8"?>
<query xmlns:yahoo="http://www.yahooapis.com/v1/base.rng"
yahoo:count="0" yahoo:created="2013-01-03T23:17:06Z" yahoo:lang="en-US">
<diagnostics>
<publiclyCallable>true</publiclyCallable>
<url execution-start-time="1" execution-stop-time="4555"
execution-time="4554" proxy="DEFAULT"><![CDATA[LinkToMyServer/PerformSomeOperationAndGetXml]]></url>
<user-time>4555</user-time>
<service-time>4554</service-time>
<build-version>32943</build-version>
</diagnostics>
<results/>
</query>
Is there any way to increase the timeout somehow?
Thanks!
I don't think there's a way to increase the YQL request timeout. The only documentation I found related to this - Paging and Table Limits - mentions a 30 second overall time limit for a YQL statement, but doesn't specifically mention the request time.
For a comparison test, I tried select * from xml where url='http://blackhole.webpagetest.org' and got similar results as yours - YQL timeout just under 5 seconds with empty results set.
If you can't get your server response time down to under 5 seconds, you may need to find a different solution.