[pjsip] Use MWI in PJSIP
Md. Nasir Uddin
nasir.rnd at gmail.com
Sat Jun 6 03:39:20 EDT 2009
Hi Samuel,
I have done the following steps for MWI:
1. Copy mwi.h into include folder
2. Copy mwi.c into source folder
3. Build symbian_ua_gui in GCCE mode.
Then I got three Error :
1. mwi.c:(.text+0x4c8): undefined reference to `pjsip_mwi_current_notify'
2. mwi.c:(.text+0x514): undefined reference to `pjsip_mwi_notify'
3. mwi.c:(.text+0x804): undefined reference to `pjsip_mwi_notify'
After that I have done the following into mwi.c:
static pj_status_t pjsip_mwi_notify( pjsip_evsub *sub,
pjsip_evsub_state state,
const pj_str_t *state_str,
const pj_str_t *reason,
pjsip_tx_data **p_tdata)
{
pjsip_mwi *mwi;
pjsip_tx_data *tdata;
pj_status_t status;
PJ_ASSERT_RETURN(sub, PJ_EINVAL);
mwi = (pjsip_mwi*) pjsip_evsub_get_mod_data(sub, mod_mwi.id);
PJ_ASSERT_ON_FAIL(mwi!=NULL, {return;});
status = pjsip_mwi_notify( sub, PJSIP_EVSUB_STATE_TERMINATED,
NULL, &reason, &tdata);
if (status == PJ_SUCCESS)
pjsip_mwi_send_request(sub, tdata);
pjsip_dlg_inc_lock(mwi->dlg);
status = pjsip_evsub_notify( sub, state, state_str, reason, &tdata);
if (status != PJ_SUCCESS)
goto on_return;
*p_tdata = tdata;
on_return:
pjsip_dlg_dec_lock(mwi->dlg);
return status;
}
static pj_status_t pjsip_mwi_current_notify( pjsip_evsub *sub,
pjsip_tx_data **p_tdata )
{
pjsip_mwi *mwi;
pjsip_tx_data *tdata;
pj_status_t status;
PJ_ASSERT_RETURN(sub, PJ_EINVAL);
mwi = (pjsip_mwi*) pjsip_evsub_get_mod_data(sub, mod_mwi.id);
PJ_ASSERT_ON_FAIL(mwi!=NULL, {return;});
pjsip_dlg_inc_lock(mwi->dlg);
status = pjsip_evsub_current_notify( sub, &tdata);
if (status != PJ_SUCCESS)
goto on_return;
*p_tdata = tdata;
on_return:
pjsip_dlg_dec_lock(mwi->dlg);
return status;
}
Now I didn't get any Error over there in my Application:
But I didn't know how it'll work or What will be the next steps?
Would you please tell me that I am going to right way and what I have to do
for next.
Thanking you
Nasir
On Sun, May 31, 2009 at 4:08 PM, Samuel Vinson <samuelv at laposte.net> wrote:
> Hello
>
> Yes read and implement rfc 3842 (A Message Summary and Message Waiting
> Indication Event Package for
> the Session Initiation Protocol (SIP))
>
> You can look how presence is implemented in pjsip.
> I began the work, but it's not finished. I'm joining the begin of my works.
> Like you will see there still are set/get status functions.
> and after you will need to look pjsua_presence to know how implements
> subscription step.
>
> Regards
>
> Samuel
>
> Md. Nasir Uddin a écrit :
>
> Hi All,
>
> Can anyone tell me how to implement MWI using PJSIP.
>
> Nasir
>
> ------------------------------
>
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
>
> pjsip mailing listpjsip at lists.pjsip.orghttp://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org
>
>
>
> _______________________________________________
> 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/20090606/0f033752/attachment-0001.html>
More information about the pjsip
mailing list