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? Sincerely, WS ________________________________ From: Benny Prijono <bennylp@xxxxxxxxx> To: pjsip list <pjsip at lists.pjsip.org> Sent: Friday, March 13, 2009 8:44:40 PM Subject: Re: how to check for incoming event from PJSUA API On Wed, Mar 11, 2009 at 5:10 PM, Soh Wei Sin <wssoh85 at yahoo.com> wrote: Hi all, Currently I'm using pjsua API for my application. In my application, I would like to check for incoming instant message and extract the message from the MESSAGE packet. However, I have no idea on how to detect an incoming sip message from my application. Is there are any function that can return the status of incoming message so that I can check for it? I had read the PJSIP Developer's guide, in http://trac.pjsip.org/repos/wiki/SIP_Message_Buffer_Event. there said that RX Message Event is the event that a packet of sip message is coming. But I don't know how to check status of it. Can anyone give me some help? or how to check for an incoming event? Since you are using pjsua-lib, all should have been taken care of and you shouldn't need to go to the low level message buffer stuff to get the incoming IM. Simply implement the on_pager() callback and that should be it. Please see the doc on on_pager() callback: http://www.pjsip.org/pjsip/docs/html/structpjsua__callback.htm#fe46b2fc1622020f6525a5481d87258e And the rest of pjsua-lib documentation of course: http://www.pjsip.org/pjsip/docs/html/group__PJSUA__LIB.htm cheers Benny Any help is appreciate. Thanks :) Sincerely, ws _______________________________________________ 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/20090313/40af7b05/attachment-0001.html>