[asterisk-commits] kpfleming: branch kpfleming/iax2_cleanup r264949 - in /team/kpfleming/iax2_cl...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri May 21 08:38:30 CDT 2010


Author: kpfleming
Date: Fri May 21 08:38:29 2010
New Revision: 264949

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=264949
Log:
save some work in progress

Added:
    team/kpfleming/iax2_cleanup/   (props changed)
      - copied from r264766, trunk/
Modified:
    team/kpfleming/iax2_cleanup/channels/iax2.h

Propchange: team/kpfleming/iax2_cleanup/
------------------------------------------------------------------------------
Binary property 'branch-1.4-blocked' - no diff available.

Propchange: team/kpfleming/iax2_cleanup/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/kpfleming/iax2_cleanup/
------------------------------------------------------------------------------
--- reviewboard:url (added)
+++ reviewboard:url Fri May 21 08:38:29 2010
@@ -1,0 +1,1 @@
+https://reviewboard.asterisk.org

Propchange: team/kpfleming/iax2_cleanup/
------------------------------------------------------------------------------
--- svn:externals (added)
+++ svn:externals Fri May 21 08:38:29 2010
@@ -1,0 +1,1 @@
+menuselect https://origsvn.digium.com/svn/menuselect/trunk

Propchange: team/kpfleming/iax2_cleanup/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri May 21 08:38:29 2010
@@ -1,0 +1,26 @@
+asterisk
+defaults.h
+ast_expr2.output
+.version
+.depend
+.applied
+mpg123-0.59r
+mpg123-0.59r.tar.gz
+update.out
+.lastclean
+.cleancount
+.tags-depend
+.tags-sources
+tags
+TAGS
+testexpr2
+makeopts
+menuselect.makeopts
+menuselect.makedeps
+config.status
+config.log
+menuselect-tree
+autom4te.cache
+makeopts.embed_rules
+aclocal.m4
+update.log

Propchange: team/kpfleming/iax2_cleanup/
------------------------------------------------------------------------------
    svn:mergeinfo = /be/branches/C.3:256426

Modified: team/kpfleming/iax2_cleanup/channels/iax2.h
URL: http://svnview.digium.com/svn/asterisk/team/kpfleming/iax2_cleanup/channels/iax2.h?view=diff&rev=264949&r1=264766&r2=264949
==============================================================================
--- team/kpfleming/iax2_cleanup/channels/iax2.h (original)
+++ team/kpfleming/iax2_cleanup/channels/iax2.h Fri May 21 08:38:29 2010
@@ -14,7 +14,7 @@
 /*! \file
  * \brief
  *
- * Implementation of Inter-Asterisk eXchange, version 2
+ * Implementation of Inter-Asterisk eXchange, version 2, RFCs 5456 and 5457
  * \ref iax2-parser.c
  * \ref iax2-parser.h
  * \ref chan_iax2.c
@@ -43,76 +43,50 @@
 
 #define IAX_WINDOW			64
 
+
+
 /*! Subclass for AST_FRAME_IAX */
 enum iax_frame_subclass {
-	IAX_COMMAND_NEW =       1,
-	IAX_COMMAND_PING =      2,
-	IAX_COMMAND_PONG =      3,
-	IAX_COMMAND_ACK =       4,
-	IAX_COMMAND_HANGUP =    5,
-	IAX_COMMAND_REJECT =    6,
-	IAX_COMMAND_ACCEPT =    7,
-	IAX_COMMAND_AUTHREQ =   8,
-	IAX_COMMAND_AUTHREP =   9,
-	IAX_COMMAND_INVAL =     10,
-	IAX_COMMAND_LAGRQ =     11,
-	IAX_COMMAND_LAGRP =     12,
-	/*! Registration request */
-	IAX_COMMAND_REGREQ =    13,
-	/*! Registration authentication required */
-	IAX_COMMAND_REGAUTH =   14,
-	/*! Registration accepted */
-	IAX_COMMAND_REGACK =    15,
-	/*! Registration rejected */
-	IAX_COMMAND_REGREJ =    16,
-	/*! Force release of registration */
-	IAX_COMMAND_REGREL =    17,
-	/*! If we receive voice before valid first voice frame, send this */
-	IAX_COMMAND_VNAK =      18,
-	/*! Request status of a dialplan entry */
-	IAX_COMMAND_DPREQ =     19,
-	/*! Request status of a dialplan entry */
-	IAX_COMMAND_DPREP =     20,
-	/*! Request a dial on channel brought up TBD */
-	IAX_COMMAND_DIAL =      21,
-	/*! Transfer Request */
-	IAX_COMMAND_TXREQ =     22,
-	/*! Transfer Connect */
-	IAX_COMMAND_TXCNT =     23,
-	/*! Transfer Accepted */
-	IAX_COMMAND_TXACC =     24,
-	/*! Transfer ready */
-	IAX_COMMAND_TXREADY =   25,
-	/*! Transfer release */
-	IAX_COMMAND_TXREL =     26,
-	/*! Transfer reject */
-	IAX_COMMAND_TXREJ =     27,
-	/*! Stop audio/video transmission */
-	IAX_COMMAND_QUELCH =    28,
-	/*! Resume audio/video transmission */
-	IAX_COMMAND_UNQUELCH =  29,
-	/*! Like ping, but does not require an open connection */
-	IAX_COMMAND_POKE =      30,
-	/*! Paging description */
-	IAX_COMMAND_PAGE =      31,
-	/*! Stand-alone message waiting indicator */
-	IAX_COMMAND_MWI =       32,
-	/*! Unsupported message received */
-	IAX_COMMAND_UNSUPPORT = 33,
-	/*! Request remote transfer */
-	IAX_COMMAND_TRANSFER =  34,
-	/*! Provision device */
-	IAX_COMMAND_PROVISION = 35,
-	/*! Download firmware */
-	IAX_COMMAND_FWDOWNL =   36,
-	/*! Firmware Data */
-	IAX_COMMAND_FWDATA =    37,
-	/*! Transfer media only */
-	IAX_COMMAND_TXMEDIA =   38,
-	/*! Command to rotate key */
-	IAX_COMMAND_RTKEY =     39,
-	/*! Call number token */
-	IAX_COMMAND_CALLTOKEN = 40,
+	IAX_COMMAND_NEW =		0x01,
+	IAX_COMMAND_PING =		0x02,
+	IAX_COMMAND_PONG =		0x03,
+	IAX_COMMAND_ACK =		0x04,
+	IAX_COMMAND_HANGUP =		0x05,
+	IAX_COMMAND_REJECT =		0x06,
+	IAX_COMMAND_ACCEPT =		0x07,
+	IAX_COMMAND_AUTHREQ =		0x08,
+	IAX_COMMAND_AUTHREP =		0x09,
+	IAX_COMMAND_INVAL =		0x0A,
+	IAX_COMMAND_LAGRQ =		0x0B,
+	IAX_COMMAND_LAGRP =		0x0C,
+	IAX_COMMAND_REGREQ =		0x0D,	/*!< Registration request */
+	IAX_COMMAND_REGAUTH =		0x0E,	/*!< Registration authentication required */
+	IAX_COMMAND_REGACK =		0x0F,	/*!< Registration accepted */
+	IAX_COMMAND_REGREJ =		0x10,	/*!< Registration rejected */
+	IAX_COMMAND_REGREL =		0x11,	/*!< Force release of registration */
+	IAX_COMMAND_VNAK =		0x12,	/*!< If we receive voice before valid first voice frame, send this */
+	IAX_COMMAND_DPREQ =		0x13,	/*!< Request status of a dialplan entry */
+	IAX_COMMAND_DPREP =		0x14,	/*!< Request status of a dialplan entry */
+	IAX_COMMAND_DIAL =		0x15,	/*!< Request a dial on channel brought up TBD */
+	IAX_COMMAND_TXREQ =		0x16,	/*!< Transfer Request */
+	IAX_COMMAND_TXCNT =		0x17,	/*!< Transfer Connect */
+	IAX_COMMAND_TXACC =		0x18,	/*!< Transfer Accepted */
+	IAX_COMMAND_TXREADY =		0x19,	/*!< Transfer ready */
+	IAX_COMMAND_TXREL =		0x20,	/*!< Transfer release */
+	IAX_COMMAND_TXREJ =		0x21,	/*!< Transfer reject */
+	IAX_COMMAND_QUELCH =		0x22,	/*!< Stop audio/video transmission */
+	IAX_COMMAND_UNQUELCH =		0x23,	/*!< Resume audio/video transmission */
+	IAX_COMMAND_POKE =		0x24,	/*!< Like ping, but does not require an open connection */
+	IAX_COMMAND_PAGE =		0x25,	/*!< Paging description */
+	IAX_COMMAND_MWI =		0x26,	/*!< Stand-alone message waiting indicator */
+	IAX_COMMAND_UNSUPPORT =		0x27,	/*!< Unsupported message received */
+	IAX_COMMAND_TRANSFER =		0x28,	/*!< Request remote transfer */
+	IAX_COMMAND_PROVISION =		0x29,	/*!< Provision device */
+	IAX_COMMAND_FWDOWNL =		0x30,	/*!< Download firmware */
+	IAX_COMMAND_FWDATA =		0x31,	/*!< Firmware Data */
+	IAX_COMMAND_TXMEDIA =		0x32,	/*!< Transfer media only */
+	IAX_COMMAND_RTKEY =		0x33,	/*!< Command to rotate key */
+	IAX_COMMAND_CALLTOKEN =		0x34,	/*!< Call number token */
 };
 
 /*! By default require re-registration once per minute */
@@ -124,64 +98,64 @@
 #define IAX_DEFAULT_PORTNO		4569
 
 /*! IAX Information elements */
-#define IAX_IE_CALLED_NUMBER		1		/*!< Number/extension being called - string */
-#define IAX_IE_CALLING_NUMBER		2		/*!< Calling number - string */
-#define IAX_IE_CALLING_ANI			3		/*!< Calling number ANI for billing  - string */
-#define IAX_IE_CALLING_NAME			4		/*!< Name of caller - string */
-#define IAX_IE_CALLED_CONTEXT		5		/*!< Context for number - string */
-#define IAX_IE_USERNAME				6		/*!< Username (peer or user) for authentication - string */
-#define IAX_IE_PASSWORD				7		/*!< Password for authentication - string */
-#define IAX_IE_CAPABILITY			8		/*!< Actual codec capability - unsigned int */
-#define IAX_IE_FORMAT				9		/*!< Desired codec format - unsigned int */
-#define IAX_IE_LANGUAGE				10		/*!< Desired language - string */
-#define IAX_IE_VERSION				11		/*!< Protocol version - short */
-#define IAX_IE_ADSICPE				12		/*!< CPE ADSI capability - short */
-#define IAX_IE_DNID					13		/*!< Originally dialed DNID - string */
-#define IAX_IE_AUTHMETHODS			14		/*!< Authentication method(s) - short */
-#define IAX_IE_CHALLENGE			15		/*!< Challenge data for MD5/RSA - string */
-#define IAX_IE_MD5_RESULT			16		/*!< MD5 challenge result - string */
-#define IAX_IE_RSA_RESULT			17		/*!< RSA challenge result - string */
-#define IAX_IE_APPARENT_ADDR		18		/*!< Apparent address of peer - struct sockaddr_in */
-#define IAX_IE_REFRESH				19		/*!< When to refresh registration - short */
-#define IAX_IE_DPSTATUS				20		/*!< Dialplan status - short */
-#define IAX_IE_CALLNO				21		/*!< Call number of peer - short */
-#define IAX_IE_CAUSE				22		/*!< Cause - string */
-#define IAX_IE_IAX_UNKNOWN			23		/*!< Unknown IAX command - byte */
-#define IAX_IE_MSGCOUNT				24		/*!< How many messages waiting - short */
-#define IAX_IE_AUTOANSWER			25		/*!< Request auto-answering -- none */
-#define IAX_IE_MUSICONHOLD			26		/*!< Request musiconhold with QUELCH -- none or string */
-#define IAX_IE_TRANSFERID			27		/*!< Transfer Request Identifier -- int */
-#define IAX_IE_RDNIS				28		/*!< Referring DNIS -- string */
-#define IAX_IE_PROVISIONING			29		/*!< Provisioning info */
-#define IAX_IE_AESPROVISIONING		30		/*!< AES Provisioning info */
-#define IAX_IE_DATETIME				31		/*!< Date/Time */
-#define IAX_IE_DEVICETYPE			32		/*!< Device Type -- string */
-#define IAX_IE_SERVICEIDENT			33		/*!< Service Identifier -- string */
-#define IAX_IE_FIRMWAREVER			34		/*!< Firmware revision -- u16 */
-#define IAX_IE_FWBLOCKDESC			35		/*!< Firmware block description -- u32 */
-#define IAX_IE_FWBLOCKDATA			36		/*!< Firmware block of data -- raw */
-#define IAX_IE_PROVVER				37		/*!< Provisioning Version (u32) */
-#define IAX_IE_CALLINGPRES			38		/*!< Calling presentation (u8) */
-#define IAX_IE_CALLINGTON			39		/*!< Calling type of number (u8) */
-#define IAX_IE_CALLINGTNS			40		/*!< Calling transit network select (u16) */
-#define IAX_IE_SAMPLINGRATE			41		/*!< Supported sampling rates (u16) */
-#define IAX_IE_CAUSECODE			42		/*!< Hangup cause (u8) */
-#define IAX_IE_ENCRYPTION			43		/*!< Encryption format (u16) */
-#define IAX_IE_ENCKEY				44		/*!< Encryption key (raw) */
-#define IAX_IE_CODEC_PREFS          45      /*!< Codec Negotiation */
-
-#define IAX_IE_RR_JITTER			46		/*!< Received jitter (as in RFC1889) u32 */
-#define IAX_IE_RR_LOSS				47		/*!< Received loss (high byte loss pct, low 24 bits loss count, as in rfc1889 */
-#define IAX_IE_RR_PKTS				48		/*!< Received frames (total frames received) u32 */
-#define IAX_IE_RR_DELAY				49		/*!< Max playout delay for received frames (in ms) u16 */
-#define IAX_IE_RR_DROPPED			50		/*!< Dropped frames (presumably by jitterbuf) u32 */
-#define IAX_IE_RR_OOO				51		/*!< Frames received Out of Order u32 */
-#define IAX_IE_VARIABLE				52		/*!< Remote variables */
-#define IAX_IE_OSPTOKEN				53		/*!< OSP token */
-#define IAX_IE_CALLTOKEN			54		/*!< Call number security token */
-
-#define IAX_IE_CAPABILITY2          55      /*!< Actual codec capability - u8 version + integer array */
-#define IAX_IE_FORMAT2              56      /*!< Desired codec format - u8 version + integer array */
+enum iax_information_elements {
+	IAX_IE_CALLED_NUMBER =		0x01,		/*!< Number/extension being called - string */
+	IAX_IE_CALLING_NUMBER =		0x02,		/*!< Calling number - string */
+	IAX_IE_CALLING_ANI =		0x03,		/*!< Calling number ANI for billing  - string */
+	IAX_IE_CALLING_NAME =		0x04,		/*!< Name of caller - string */
+	IAX_IE_CALLED_CONTEXT =		0x05,		/*!< Context for number - string */
+	IAX_IE_USERNAME	=		0x06,		/*!< Username (peer or user) for authentication - string */
+	IAX_IE_PASSWORD =		0x07,		/*!< Password for authentication - string */
+	IAX_IE_CAPABILITY =		0x08,		/*!< Actual codec capability - unsigned int */
+	IAX_IE_FORMAT =			0x09,		/*!< Desired codec format - unsigned int */
+	IAX_IE_LANGUAGE =		0x0A,		/*!< Desired language - string */
+	IAX_IE_VERSION =		0x0B,		/*!< Protocol version - short */
+	IAX_IE_ADSICPE =		0x0C,		/*!< CPE ADSI capability - short */
+	IAX_IE_DNID =			0x0D,		/*!< Originally dialed DNID - string */
+	IAX_IE_AUTHMETHODS =		0x0E,		/*!< Authentication method(s) - short */
+	IAX_IE_CHALLENGE =		0x0F,		/*!< Challenge data for MD5/RSA - string */
+	IAX_IE_MD5_RESULT =		0x10,		/*!< MD5 challenge result - string */
+	IAX_IE_RSA_RESULT =		0x11,		/*!< RSA challenge result - string */
+	IAX_IE_APPARENT_ADDR =		0x12,		/*!< Apparent address of peer - struct sockaddr_in */
+	IAX_IE_REFRESH =		0x13,		/*!< When to refresh registration - short */
+	IAX_IE_DPSTATUS =		0x14,		/*!< Dialplan status - short */
+	IAX_IE_CALLNO =			0x15,		/*!< Call number of peer - short */
+	IAX_IE_CAUSE =			0x16,		/*!< Cause - string */
+	IAX_IE_IAX_UNKNOWN =		0x17,		/*!< Unknown IAX command - byte */
+	IAX_IE_MSGCOUNT =		0x18,		/*!< How many messages waiting - short */
+	IAX_IE_AUTOANSWER =		0x19,		/*!< Request auto-answering -- none */
+	IAX_IE_MUSICONHOLD =		0x1A,		/*!< Request musiconhold with QUELCH -- none or string */
+	IAX_IE_TRANSFERID =		0x1B,		/*!< Transfer Request Identifier -- int */
+	IAX_IE_RDNIS =			0x1C,		/*!< Referring DNIS -- string */
+	IAX_IE_PROVISIONING =		0x1D,		/*!< Provisioning info */
+	IAX_IE_AESPROVISIONING =	0x1E,		/*!< AES Provisioning info */
+	IAX_IE_DATETIME =		0x1F,		/*!< Date/Time */
+	IAX_IE_DEVICETYPE =		0x20,		/*!< Device Type -- string */
+	IAX_IE_SERVICEIDENT =		0x21,		/*!< Service Identifier -- string */
+	IAX_IE_FIRMWAREVER =		0x22,		/*!< Firmware revision -- u16 */
+	IAX_IE_FWBLOCKDESC =		0x23,		/*!< Firmware block description -- u32 */
+	IAX_IE_FWBLOCKDATA =		0x24,		/*!< Firmware block of data -- raw */
+	IAX_IE_PROVVER =		0x25,		/*!< Provisioning Version (u32) */
+	IAX_IE_CALLINGPRES =		0x26,		/*!< Calling presentation (u8) */
+	IAX_IE_CALLINGTON =		0x27,		/*!< Calling type of number (u8) */
+	IAX_IE_CALLINGTNS =		0x28,		/*!< Calling transit network select (u16) */
+	IAX_IE_SAMPLINGRATE =		0x29,		/*!< Supported sampling rates (u16) */
+	IAX_IE_CAUSECODE =		0x2A,		/*!< Hangup cause (u8) */
+	IAX_IE_ENCRYPTION =		0x2B,		/*!< Encryption format (u16) */
+	IAX_IE_ENCKEY =			0x2C,		/*!< Encryption key (raw) */
+	IAX_IE_CODEC_PREFS =		0x2D,		/*!< Codec Negotiation */
+	IAX_IE_RR_JITTER =		0x2E,		/*!< Received jitter (as in RFC1889) u32 */
+	IAX_IE_RR_LOSS =		0x2F,		/*!< Received loss (high byte loss pct, low 24 bits loss count, as in rfc1889 */
+	IAX_IE_RR_PKTS =		0x30,		/*!< Received frames (total frames received) u32 */
+	IAX_IE_RR_DELAY =		0x31,		/*!< Max playout delay for received frames (in ms) u16 */
+	IAX_IE_RR_DROPPED =		0x32,		/*!< Dropped frames (presumably by jitterbuf) u32 */
+	IAX_IE_RR_OOO =			0x33,		/*!< Frames received Out of Order u32 */
+	IAX_IE_VARIABLE =		0x34,		/*!< Remote variables */
+	IAX_IE_OSPTOKEN =		0x35,		/*!< OSP token */
+	IAX_IE_CALLTOKEN =		0x36,		/*!< Call number security token */
+	IAX_IE_CAPABILITY2 =		0x37,		/*!< Actual codec capability - u8 version + integer array */
+	IAX_IE_FORMAT2 =		0x38,		/*!< Desired codec format - u8 version + integer array */
+};
 
 #define IAX_MAX_OSPBLOCK_SIZE		254		/*!< Max OSP token block size, 255 bytes - 1 byte OSP token block index */
 #define IAX_MAX_OSPBLOCK_NUM		4




More information about the asterisk-commits mailing list