1 /* 2 * ftdm_m3ua.h 3 * freetdm 4 * 5 * Created by Shane Burrell on 4/3/08. 6 * Copyright 2008 Shane Burrell. All rights reserved. 7 * 8 * Copyright (c) 2007, Anthony Minessale II, Nenad Corbic 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 14 * * Redistributions of source code must retain the above copyright 15 * notice, this list of conditions and the following disclaimer. 16 * 17 * * Redistributions in binary form must reproduce the above copyright 18 * notice, this list of conditions and the following disclaimer in the 19 * documentation and/or other materials provided with the distribution. 20 * 21 * * Neither the name of the original author; nor the names of any contributors 22 * may be used to endorse or promote products derived from this software 23 * without specific prior written permission. 24 * 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 27 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 28 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 29 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 30 * OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 31 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 32 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 33 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 34 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 35 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 36 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 37 */ 38 39 40 //#include "m3ua_client.h" 41 #include "freetdm.h" 42 43 #ifdef __cplusplus 44 extern "C" { 45 #endif 46 enum e_sigboost_event_id_values 47 { 48 SIGBOOST_EVENT_CALL_START = 0x80, /*128*/ 49 SIGBOOST_EVENT_CALL_START_ACK = 0x81, /*129*/ 50 SIGBOOST_EVENT_CALL_START_NACK = 0x82, /*130*/ 51 SIGBOOST_EVENT_CALL_START_NACK_ACK = 0x83, /*131*/ 52 SIGBOOST_EVENT_CALL_ANSWERED = 0x84, /*132*/ 53 SIGBOOST_EVENT_CALL_STOPPED = 0x85, /*133*/ 54 SIGBOOST_EVENT_CALL_STOPPED_ACK = 0x86, /*134*/ 55 SIGBOOST_EVENT_SYSTEM_RESTART = 0x87, /*135*/ 56 SIGBOOST_EVENT_SYSTEM_RESTART_ACK = 0x88, /*136*/ 57 /* Following IDs are ss7boost to sangoma_mgd only. */ 58 SIGBOOST_EVENT_HEARTBEAT = 0x89, /*137*/ 59 SIGBOOST_EVENT_INSERT_CHECK_LOOP = 0x8a, /*138*/ 60 SIGBOOST_EVENT_REMOVE_CHECK_LOOP = 0x8b, /*139*/ 61 SIGBOOST_EVENT_AUTO_CALL_GAP_ABATE = 0x8c, /*140*/ 62 }; 63 enum e_sigboost_release_cause_values 64 { 65 SIGBOOST_RELEASE_CAUSE_UNDEFINED = 0, 66 SIGBOOST_RELEASE_CAUSE_NORMAL = 16, 67 SIGBOOST_RELEASE_CAUSE_BUSY = 17, 68 /* probable elimination */ 69 //SIGBOOST_RELEASE_CAUSE_BUSY = 0x91, /* 145 */ 70 //SIGBOOST_RELEASE_CAUSE_CALLED_NOT_EXIST = 0x92, /* 146 */ 71 //SIGBOOST_RELEASE_CAUSE_CIRCUIT_RESET = 0x93, /* 147 */ 72 //SIGBOOST_RELEASE_CAUSE_NOANSWER = 0x94, /* 148 */ 73 }; 74 75 enum e_sigboost_call_setup_ack_nack_cause_values 76 { 77 SIGBOOST_CALL_SETUP_NACK_ALL_CKTS_BUSY = 117, /* unused Q.850 value */ 78 SIGBOOST_CALL_SETUP_NACK_TEST_CKT_BUSY = 118, /* unused Q.850 value */ 79 SIGBOOST_CALL_SETUP_NACK_INVALID_NUMBER = 28, 80 /* probable elimination */ 81 //SIGBOOST_CALL_SETUP_RESERVED = 0x00, 82 //SIGBOOST_CALL_SETUP_CIRCUIT_RESET = 0x10, 83 //SIGBOOST_CALL_SETUP_NACK_CKT_START_TIMEOUT = 0x11, 84 //SIGBOOST_CALL_SETUP_NACK_AUTO_CALL_GAP = 0x17, 85 }; 86 typedef enum { 87 M3UA_SPAN_SIGNALING_M3UA, 88 M3UA_SPAN_SIGNALING_SS7BOX, 89 90 } M3UA_TSpanSignaling; 91 #define M3UA_SPAN_STRINGS "M3UA", "SS7BOX" 92 FTDM_STR2ENUM_P(m3ua_str2span, m3ua_span2str, M3UA_TSpanSignaling) 93 94 95 96 typedef enum { 97 FTDM_M3UA_RUNNING = (1 << 0) 98 } ftdm_m3uat_flag_t; 99 100 /*typedef struct m3ua_data { 101 m3uac_connection_t mcon; 102 m3uac_connection_t pcon; 103 fio_signal_cb_t signal_cb; 104 uint32_t flags; 105 } m3ua_data_t; 106 107 */ 108 /*typedef struct mu3a_link { 109 ss7bc_connection_t mcon; 110 ss7bc_connection_t pcon; 111 fio_signal_cb_t signal_cb; 112 uint32_t flags; 113 } ftdm_m3ua_data_t; 114 */ 115 116 ftdm_status_t m3ua_init(ftdm_io_interface_t **zint); 117 ftdm_status_t m3ua_destroy(void); 118 ftdm_status_t m3ua_start(ftdm_span_t *span); 119 120 #ifdef __cplusplus 121 } 122 #endif 123 124 /* For Emacs: 125 * Local Variables: 126 * mode:c 127 * indent-tabs-mode:t 128 * tab-width:4 129 * c-basic-offset:4 130 * End: 131 * For VIM: 132 * vim:set softtabstop=4 shiftwidth=4 tabstop=4: 133 */ 134