VOIP Softphone Implementation Question

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

 



Hi

I have implemented the following status in my application

1) busy

2) online

3) Away

4) offline

use following changes in your code

*in rpid.h*
typedef enum pjrpid_activity
{
    /** Activity is unknown. The activity would then be conceived
     *  in the "note" field.
     */
    PJRPID_ACTIVITY_UNKNOWN,

    /** The person is away */
    PJRPID_ACTIVITY_AWAY,

    /** The person is busy */
    PJRPID_ACTIVITY_BUSY,

    PJRPID_ACTIVITY_ONLINE,
    PJRPID_ACTIVITY_OFFLINE,

} pjrpid_activity;

*in rpid.c*
switch (elem->activity) {
    case PJRPID_ACTIVITY_AWAY:
    nd_activity = pj_xml_node_new(pool, &RPID_AWAY);
    break;
    case PJRPID_ACTIVITY_BUSY:
    nd_activity = pj_xml_node_new(pool, &RPID_BUSY);
    break;
    case PJRPID_ACTIVITY_OFFLINE:
    nd_activity =pj_xml_node_new(pool,&RPID_OFFLINE);
    break;
    case PJRPID_ACTIVITY_ONLINE:
    nd_activity =pj_xml_node_new(pool,&RPID_ONLINE);
    break;
    case PJRPID_ACTIVITY_UNKNOWN:
    default:
    nd_activity = pj_xml_node_new(pool, &RPID_UNKNOWN);
    break;
    }

*and in your application to publishing your status*

void MainWindow::localstatus(int index)

{

emit log_file("Changing local status");

qDebug() << index ;

pj_status_t status;

pj_bool_t online_status;

pjrpid_element elem;

enum status1

{

Online,

Offline,

Away,

Idle,

};

pj_bzero(&elem, sizeof(elem));

qDebug() << "yuvaraj";

if(sipOn)

{

qDebug() << index;

switch(index)

{

case Online:

elem.activity = PJRPID_ACTIVITY_ONLINE;

elem.note = pj_str("Online");

online_status =PJ_TRUE;

break;

case Idle:

//elem.activity = PJRPID_ACTIVITY_IDLE;

elem.note = pj_str("Idle");

online_status =PJ_TRUE;

break;

case Away:

elem.activity = PJRPID_ACTIVITY_AWAY;

elem.note = pj_str("Away");

break;

case Offline:

elem.activity = PJRPID_ACTIVITY_OFFLINE;

elem.note = pj_str("offline");

online_status =PJ_FALSE;

break;

}

status = pjsua_acc_set_online_status2(0, online_status, &elem);

if (status != PJ_SUCCESS) {

QMessageBox::information(0,"status",QString("error"));

}

}

}




Thanks

Yuvaraj R

On Tue, Oct 20, 2009 at 2:57 PM, Wong Peter <peterapiit at gmail.com> wrote:

> Hello to all, i have several question related to softphone implementation
> using pjlib.
>
> 1. How to create call recorder ?
> 2. How to create call transfer ?
> 3. How to create online status like Busy, Away, Online and Be right Back?
> 4. How to create VOIP call history such as incoming, outgoing, missed and
> received call ?
> 5. How to store contact list and sip account ?
>
>
> I have tried that but not successful.
> --
> Linux
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing list
> pjsip at lists.pjsip.org
> http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20091020/789b6ff0/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