Example #1
0
EXPORT int iaxc_quelch(int callNo, int MOH)
{
	struct iax_session *session = calls[callNo].session;
	if ( !session )
		return -1;

	return iax_quelch_moh(session, MOH);
}
Example #2
0
void
IAXVoIPLink::onhold(const std::string& id)
{
    IAXCall* call = getIAXCall(id);

    if (call == NULL)
        throw VoipLinkException("Call does not exist");

    Manager::instance().getMainBuffer()->unBindAll(call->getCallId());

    mutexIAX_.enter();
    iax_quelch_moh(call->session, true);
    mutexIAX_.leave();

    call->setState(Call::HOLD);
}