[pjsip] how to check for incoming event from PJSUA API
Soh Wei Sin
wssoh85 at yahoo.com
Fri Mar 13 13:48:58 EDT 2009
Thanks for your lightning speed of reply my message :)
I not really sure how to do it, but i try to do it like following:
1. I add an on_pager function in my code that will return the string of the body.
static pj_str_t on_pager(pjsua_call_id call_id, const pj_str_t *from, const pj_str_t *to, const pj_str_t *contact, const pj_str_t *mime_type, const pj_str_t *text)
{
return text;
}
2. Then is i need to call the "pj_string_t *msg = on_pager()" in my application? if no message come in then is the on_pager function will keep on waiting?
sorry for my stupidity, hope can heard from you soon.
regards,
ws
________________________________
From: Benny Prijono <bennylp at teluu.com>
To: pjsip list <pjsip at lists.pjsip.org>
Sent: Saturday, March 14, 2009 12:43:00 AM
Subject: Re: [pjsip] how to check for incoming event from PJSUA API
On Fri, Mar 13, 2009 at 4:38 PM, Soh Wei Sin <wssoh85 at yahoo.com> wrote:
Hi, thanks for your fast reply :)
I understand that the on_pager() call able to obtain the received IM. However, since the on_pager() is an static void function, therefore, how could I pass the IM received to other function? I need to get the message string for other purpose instead of display it on screen. So is there are any other method to do so?
I was talking about on_pager() callback in pjsua_callback structure, and not on_pager() function in pjsua_app.c application. I think that should fit your purpose.
cheers
Benny
Sincerely,
WS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090313/d8900fac/attachment.html>
More information about the pjsip
mailing list