summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsip-ua
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/include/pjsip-ua')
-rw-r--r--pjsip/include/pjsip-ua/sip_inv.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/pjsip/include/pjsip-ua/sip_inv.h b/pjsip/include/pjsip-ua/sip_inv.h
index 3a144f80..e74abfac 100644
--- a/pjsip/include/pjsip-ua/sip_inv.h
+++ b/pjsip/include/pjsip-ua/sip_inv.h
@@ -149,7 +149,10 @@ typedef struct pjsip_inv_callback
/**
* This callback is called when the invite session has received
* new offer from peer. Application can inspect the remote offer
- * in "offer".
+ * in "offer", and set the SDP answer with #pjsip_inv_set_sdp_answer().
+ * When the application sends a SIP message to send the answer,
+ * this SDP answer will be negotiated with the offer, and the result
+ * will be sent with the SIP message.
*
* @param inv The invite session.
* @param offer Remote offer.
@@ -158,6 +161,22 @@ typedef struct pjsip_inv_callback
const pjmedia_sdp_session *offer);
/**
+ * This callback is optional, and it is used to ask the application
+ * to create a fresh offer, when the invite session has received
+ * re-INVITE without offer. This offer then will be sent in the
+ * 200/OK response to the re-INVITE request.
+ *
+ * If application doesn't implement this callback, the invite session
+ * will send the currently active SDP as the offer.
+ *
+ * @param inv The invite session.
+ * @param p_offer Pointer to receive the SDP offer created by
+ * application.
+ */
+ void (*on_create_offer)(pjsip_inv_session *inv,
+ pjmedia_sdp_session **p_offer);
+
+ /**
* This callback is called after SDP offer/answer session has completed.
* The status argument specifies the status of the offer/answer,
* as returned by pjmedia_sdp_neg_negotiate().