Get information clientid connect and disconnect - mosquitto

My project, using mosquitto is mqtt server.
I want to get the information clientid once it connects or disconnects to server. Then it will automatically send to sub default. Please help me with this issue.

Assuming you want some other client to know when a certain client connects to the broker,
When your client connects , maybe in onConnected(depends on the client library) handle you can have a specific message published with connectin info. Which the listening client can be subscribed to.
Whereas for disconnection, try the last will message. To quote mosquitto.org
Last Will and Testament
The last will and testament or just “will” is a very nice feature of MQTT. When your client connects to the MQTT broker/server, it can give the broker this will, which consists of a topic and a message. If the client is disconnected from the broker unexpectedly, that is to say without sending a disconnect message, then the broker publishes the will message on the will topic.

Related

Can we publish to multiple topics at the same time using mosquitto_pub client?

When I try to publish to different topics using same client id it disconnects the previous connection.
It says the mosquitto_pub publishes a single message at a time so was wondering if this is a limitation.
MQTT Client Ids MUST be unique across all clients connected to the broker. The spec says the broker must disconnect any existing client when a new client with the same client id tries to connect.
The mosquitto_pub command will only publish a single message to a single topic (unless reading from a file or stdin, in which case it publishes a message per line, but again to a single topic).
If you want a single client to publish to multiple topics then you should look at one of the many MQTT client libraries and built a client that meets your needs.

Twilio send client in queue call all agents, tell them the callers name and connect first one with client

I am trying to solve this problem for hours now. I would like to implement this scenario:
Client calls and Twilio puts him to a queue
Client should listen to holding music
My REST-API get called with the callers number and returns the callers name
All agents are getting called now.
If a agent picks up Twilio tells him the callers name and connects the agent and the client.
Is this even possible with Twilio ?

How do I programmatically disconnect clients which are connected to Solace appliance?

As Solace does not support deleting and disconnecting client via SEMP over a message bus, as mentioned here, may I know how do I do that programmatically? I need to manage clients, especially client connection from my application. Can I run trigger CLI scripts from my program to achieve that?
Thank you.
Disconnecting a client is an administrative action that can only be executed by management users over the management interface. Client applications are not allowed to execute this action.
To disconnect a client, you can send a SEMP command through the management interface using a management user. (Not via SEMP over Message Bus.)

Kick or Ban user or client in Mosquitto MQTT

i have a configured Mosquitto MQTT broker...
I'd like to kick or ban a user for an amount of time?
How can i do this from another subscribed client?
Should i do this from the broker? How?
You can't block on a client id basis, the only option would be to enable ACLs with a database back end (something like https://github.com/jpmens/mosquitto-auth-plug) and then update the database to remove access to topics to specific users.

How to find the list of dynamic IP Addresses for the outbound connection to Twilio?

Our firewall restricts outbound network connections. Hence we need to know the list of IP addresses to which we need to open up the port for outbound network connections that connects to Twilio for the REST API for sending sms.
How to find out what are the list of IP addresses that twilio uses for outbound connections so that we can open those in our firewall?
As per the Twilio docs it says we need to open up for https://api.twilio.com.
Unfortunately our firewall needs to define a list of IP addresses instead of a URL and it looks like the IP Addresses keep changing and is not static.
Does the following hold good for outbound connections from Twilio for Messages via their REST API?
https://forums.aws.amazon.com/ann.jspa?annID=1701
Please advise.
From the FAQ article on this topic:
Twilio makes HTTP requests to your server to fetch your app’s TwiML instructions. Some users prefer to know which IP address the request from Twilio is coming from in order to open up specific ports in a firewall. However, due to the fluid nature of our cloud architecture, we don’t have a set range of IPs that requests are sent from or know in advance what they will be.
Because Twilio’s requests will be coming from different IP addresses, we instead recommend that you validate that a request came from Twilio by other means. Please see our documentation on securing your application for more details.
If the inability to have a request come from a static IP address is a serious concern, please contact our sales department to discuss other options which might be available.

Resources