summaryrefslogtreecommitdiff
path: root/pjsip
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip')
-rw-r--r--pjsip/include/pjsip-ua/sip_inv.h4
-rw-r--r--pjsip/src/pjsip-ua/sip_inv.c13
2 files changed, 6 insertions, 11 deletions
diff --git a/pjsip/include/pjsip-ua/sip_inv.h b/pjsip/include/pjsip-ua/sip_inv.h
index 4e5f820e..5782cf92 100644
--- a/pjsip/include/pjsip-ua/sip_inv.h
+++ b/pjsip/include/pjsip-ua/sip_inv.h
@@ -172,6 +172,10 @@ typedef struct pjsip_inv_callback
* #pjsip_inv_set_sdp_answer() and the re-INVITE will be answered
* automatically.
*
+ * Remarks: Application may need to monitor on_tsx_state_changed()
+ * callback to check whether the re-INVITE is already answered
+ * automatically with 487 due to being cancelled.
+ *
* @param inv The invite session.
* @param offer Remote offer.
* @param rdata The received re-INVITE request.
diff --git a/pjsip/src/pjsip-ua/sip_inv.c b/pjsip/src/pjsip-ua/sip_inv.c
index 8c63f760..e73049bf 100644
--- a/pjsip/src/pjsip-ua/sip_inv.c
+++ b/pjsip/src/pjsip-ua/sip_inv.c
@@ -4271,18 +4271,9 @@ static void inv_on_state_confirmed( pjsip_inv_session *inv, pjsip_event *e)
{
/*
- * Handle strandled incoming CANCEL.
+ * Handle strandled incoming CANCEL or CANCEL for re-INVITE
*/
- pjsip_rx_data *rdata = e->body.tsx_state.src.rdata;
- pjsip_tx_data *tdata;
- pj_status_t status;
-
- status = pjsip_dlg_create_response(dlg, rdata, 200, NULL, &tdata);
- if (status != PJ_SUCCESS) return;
-
- status = pjsip_dlg_send_response(dlg, tsx, tdata);
- if (status != PJ_SUCCESS) return;
-
+ inv_respond_incoming_cancel(inv, tsx, e);
}
else if (tsx->method.id == PJSIP_INVITE_METHOD &&
tsx->role == PJSIP_ROLE_UAS)