Commit fe8b60a4 authored by Alexandre Savard's avatar Alexandre Savard
Browse files

[#3963] Move sendTextMessage implementation in manager (to manager conference)

parent bd804db0
......@@ -464,16 +464,5 @@ CallManager::setPBXEnrollment (const std::string& callID, const bool& yesNo)
void
CallManager::sendTextMessage (const std::string& callID, const std::string& message)
{
_debug ("");
SIPVoIPLink * link = NULL;
link = dynamic_cast<SIPVoIPLink *> (Manager::instance().getAccountLink (AccountNULL));
if (link == NULL) {
_debug ("Failed to get sip link");
throw CallManagerException();
}
link->sendTextMessage (callID, message);
Manager::instance().sendTextMessage (callID, message);
}
......@@ -1717,6 +1717,22 @@ void ManagerImpl::incomingMessage (const CallID& callID,
}
}
//THREAD=VoIP
void ManagerImpl::sendTextMessage (const CallID& callID, const std::string& message)
{
SIPVoIPLink * link = NULL;
link = dynamic_cast<SIPVoIPLink *> (getAccountLink (AccountNULL));
if (link == NULL) {
_debug ("Manager: Failed to get sip link");
throw CallManagerException();
}
link->sendTextMessage (callID, message);
}
//THREAD=VoIP CALL=Outgoing
void ManagerImpl::peerAnsweredCall (const CallID& id)
{
......
......@@ -446,6 +446,14 @@ class ManagerImpl
*/
void incomingMessage (const CallID& callID, const std::string& from, const std::string& message);
/**
* Send a new text message to the call, if participate to a conference, send to all participant.
* @param callID The call to send the message
* @param message The content of the message
*/
void sendTextMessage (const CallID& callID, const std::string& message);
/**
* Notify the client he has voice mails
* @param accountId The account identifier
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment