1 /* 2 * Copyright (C) 2002-2003 Fhg Fokus 3 * 4 * This file is part of SEMS, a free SIP media server. 5 * 6 * SEMS is free software; you can redistribute it and/or modify 7 * it under the terms of the GNU General Public License as published by 8 * the Free Software Foundation; either version 2 of the License, or 9 * (at your option) any later version. 10 * 11 * For a license to use the sems software under conditions 12 * other than those described here, or to purchase support for this 13 * software, please contact iptel.org by e-mail at the following addresses: 14 * info@iptel.org 15 * 16 * SEMS is distributed in the hope that it will be useful, 17 * but WITHOUT ANY WARRANTY; without even the implied warranty of 18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19 * GNU General Public License for more details. 20 * 21 * You should have received a copy of the GNU General Public License 22 * along with this program; if not, write to the Free Software 23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 */ 25 26 /* 27 * telephone_event.h -- RTP Payload for DTMF Digits (RFC 2833) 28 */ 29 30 #ifndef _telephone_event_h_ 31 #define _telephone_event_h_ 32 33 #include <sys/types.h> 34 35 /* 36 * The type definitions below are valid for 32-bit architectures and 37 * may have to be adjusted for 16- or 64-bit architectures. 38 */ 39 typedef unsigned char u_int8; 40 typedef unsigned short u_int16; 41 typedef unsigned int u_int32; 42 43 /* 44 * DTMF Payload 45 */ 46 typedef struct { 47 48 u_int8 event; 49 50 #if (defined(__BYTE_ORDER) && (__BYTE_ORDER == __BIG_ENDIAN)) 51 u_int8 e:1; 52 u_int8 r:1; 53 u_int8 volume:6; 54 #else 55 u_int8 volume:6; 56 u_int8 r:1; 57 u_int8 e:1; 58 #endif 59 60 u_int16 duration; 61 62 } dtmf_payload_t; 63 64 #endif 65