multiple registration of transport in xmpp protocol - xmpp

I am working on xmpp protocol and I came across with Gateway concept, in which it allows to communicate to services which uses another protocol like msn,aim,yahoo etc ..
As far as I understand I beleive that it allows only 1 registration for a particular gateway at a time.For example I can register only 1 msn account at a time.I'am not sure if its really true.
Is it possible to register more that 1 account for a particular gateway and how?Please help me with this..

That is true. All gateways I know (e.g. spectrum) only allow one registration per instance. But you can run multiple instances of the smae gateway type e.g.:
icq1.jabberserver.com
icq2.jabberserver.com
That is, additional to run mutliple gateway components to different IM neworks, like
gtalk.jabberserver.com
irc.jabberserver.com
icq.jabberserver.com
msn.jabberserver.com
...
you also run multiple instances of the same gateway component on your server. Please not that this are (internal and/or external) components to your XMPP server and not individual XMPP servers!

Related

How to test a server API (REST) including interactions from multiple users/clients with symfony?

We have a supplier that develops a linux-server for us exposing a REST API. We are developing a client application that uses this REST API. Multiple clients running this client applications work together and e.g. have a chat functionality. I would now like to write tests using the rest-API to verify if the server logic for this chat functionality is working: e.g. "Does client Jane receive the correct message if client Tarzan is sending a message".
I am thinking about something like this (pseudo-code):
client_tarzan = createclient()
client_jane = createclient()
#the actual login logic is hidden to make the example easier
client_tarzan.login_to_server
client_jane.login_to_server
client_tarzan->request('POST‘,hello_message_for_jane)
received_message = client_jane->request('GET‘,inbox_path)
expect(received_message).to be(expected_message)
The server needs the REST API calls from Tarzan and Jane to be coming from different IP addresses as it internally uses the IP addresses in its logic.
Is this possible with synfony?
How would I start to do something like that?
Do I need to do something special when interfacing the linux server (e.g. run it in a VM?) as I cannot imagine how simfony would be able to create actual TCP packages coming from different IP addresses in order to make the server believe that the two clients are actually separate. I guess this is the core of my question.
Symfony's test-client supports faking IP addresses and you can create multiple clients in a test.
The following example should give you an idea how to get started:
$client1 = static::createClient([], ['REMOTE_ADDR' => '11.11.11.11']);
$client2 = static::createClient([], ['REMOTE_ADDR' => '22.22.22.22']);
$client1->request('POST', '/say', ['message' => 'Hi']);
$client2->request('GET', '/chat');
For further guidance please consult the documentation chapter: Working with the Test Client

What is sb protocol and how is works internally?

I have configured a notification hub using Azure portal for implementation of push notifications for mobile apps. On navigating to the Access Policies section, I see couple of policies with names: DefaultListenSharedAccessSignature and DefaultFullSharedAccessSignature as shown in the below diagram. Both the policy names contain connection string. One of the connection string is as follows:
Endpoint=sb://expedia.servicebus.windows.net/;SharedAccessKeyName=DefaultFullSharedAccessSignature;SharedAccessKey=JnVgQvxxxxxxxxxxxxxxxxxxxxxxxy1HgWUfUo=
I want to understand what is sb protocol here and want to how it works internally and does it depends on HTTPS.
I have to access the above endpoint from a remote server. How to consider the above while white listing the proxy rules to allow access to the above endpoint.
sb is just an endpoint schema that we understand, and it's not an actual protocol. The actual protocol is https.
According to a more broadly framed Service Bus FAQ, they detail the ports that are used by sb:// which uses both HTTPS (443) and AMQP (5671, 5672)
https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-faq#what-ports-do-i-need-to-open-on-the-firewall--

Calling Rest services with various securities from MULE HTTP ENDPOINT

i have a requirement, i want to call list of REST services which have different security mechanisms, like, some may have HTTPS and others may have naked HTTP, few others may have basic authentication and remaining may require a "Authorization header" . i want to call all these REST services with different service mechanism from a single HTTP OUT BOUND END POINT . how can i configure the HTTP endpoint to accomplish this ? or should i use different end points to accomplish my requirement .
You can't do that. Some of the attributes of the Http connector/endpoints can be configured as an expression but not all of them.
You'll have to leverage a choice-router and a number of http and https endpoints.
Different service mechanism requires different configuration...
If you want to do it in a single flow, as Victor said you need to use choice router and based on certain condition it will call the rest service it required...
and in each Choice block, you have to configure the calling of each type of rest service with it's security mechanism

XMPP protocol allow registration using protocol

I want to write own XMPP client. I have jabber server. Is it real use XMPP library only register on server programaticaly?
I want to generate login, password prog-ly, then register prog-ly on server and start to chat. Or XMPP protocol doesn't allow have registering operation?
Registering an account via the XMPP protocol is known as in-band registration, defined in XEP-0077.
However, not all servers support this, or they have it disabled, or impose time/IP limits, as this makes it easy for people writing spambots (which hopefully you are not doing) to easily create multiple accounts automatically.
Like with most XMPP extensions, you can use Service Discovery to determine whether a server supports in-band registration.

SIP registration api

Does anyone know if any SIP providers provides an API allowing users to register directly from the iPhone application. As a user register with my application, they should be registered with the sip provider(a sip account) as-well. Is this possible.
Once you have a SIP account at a specific provider, all standard SIP providers allows you to register via the standard SIP protocol. It is a HTTP like protocol and you can assemble the messages directly. But most likely you will need something like called SIP client that creates the messages, handles the call state, etc. There are plenty of open source SIP clients with open APIs out there even for iPhone. One very popular such client is called pjsip, it might be interesting for you.
I've never come across a SIP provider that has an API that duplicates a SIP registration. It's actually a bit of a strange request since the purpose of a SIP registration is to let the server know that the SIP client is available and where it can be contacted. If you perform that function outside of SIP can you be sure that the SIP client is available? And if so will you always know what address it can be contacted on especially considering that contact addresses used in SIP often get mangled due to NAT?
What a lot of providers do offer is the ability to set up static SIP URI forwards, for example you could set a rule that states all incoming calls should be forwarded to SIP URI sip:me#somewhere.com. Setting up that kind of rule can remove the need to register in a lot of cases since the provider will now always forward calls to that SIP URI irrespective of whether any devices are registered on the account or not.