No incoming call in my pjsip based app for bb 10

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

 



hi, i have made a pjsip based app named Adore Softphone. i am able to make a
call but not able to receive a call for some reason. The app is available on
blackberry world. Please help me.

In my project the function which is used for incomming is

 

void PjCallback::on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id
call_id, pjsip_rx_data *rdata) {
 
    PJ_UNUSED_ARG(acc_id);
    PJ_UNUSED_ARG(rdata);
 
    activeCallsMutex.lock();
    if (!activeCalls.empty()) {
        PJ_LOG(3,(THIS_FILE, "new incoming Call %d, but we already have a
call ... reject", call_id));
        activeCallsMutex.unlock();
        pjsua_call_hangup(call_id, 486, NULL, NULL);
        return;    
    }
    
    pj_status_t status;
    pjsua_call_info ci;
    status = pjsua_call_get_info(call_id, &ci);
    if (status != PJ_SUCCESS) {
        PJ_LOG(3,(THIS_FILE, "ERROR retrieveing info for Call %d ...
ignoring", call_id));
        activeCallsMutex.unlock();
        return;
    }
    PJ_LOG(3,(THIS_FILE, "Call %d state=%.*s", call_id,  
            (int)ci.state_text.slen, ci.state_text.ptr));
 
    QString state_text =
QString::fromAscii(ci.state_text.ptr,(int)ci.state_text.slen);
 
    emit ringRequest(call_id);
    emit proxiedIncomingCall(QString::fromAscii(ci.remote_contact.ptr,
(int)ci.remote_contact.slen));
 
    activeCalls << call_id;
    activeCallsMutex.unlock();
}
 
void PjCallback::on_incoming_call_wrapper(pjsua_acc_id acc_id, pjsua_call_id
call_id, pjsip_rx_data *rdata) {
    /* call the non-static member */
    if (globalPjCallback) {
        PjCallback *myCb = (PjCallback*) globalPjCallback;
        myCb->on_incoming_call(acc_id, call_id, rdata);
    }    
}

these 2 functions are implented But i dont know whats wrong here??

 

thanks in advance..




[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