Hi ALL I m creating the Instant messenger using pjsip and I want that whenever incoming SUBSCRIBE request comes then my application should work like in (Xlite...etc). ask user permission whether to accept or reject the request. According to pjsip library * Notification when incoming SUBSCRIBE request is received. Application * may use this callback to authorize the incoming subscribe request * (e.g. ask user permission if the request should be granted). * * If this callback is not implemented, all incoming presence subscription * requests will be accepted. * * If this callback is implemented, application has several choices on * what to do with the incoming request: * - it may reject the request immediately by specifying non-200 class * final response in the \a code argument. * - it may immediately accept the request by specifying 200 as the * \a code argument. This is the default value if application doesn't * set any value to the \a code argument. In this case, the library * will automatically send NOTIFY request upon returning from this * callback. * - it may delay the processing of the request, for example to request * user permission whether to accept or reject the request. In this * case, the application MUST set the \a code argument to 202, and * later calls #pjsua_pres_notify() to accept or reject the * subscription request. I have successfully implemented the on_incoming_subscribe callback function. What code I have to use to send Notify First as "Pending presence" (202) and after user permission either as (200)accepted or rejection. Please help me out. Thanks Amit -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090206/b85cf498/attachment.html>