aboutsummaryrefslogtreecommitdiffstats
path: root/channels/sip
diff options
context:
space:
mode:
authordvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-03 16:22:10 +0000
committerdvossel <dvossel@f38db490-d61c-443f-a65b-d21fe96a405b>2011-02-03 16:22:10 +0000
commit4aca3187a3db25ff4d2208f116f618b363dec7d5 (patch)
tree00da0caa5a07b7b25729f089dbcafb08129fa9be /channels/sip
parent8170aae0a0882a93ca1ef80736cb95c2d6126865 (diff)
Asterisk media architecture conversion - no more format bitfields
This patch is the foundation of an entire new way of looking at media in Asterisk. The code present in this patch is everything required to complete phase1 of my Media Architecture proposal. For more information about this project visit the link below. https://wiki.asterisk.org/wiki/display/AST/Media+Architecture+Proposal The primary function of this patch is to convert all the usages of format bitfields in Asterisk to use the new format and format_cap APIs. Functionally no change in behavior should be present in this patch. Thanks to twilson and russell for all the time they spent reviewing these changes. Review: https://reviewboard.asterisk.org/r/1083/ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@306010 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/sip')
-rw-r--r--channels/sip/include/globals.h2
-rw-r--r--channels/sip/include/sip.h15
2 files changed, 8 insertions, 9 deletions
diff --git a/channels/sip/include/globals.h b/channels/sip/include/globals.h
index 0bd2f4d2d..d7c9f13d0 100644
--- a/channels/sip/include/globals.h
+++ b/channels/sip/include/globals.h
@@ -28,7 +28,7 @@ extern struct ast_sockaddr bindaddr; /*!< UDP: The address we bind to */
extern struct ast_sched_context *sched; /*!< The scheduling context */
/*! \brief Definition of this channel for PBX channel registration */
-extern const struct ast_channel_tech sip_tech;
+extern struct ast_channel_tech sip_tech;
/*! \brief This version of the sip channel tech has no send_digit_begin
* callback so that the core knows that the channel does not want
diff --git a/channels/sip/include/sip.h b/channels/sip/include/sip.h
index 57c155e14..e5d8205e5 100644
--- a/channels/sip/include/sip.h
+++ b/channels/sip/include/sip.h
@@ -216,7 +216,6 @@
#define DEFAULT_SDPSESSION "Asterisk PBX" /*!< Default SDP session name, (s=) header unless re-defined in sip.conf */
#define DEFAULT_SDPOWNER "root" /*!< Default SDP username field in (o=) header unless re-defined in sip.conf */
#define DEFAULT_ENGINE "asterisk" /*!< Default RTP engine to use for sessions */
-#define DEFAULT_CAPABILITY (AST_FORMAT_ULAW | AST_FORMAT_TESTLAW | AST_FORMAT_ALAW | AST_FORMAT_GSM | AST_FORMAT_H263);
#endif
/*@}*/
@@ -695,7 +694,7 @@ struct sip_settings {
char default_context[AST_MAX_CONTEXT];
char default_subscribecontext[AST_MAX_CONTEXT];
struct ast_ha *contact_ha; /*! \brief Global list of addresses dynamic peers are not allowed to use */
- format_t capability; /*!< Supported codecs */
+ struct ast_format_cap *caps; /*!< Supported codecs */
int tcp_enabled;
int default_max_forwards; /*!< Default max forwards (SIP Anti-loop) */
};
@@ -995,13 +994,13 @@ struct sip_pvt {
unsigned int sipoptions; /*!< Supported SIP options on the other end */
unsigned int reqsipoptions; /*!< Required SIP options on the other end */
struct ast_codec_pref prefs; /*!< codec prefs */
- format_t capability; /*!< Special capability (codec) */
- format_t jointcapability; /*!< Supported capability at both ends (codecs) */
- format_t peercapability; /*!< Supported peer capability */
- format_t prefcodec; /*!< Preferred codec (outbound only) */
+ struct ast_format_cap *caps; /*!< Special capability (codec) */
+ struct ast_format_cap *jointcaps; /*!< Supported capability at both ends (codecs) */
+ struct ast_format_cap *peercaps; /*!< Supported peer capability */
+ struct ast_format_cap *redircaps; /*!< Redirect codecs */
+ struct ast_format_cap *prefcaps; /*!< Preferred codec (outbound only) */
int noncodeccapability; /*!< DTMF RFC2833 telephony-event */
int jointnoncodeccapability; /*!< Joint Non codec capability */
- format_t redircodecs; /*!< Redirect codecs */
int maxcallbitrate; /*!< Maximum Call Bitrate for Video Calls */
int t38_maxdatagram; /*!< T.38 FaxMaxDatagram override */
int request_queue_sched_id; /*!< Scheduler ID of any scheduled action to process queued requests */
@@ -1217,7 +1216,7 @@ struct sip_peer {
int maxcallbitrate; /*!< Maximum Bitrate for a video call */
int expire; /*!< When to expire this peer registration */
- format_t capability; /*!< Codec capability */
+ struct ast_format_cap *caps; /*!< Codec capability */
int rtptimeout; /*!< RTP timeout */
int rtpholdtimeout; /*!< RTP Hold Timeout */
int rtpkeepalive; /*!< Send RTP packets for keepalive */