Hi Nanang, Because my program need to ask external call center program for SDP answer when I get on_rx_offer() callback. There will be long delay, then sip thread will be paused at this callback.It isn't acceptable by my design.So I patched pjsip-ua code to allow my program to handle re-Invite just like initial invite. But I guess my patch maybe broken to handle UPDATE. Is there any good advice for me? /* * State CONFIRMED is after ACK is sent/received. */ static void inv_on_state_confirmed( pjsip_inv_session *inv, pjsip_event *e) { .... /* Can not receive re-INVITE while another one is pending. */ status = pjsip_dlg_create_response( inv->dlg, rdata, 500, &reason, &tdata); if (status != PJ_SUCCESS) return; status = pjsip_dlg_send_response( inv->dlg, tsx, tdata); return; } /* Save the invite transaction. */ inv->invite_tsx = tsx; /* Modified By Gang Liu, re-Invite*/ if (mod_inv.cb.on_reinvite) { status = inv_check_sdp_in_incoming_reInvite(inv, tsx, rdata); if (status != PJ_SUCCESS) { /* Not Acceptable */ const pjsip_hdr *accept; status = pjsip_dlg_create_response(inv->dlg, rdata, 488, NULL, &tdata); if (status != PJ_SUCCESS) return; accept = pjsip_endpt_get_capability(dlg->endpt, PJSIP_H_ACCEPT, NULL); if (accept) { pjsip_msg_add_hdr(tdata->msg, (pjsip_hdr*) pjsip_hdr_clone(tdata->pool, accept)); } status = pjsip_dlg_send_response(dlg, tsx, tdata); return; } (*mod_inv.cb.on_reinvite)(inv, rdata); } else { /* Process SDP in incoming message. */ status = inv_check_sdp_in_incoming_msg(inv, tsx, rdata); if (status != PJ_SUCCESS) { /* Not Acceptable */ const pjsip_hdr *accept; regards, Gang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20081202/86f1cf0f/attachment.html>