Hi, I think it could only be done by examining the response from UAS, while it may vary among the SIP implementations, for ex: PJSUA will respond with 488 and a specific warning. The best way should be setting the UAS to regard the UAC codecs priority, if that's possible. Regards, nanang On 01/09/2008, Archie Rosenblum <archie at bbsti.com> wrote: > > > > > > How do I detect if codec negotiation fails? For example, I want to try G729 > first, so I disable all other codecs, and attempt a connection. If this > fails, I would like to enable other codecs and try again. (I did alter the > codec priority, but the upstream server seems pick a higher bandwidth > codec.) > > > > Best regards, > > Archie > > > _______________________________________________ > 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 > >