summaryrefslogtreecommitdiff
path: root/pjsip/include
diff options
context:
space:
mode:
authorBenny Prijono <bennylp@teluu.com>2010-10-01 02:03:42 +0000
committerBenny Prijono <bennylp@teluu.com>2010-10-01 02:03:42 +0000
commit9387bf461ffdd514de322e995f9cd0b556511c54 (patch)
tree33dd7615cdbd4d678de52eaac9a20bc39f76baf8 /pjsip/include
parentc9b181750958386e9b5f2b21e486b214e0c5906d (diff)
Closed #1142 (Account based configuration to specify if "c=0.0.0.0" method should be used when putting call on hold):
- use PJSUA_CALL_HOLD_TYPE_DEFAULT to specify default global call hold type - use pjsua_acc_config.call_hold_type to specify call hold type for the account - call hold type can also be set on per call basis by changing the call_hold_type in the call structure (requires inclusion of <pjsua-lib/pjsua_internal.h> git-svn-id: http://svn.pjsip.org/repos/pjproject/trunk@3330 74dad513-b988-da41-8d7b-12977e46ad98
Diffstat (limited to 'pjsip/include')
-rw-r--r--pjsip/include/pjsua-lib/pjsua.h47
-rw-r--r--pjsip/include/pjsua-lib/pjsua_internal.h1
2 files changed, 48 insertions, 0 deletions
diff --git a/pjsip/include/pjsua-lib/pjsua.h b/pjsip/include/pjsua-lib/pjsua.h
index dc013c0e..d178a863 100644
--- a/pjsip/include/pjsua-lib/pjsua.h
+++ b/pjsip/include/pjsua-lib/pjsua.h
@@ -2041,6 +2041,45 @@ PJ_DECL(pj_status_t) pjsua_transport_close( pjsua_transport_id id,
/**
+ * This enumeration specifies how we should offer call hold request to
+ * remote peer. The default value is set by compile time constant
+ * PJSUA_CALL_HOLD_TYPE_DEFAULT, and application may control the setting
+ * on per-account basis by manipulating \a call_hold_type field in
+ * #pjsua_acc_config.
+ */
+typedef enum pjsua_call_hold_type
+{
+ /**
+ * This will follow RFC 3264 recommendation to use a=sendonly,
+ * a=recvonly, and a=inactive attribute as means to signal call
+ * hold status. This is the correct value to use.
+ */
+ PJSUA_CALL_HOLD_TYPE_RFC3264,
+
+ /**
+ * This will use the old and deprecated method as specified in RFC 2543,
+ * and will offer c=0.0.0.0 in the SDP instead. Using this has many
+ * drawbacks such as inability to keep the media transport alive while
+ * the call is being put on hold, and should only be used if remote
+ * does not understand RFC 3264 style call hold offer.
+ */
+ PJSUA_CALL_HOLD_TYPE_RFC2543
+
+} pjsua_call_hold_type;
+
+
+/**
+ * Specify the default call hold type to be used in #pjsua_acc_config.
+ *
+ * Default is PJSUA_CALL_HOLD_TYPE_RFC3264, and there's no reason to change
+ * this except if you're communicating with an old/non-standard peer.
+ */
+#ifndef PJSUA_CALL_HOLD_TYPE_DEFAULT
+# define PJSUA_CALL_HOLD_TYPE_DEFAULT PJSUA_CALL_HOLD_TYPE_RFC3264
+#endif
+
+
+/**
* This structure describes account configuration to be specified when
* adding a new account with #pjsua_acc_add(). Application MUST initialize
* this structure first by calling #pjsua_acc_config_default().
@@ -2370,6 +2409,14 @@ typedef struct pjsua_acc_config
pj_bool_t use_stream_ka;
#endif
+ /**
+ * Specify how to offer call hold to remote peer. Please see the
+ * documentation on #pjsua_call_hold_type for more info.
+ *
+ * Default: PJSUA_CALL_HOLD_TYPE_DEFAULT
+ */
+ pjsua_call_hold_type call_hold_type;
+
} pjsua_acc_config;
diff --git a/pjsip/include/pjsua-lib/pjsua_internal.h b/pjsip/include/pjsua-lib/pjsua_internal.h
index f9146fb7..ff57d29d 100644
--- a/pjsip/include/pjsua-lib/pjsua_internal.h
+++ b/pjsip/include/pjsua-lib/pjsua_internal.h
@@ -61,6 +61,7 @@ typedef struct pjsua_call
pj_time_val dis_time; /**< Disconnect time. */
pjsua_acc_id acc_id; /**< Account index being used. */
int secure_level;/**< Signaling security level. */
+ pjsua_call_hold_type call_hold_type; /**< How to do call hold. */
pj_bool_t local_hold;/**< Flag for call-hold by local. */
pjsua_call_media_status media_st;/**< Media state. */
pjmedia_dir media_dir; /**< Media direction. */