Error releasing hold on call 0<reason=488>

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HI
according to PJSUA2_demo.cpp we created sample that simply answer the call and hold the call .
but when we want to unhold(re_invite) the call its show up this error:
Error releasing hold on call 0<reason=488>

we use QT 
//Hold Code
  CallOpParam param;
  Call->setHold(param);
//UnHold (Invite)
  CallOpParam param2;
  param2.opt.flag |= PJSUA_CALL_UNHOLD;
  Call->reinvite(param2);
//Answer
  CallOpParam param;
  param.statusCode = PJSIP_SC_OK;
  Call->answer(param);
//My Call Function

void CallEx::onCallState(OnCallStateParam &prm)
{

    PJ_UNUSED_ARG(prm);

    CallInfo ci = getInfo();
    std::cout << "*** Call: " <<  ci.remoteUri << " [" << ci.stateText
              << "]" << std::endl;

    if (ci.state == PJSIP_INV_STATE_DISCONNECTED)
    {
        /* Delete the call */
        delete this;
    }
    if(ci.state == PJSIP_INV_STATE_CONFIRMED)
    {
        std::cout << "Confirmed" << std::endl;
        if(hasMedia())
        {
            std::cout << "Has Media" << std::endl;
            Media* media = getMedia(0);
            if(media->getType()==PJMEDIA_TYPE_AUDIO)
            {
                std::cout << "Media is Audio" << std::endl;
                AudioMedia* audioMedia  = (AudioMedia*) media;
                AudioMediaPlayer* mediaPlayer = new AudioMediaPlayer();
                AudioMedia& play_med = Endpoint::instance().audDevManager().getPlaybackDevMedia();
                if (audioMedia) {
                   play_med.startTransmit(*audioMedia);
                    audioMedia->startTransmit(play_med);
                }
            }
        }
        }
}

//Incomming call
    CallEx* newCall = new CallEx(account,iprm.callId,this);
    QJsonObject data;
    QUuid id = QUuid::createUuid();
    newCall->Id = id;
    _calls[id] = newCall;
    data["Type"] = (int)CallIsCreated;
    data["CallId"] = id.toString();
    SendDataToAllClient(data);
any help appreciated 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20141019/f14581ba/attachment.html>


[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux