ASTETCDIR=/etc/asterisk
endif
-# Uncomment if u want to attempt to include the G.729 stuff
-# This is a quick fix to work around the missing H323Capability
-# in Open H.323. As of Open H.323 1.12.0 the H323Capability for
-# G.729 was removed due to legal reasons, use Open H.323 v1.11.7
-#
-#CFLAGS += -DWANT_G729
#
# This needs to be updated to deal with more than just little endian machines
#
#define H323_NAME OPAL_G7231_6k3"{sw}"
+#define H323_G729 OPAL_G729 "{sw}"
+#define H323_G729A OPAL_G729A"{sw}"
H323_REGISTER_CAPABILITY(H323_G7231Capability, H323_NAME);
+H323_REGISTER_CAPABILITY(AST_G729Capability, H323_G729);
+H323_REGISTER_CAPABILITY(AST_G729ACapability, H323_G729A);
H323_G7231Capability::H323_G7231Capability(BOOL annexA_)
: H323AudioCapability(7, 4)
return NULL;
}
+
+/////////////////////////////////////////////////////////////////////////////
+
+AST_G729Capability::AST_G729Capability()
+ : H323AudioCapability(24, 6)
+{
+}
+
+
+PObject * AST_G729Capability::Clone() const
+{
+ return new AST_G729Capability(*this);
+}
+
+
+unsigned AST_G729Capability::GetSubType() const
+{
+ return H245_AudioCapability::e_g729;
+}
+
+
+PString AST_G729Capability::GetFormatName() const
+{
+ return H323_G729;
+}
+
+
+H323Codec * AST_G729Capability::CreateCodec(H323Codec::Direction direction) const
+{
+ return NULL;
+}
+/////////////////////////////////////////////////////////////////////////////
+
+AST_G729ACapability::AST_G729ACapability()
+ : H323AudioCapability(24, 6)
+{
+}
+
+
+PObject * AST_G729ACapability::Clone() const
+{
+ return new AST_G729ACapability(*this);
+}
+
+
+unsigned AST_G729ACapability::GetSubType() const
+{
+ return H245_AudioCapability::e_g729AnnexA;
+}
+
+
+PString AST_G729ACapability::GetFormatName() const
+{
+ return H323_G729A;
+}
+
+
+H323Codec * AST_G729ACapability::CreateCodec(H323Codec::Direction direction) const
+{
+ return NULL;
+}
+
/** MyH323EndPoint
* The fullAddress parameter is used directly in the MakeCall method so
* the General form for the fullAddress argument is :
endPoint->SetCapability(0, 0, new SpeexNarrow6AudioCapability());
}
-#if WANT_G729
if (cap & AST_FORMAT_G729A) {
- H323_G729ACapability *g729aCap;
- endPoint->SetCapability(0, 0, g729aCap = new H323_G729ACapability);
+ AST_G729ACapability *g729aCap;
+ AST_G729Capability *g729Cap;
+ endPoint->SetCapability(0, 0, g729aCap = new AST_G729ACapability);
+ endPoint->SetCapability(0, 0, g729Cap = new AST_G729Capability);
}
-#endif
if (cap & AST_FORMAT_G723_1) {
H323_G7231Capability *g7231Cap;
BOOL annexA;
};
+/**This class describes the (fake) G729 codec capability.
+ */
+class AST_G729Capability : public H323AudioCapability
+{
+ PCLASSINFO(AST_G729Capability, H323AudioCapability);
+
+ public:
+ /**@name Construction */
+ //@{
+ /**Create a new G.729 capability.
+ */
+ AST_G729Capability();
+ //@}
+
+ /**@name Overrides from class PObject */
+ //@{
+ /**Create a copy of the object.
+ */
+ virtual PObject * Clone() const;
+ //@}
+
+ /**@name Operations */
+ //@{
+ /**Create the codec instance, allocating resources as required.
+ */
+ virtual H323Codec * CreateCodec(
+ H323Codec::Direction direction /// Direction in which this instance runs
+ ) const;
+ //@}
+
+ /**@name Identification functions */
+ //@{
+ /**Get the sub-type of the capability. This is a code dependent on the
+ main type of the capability.
+
+ This returns one of the four possible combinations of mode and speed
+ using the enum values of the protocol ASN H245_AudioCapability class.
+ */
+ virtual unsigned GetSubType() const;
+
+ /**Get the name of the media data format this class represents.
+ */
+ virtual PString GetFormatName() const;
+ //@}
+};
+
+
+/**This class describes the VoiceAge G729A codec capability.
+ */
+class AST_G729ACapability : public H323AudioCapability
+{
+ PCLASSINFO(AST_G729ACapability, H323AudioCapability);
+
+ public:
+ /**@name Construction */
+ //@{
+ /**Create a new G.729A capability.
+ */
+ AST_G729ACapability();
+ //@}
+
+ /**@name Overrides from class PObject */
+ //@{
+ /**Create a copy of the object.
+ */
+ virtual PObject * Clone() const;
+ //@}
+
+ /**@name Operations */
+ //@{
+ /**Create the codec instance, allocating resources as required.
+ */
+ virtual H323Codec * CreateCodec(
+ H323Codec::Direction direction /// Direction in which this instance runs
+ ) const;
+ //@}
+
+ /**@name Identification functions */
+ //@{
+ /**Get the sub-type of the capability. This is a code dependent on the
+ main type of the capability.
+
+ This returns one of the four possible combinations of mode and speed
+ using the enum values of the protocol ASN H245_AudioCapability class.
+ */
+ virtual unsigned GetSubType() const;
+
+ /**Get the name of the media data format this class represents.
+ */
+ virtual PString GetFormatName() const;
+ //@}
+};
+
+
class MyH323EndPoint : public H323EndPoint {
PCLASSINFO(MyH323EndPoint, H323EndPoint);