diff options
Diffstat (limited to 'channels/iax2.h')
-rwxr-xr-x | channels/iax2.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/channels/iax2.h b/channels/iax2.h index f145b45bd..1c1d948e4 100755 --- a/channels/iax2.h +++ b/channels/iax2.h @@ -117,11 +117,15 @@ #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_AUTH_PLAINTEXT (1 << 0) #define IAX_AUTH_MD5 (1 << 1) #define IAX_AUTH_RSA (1 << 2) +#define IAX_ENCRYPT_AES128 (1 << 0) + #define IAX_META_TRUNK 1 /* Trunk meta-message */ #define IAX_META_VIDEO 2 /* Video frame */ @@ -145,11 +149,18 @@ struct ast_iax2_full_hdr { unsigned int ts; /* 32-bit timestamp in milliseconds (from 1st transmission) */ unsigned char oseqno; /* Packet number (outgoing) */ unsigned char iseqno; /* Packet number (next incoming expected) */ - char type; /* Frame type */ + unsigned char type; /* Frame type */ unsigned char csub; /* Compressed subclass */ unsigned char iedata[0]; } __attribute__ ((__packed__)); +/* Full frames are always delivered reliably */ +struct ast_iax2_full_enc_hdr { + unsigned short scallno; /* Source call number -- high bit must be 1 */ + unsigned short dcallno; /* Destination call number -- high bit is 1 if retransmission */ + unsigned char encdata[0]; +} __attribute__ ((__packed__)); + /* Mini header is used only for voice frames -- delivered unreliably */ struct ast_iax2_mini_hdr { unsigned short callno; /* Source call number -- high bit must be 0, rest must be non-zero */ @@ -159,6 +170,12 @@ struct ast_iax2_mini_hdr { unsigned char data[0]; } __attribute__ ((__packed__)); +/* Mini header is used only for voice frames -- delivered unreliably */ +struct ast_iax2_mini_enc_hdr { + unsigned short callno; /* Source call number -- high bit must be 0, rest must be non-zero */ + unsigned char encdata[0]; +} __attribute__ ((__packed__)); + struct ast_iax2_meta_hdr { unsigned short zeros; /* Zeros field -- must be zero */ unsigned char metacmd; /* Meta command */ |