How to Send SIP MESSAGES to users once conference is established

Let’s say that SIP client A started the conference and added SIP client B to a conference.

Now , How it is possible to send SIP MESSAGE to SIP client B after the conference is started and communication is going on.

That’s a question for the phone supplier. The phone would need to initiate an out of dialogue message whilst in at least one dialogue.

If you meant all the users, I believe that you simply send an in dialogue message from the phone, and it will get repeated to all participants.

1 Like

exten => .,1,Set(ACTUALTO=${CUT(MESSAGE(to),@,1)})
exten => _.,n,MessageSend(${ACTUALTO},${MESSAGE(from)})
exten => _.,n,Hangup

Using above context, I am able to send and receive messages from End points.

Now what I want to do is, Let’s say End point A sent message, which is received by asterisk server, Is it possible to parse this message by asterisk server and add information that there are N users connected in the conference and send it to Endpoint B ?
Awaiting for your valuable reply.

In my first question, Asterisk server requires to send SIP MESSAGE to Client B. Is it possible that VOIP server can send SIP MESSAGE request?

What do you mean by “VoIP server” here?

(Also technically any SIP user agents is acting as a UAC, i.e. a client, when it sends a message, even if it is running on a machine in a rack in a server farm.)

Regarding the Asterisk daemon initiating the sending of an out of dialogue message, see Asterisk 13 Application_MessageSend - Asterisk Project - Asterisk Project Wiki

1 Like

VOIP server means Asterisk server

;to SIP Client B
exten => 1111,1,Set(ACTUALTO=sip:7003)
;to Asterisk server
exten =>1111,n,Set(MESSAGE(from)=sip:asterisk@
exten =>1111,n,Set(MESSAGE(body)=welcome)
exten =>1111,n,MessageSend(${ACTUALTO},${MESSAGE(from)})

Using the above script I can send messages from the asterisk server to SIP Clients.

Now How I can trigger context [Message]? Because here the message is required to send from the Asterisk server, not from any SIP client.
Do I need to go with AGI,AMI,ARI for this ?

Gosub. However, there is no requirement to be in the Message context and the code could be included inline.

Ok, But I have to detect that SIP client B has joined the conference and RTP is started after that I have to send MESSAGE.

If the conference app doesn’t support that, and noting that externally detecting the start of RTP flow is not something that Asterisk is designed to do, except for debugging, you would need to use Originate, from AMI, with a local channel on the A side and a dummy application on the B side.

I am able to know that RTP is started using this command confbridge list 1.
I am only facing issue in how to trigger MESSAGE context once i detect that conference is started.

That doesn’t tell you that RTP has started, only that any RTP received will be forwarded (although not necessarily to the correct address (e.g. if comedia processing is needed)).

Confbridge list 1 commands returns me how many users are there in conference and in my case when user added to conference using .call files it automatically starts voice communication.

So i assume that when confbridge list 1 commands returns me name of ‘SIP client B’ , it means RTP communication is started.

my only issue is that after this communication , how to send SIP message to SIP client B from Asterisk server?

Suggestion already made:

Thanks for the direction, Do you have any example for this or any website link ?

Are you telling about this ?

I wasn’t, but that is a better solution.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.