Ashwin, I'm using the unmodified pjsua_app.c reference application that is included with version 1.12 and located in the distro at: <pjproject-1.12>/pjsip-apps/src/pjsua/pjsua_app.c I see in the reference application on line 4662 where callbacks are initialized as: pjsua_app.c ------------------- /* Initialize application callbacks */ app_config.cfg.cb.on_call_state = &on_call_state; app_config.cfg.cb.on_call_media_state = &on_call_media_state; app_config.cfg.cb.on_incoming_call = &on_incoming_call; app_config.cfg.cb.on_call_tsx_state = &on_call_tsx_state; <more initialization follows> However I see nothing that initializes callbacks for catching 5xx SIP responses. So this is when I started digging into the pjsip User Agent Library and found the pjsip_inv_callback structure which defines on_state_changed - and that seems to me like it would do the trick. I just don't see how to get that callback wired in to the higher-level pjsua reference application (which leads me to believe that I'm missing something trivial). You mentioned that there are many ways to get notified of 5xx SIP responses, so how could the pjsua_app.c reference application be modified to catch such responses? Many thanks, Paul On Sun, Dec 4, 2011 at 10:54 AM, Ashwin Rath <ashwinrath at gmail.com> wrote: > Could you add some code to demonstrate your usage of pjsua ? There are > many ways by which this can be accomplished. Adding the usage example could > make the case more specific. > > Cheers > > Ashwin > > On Sun, Dec 4, 2011 at 12:33 PM, Paul Hazlett <phazlett at gmail.com> wrote: > >> Hello. >> >> I'm **very** new to pjsip and I'm trying to figure out how I can handle >> 5xx SIP responses. Specifically I'm learning pjsip by reading the >> documentation and reading the pjsua reference application source code. >> >> The actual use case that I'm trying to resolve is how to get notified of >> a 503 SIP response that is generated by the my SIP proxy after sending it >> an INVITE. >> >> I see that pjsip_inv_callback has on_state_changed, which looks like what >> I need, but how would I add this callback to the pjsua reference >> application? >> >> Regards, >> Paul >> >> _______________________________________________ >> 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 >> >> > > > -- > Ashwin Kumar Rath > > > _______________________________________________ > 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/20111204/dd3783ef/attachment.html>