Example #1
0
void SIPEngine::onConnected(resip::InviteSessionHandle is, const resip::SipMessage& msg)
{
    Call *call = (Call*)is->getAppDialogSet().get();
    if (call)
    {
        call->mCallState = Answered;
        Dumais::Sound::RTPSession *rtpSession = call->getRTPSession();
        rtpSession->start();
        mpObserver->onConnectedUas(call);
    }
}
Example #2
0
void SIPEngine::onAnswer(resip::InviteSessionHandle is, const resip::SipMessage& msg, const resip::SdpContents& sdp)
{
    Call *pCall = (Call*)is->getAppDialogSet().get();

    const char* peerIP = sdp.session().origin().getAddress().c_str();
    unsigned int peerPort = sdp.session().media().front().port();

    LOG("Outgoing call was answered. SDP: "<<peerIP<<":"<<peerPort);

    Dumais::Sound::RTPSession *rtpSession = pCall->getRTPSession();
    rtpSession->setPeerAddress(peerIP, peerPort);
    rtpSession->start();

    pCall->mCallState = Answered;
    mpObserver->onAnswer(pCall);

}