summaryrefslogtreecommitdiff
path: root/pjsip/include/pjsua2/call.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'pjsip/include/pjsua2/call.hpp')
-rw-r--r--pjsip/include/pjsua2/call.hpp32
1 files changed, 32 insertions, 0 deletions
diff --git a/pjsip/include/pjsua2/call.hpp b/pjsip/include/pjsua2/call.hpp
index 917965e5..bd0b1ee1 100644
--- a/pjsip/include/pjsua2/call.hpp
+++ b/pjsip/include/pjsua2/call.hpp
@@ -851,6 +851,19 @@ struct OnCallRxOfferParam
};
/**
+ * This structure contains parameters for Call::onCallTxOffer() callback.
+ */
+struct OnCallTxOfferParam
+{
+ /**
+ * The current call setting, application can update this setting for
+ * generating the offer. Note that application should maintain any
+ * active media to avoid the need for the peer to reject the offer.
+ */
+ CallSetting opt;
+};
+
+/**
* This structure contains parameters for Call::onCallRedirected() callback.
*/
struct OnCallRedirectedParam
@@ -1603,6 +1616,25 @@ public:
{ PJ_UNUSED_ARG(prm); }
/**
+ * Notify application when call has received INVITE with no SDP offer.
+ * Application can update the call setting (e.g: add audio/video), or
+ * enable/disable codecs, or update other media session settings from
+ * within the callback, however, as mandated by the standard (RFC3261
+ * section 14.2), it must ensure that the update overlaps with the
+ * existing media session (in codecs, transports, or other parameters)
+ * that require support from the peer, this is to avoid the need for
+ * the peer to reject the offer.
+ *
+ * When this callback is not implemented, the default behavior is to send
+ * SDP offer using current active media session (with all enabled codecs
+ * on each media type).
+ *
+ * @param prm Callback parameter.
+ */
+ virtual void onCallTxOffer(OnCallTxOfferParam &prm)
+ { PJ_UNUSED_ARG(prm); }
+
+ /**
* Notify application on incoming MESSAGE request.
*
* @param prm Callback parameter.