#include <mISDNuser/suppserv.h>
Include dependency graph for isdn_lib.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.
Definition in file isdn_lib.h.
| #define MAX_BCHANS 31 |
Definition at line 76 of file isdn_lib.h.
Referenced by empty_chan_in_stack(), find_free_chan_in_stack(), misdn_lib_get_free_bc(), set_chan_in_stack(), and stack_init().
| #define PRI_TRANS_CAP_3_1K_AUDIO 0x10 |
Definition at line 664 of file isdn_lib.h.
| #define PRI_TRANS_CAP_7K_AUDIO 0x11 |
Definition at line 665 of file isdn_lib.h.
| #define PRI_TRANS_CAP_DIGITAL 0x08 |
| #define PRI_TRANS_CAP_RESTRICTED_DIGITAL 0x09 |
Definition at line 663 of file isdn_lib.h.
| #define PRI_TRANS_CAP_SPEECH 0x0 |
Definition at line 661 of file isdn_lib.h.
| anonymous enum |
Definition at line 169 of file isdn_lib.h.
00169 { /* bearer capability */ 00170 INFO_CAPABILITY_SPEECH=0, 00171 INFO_CAPABILITY_AUDIO_3_1K=0x10 , 00172 INFO_CAPABILITY_AUDIO_7K=0x11 , 00173 INFO_CAPABILITY_VIDEO =0x18, 00174 INFO_CAPABILITY_DIGITAL_UNRESTRICTED =0x8, 00175 INFO_CAPABILITY_DIGITAL_RESTRICTED =0x09, 00176 INFO_CAPABILITY_DIGITAL_UNRESTRICTED_TONES 00177 };
| anonymous enum |
Definition at line 179 of file isdn_lib.h.
00179 { /* progress indicators */ 00180 INFO_PI_CALL_NOT_E2E_ISDN =0x01, 00181 INFO_PI_CALLED_NOT_ISDN =0x02, 00182 INFO_PI_CALLER_NOT_ISDN =0x03, 00183 INFO_PI_CALLER_RETURNED_TO_ISDN =0x04, 00184 INFO_PI_INBAND_AVAILABLE =0x08, 00185 INFO_PI_DELAY_AT_INTERF =0x0a, 00186 INFO_PI_INTERWORKING_WITH_PUBLIC =0x10, 00187 INFO_PI_INTERWORKING_NO_RELEASE =0x11, 00188 INFO_PI_INTERWORKING_NO_RELEASE_PRE_ANSWER =0x12, 00189 INFO_PI_INTERWORKING_NO_RELEASE_POST_ANSWER =0x13 00190 };
| anonymous enum |
Definition at line 192 of file isdn_lib.h.
00192 { /*CODECS*/ 00193 INFO_CODEC_ULAW=2, 00194 INFO_CODEC_ALAW=3 00195 };
| enum bchannel_state |
| BCHAN_CLEANED | |
| BCHAN_EMPTY | |
| BCHAN_SETUP | |
| BCHAN_SETUPED | |
| BCHAN_ACTIVE | |
| BCHAN_ACTIVATED | |
| BCHAN_BRIDGE | |
| BCHAN_BRIDGED | |
| BCHAN_RELEASE | |
| BCHAN_RELEASED | |
| BCHAN_CLEAN | |
| BCHAN_CLEAN_REQUEST | |
| BCHAN_ERROR |
Definition at line 78 of file isdn_lib.h.
00078 { 00079 BCHAN_CLEANED=0, 00080 BCHAN_EMPTY, 00081 BCHAN_SETUP, 00082 BCHAN_SETUPED, 00083 BCHAN_ACTIVE, 00084 BCHAN_ACTIVATED, 00085 BCHAN_BRIDGE, 00086 BCHAN_BRIDGED, 00087 BCHAN_RELEASE, 00088 BCHAN_RELEASED, 00089 BCHAN_CLEAN, 00090 BCHAN_CLEAN_REQUEST, 00091 BCHAN_ERROR 00092 };
| enum event_e |
Definition at line 118 of file isdn_lib.h.
00118 { 00119 EVENT_NOTHING, 00120 EVENT_TONE_GENERATE, 00121 EVENT_BCHAN_DATA, 00122 EVENT_BCHAN_ACTIVATED, 00123 EVENT_BCHAN_ERROR, 00124 EVENT_CLEANUP, 00125 EVENT_PROCEEDING, 00126 EVENT_PROGRESS, 00127 EVENT_SETUP, 00128 EVENT_ALERTING, 00129 EVENT_CONNECT, 00130 EVENT_SETUP_ACKNOWLEDGE, 00131 EVENT_CONNECT_ACKNOWLEDGE , 00132 EVENT_USER_INFORMATION, 00133 EVENT_SUSPEND_REJECT, 00134 EVENT_RESUME_REJECT, 00135 EVENT_HOLD, 00136 EVENT_SUSPEND, 00137 EVENT_RESUME, 00138 EVENT_HOLD_ACKNOWLEDGE, 00139 EVENT_SUSPEND_ACKNOWLEDGE, 00140 EVENT_RESUME_ACKNOWLEDGE, 00141 EVENT_HOLD_REJECT, 00142 EVENT_RETRIEVE, 00143 EVENT_RETRIEVE_ACKNOWLEDGE, 00144 EVENT_RETRIEVE_REJECT, 00145 EVENT_DISCONNECT, 00146 EVENT_RESTART, 00147 EVENT_RELEASE, 00148 EVENT_RELEASE_COMPLETE, 00149 EVENT_FACILITY, 00150 EVENT_NOTIFY, 00151 EVENT_STATUS_ENQUIRY, 00152 EVENT_INFORMATION, 00153 EVENT_STATUS, 00154 EVENT_TIMEOUT, 00155 EVENT_DTMF_TONE, 00156 EVENT_NEW_L3ID, 00157 EVENT_NEW_BC, 00158 EVENT_PORT_ALARM, 00159 EVENT_NEW_CHANNEL, 00160 EVENT_UNKNOWN 00161 };
| enum event_response_e |
| RESPONSE_IGNORE_SETUP_WITHOUT_CLOSE | |
| RESPONSE_IGNORE_SETUP | |
| RESPONSE_RELEASE_SETUP | |
| RESPONSE_ERR | |
| RESPONSE_OK |
Definition at line 109 of file isdn_lib.h.
00109 { 00110 RESPONSE_IGNORE_SETUP_WITHOUT_CLOSE, 00111 RESPONSE_IGNORE_SETUP, 00112 RESPONSE_RELEASE_SETUP, 00113 RESPONSE_ERR, 00114 RESPONSE_OK 00115 };
| enum ie_name_e |
| enum layer_e |
| enum misdn_err_e |
| enum mISDN_NUMBER_PLAN |
| NUMPLAN_UNINITIALIZED | |
| NUMPLAN_INTERNATIONAL | |
| NUMPLAN_NATIONAL | |
| NUMPLAN_SUBSCRIBER | |
| NUMPLAN_UNKNOWN |
Definition at line 100 of file isdn_lib.h.
00100 { 00101 NUMPLAN_UNINITIALIZED=-1, 00102 NUMPLAN_INTERNATIONAL=0x1, 00103 NUMPLAN_NATIONAL=0x2, 00104 NUMPLAN_SUBSCRIBER=0x4, 00105 NUMPLAN_UNKNOWN=0x0 00106 };
| enum tone_e |
end of init usage
| TONE_NONE | |
| TONE_DIAL | |
| TONE_ALERTING | |
| TONE_FAR_ALERTING | |
| TONE_BUSY | |
| TONE_HANGUP | |
| TONE_CUSTOM | |
| TONE_FILE |
Definition at line 63 of file isdn_lib.h.
00063 { 00064 TONE_NONE=0, 00065 TONE_DIAL, 00066 TONE_ALERTING, 00067 TONE_FAR_ALERTING, 00068 TONE_BUSY, 00069 TONE_HANGUP, 00070 TONE_CUSTOM, 00071 TONE_FILE 00072 };
| char* bc_state2str | ( | enum bchannel_state | state | ) |
Definition at line 562 of file isdn_lib.c.
References BCHAN_ACTIVATED, BCHAN_ACTIVE, BCHAN_BRIDGE, BCHAN_BRIDGED, BCHAN_CLEAN, BCHAN_CLEAN_REQUEST, BCHAN_CLEANED, BCHAN_EMPTY, BCHAN_ERROR, BCHAN_RELEASE, BCHAN_RELEASED, BCHAN_SETUP, BCHAN_SETUPED, and s.
Referenced by bc_next_state_change(), bc_state_change(), cb_events(), handle_bchan(), handle_err(), misdn_lib_send_event(), misdn_lib_split_bridge(), misdn_lib_tx2misdn_frm(), print_bc_info(), and setup_bc().
00562 { 00563 int i; 00564 00565 struct bchan_state_s { 00566 char *n; 00567 enum bchannel_state s; 00568 } states[] = { 00569 {"BCHAN_CLEANED", BCHAN_CLEANED }, 00570 {"BCHAN_EMPTY", BCHAN_EMPTY}, 00571 {"BCHAN_SETUP", BCHAN_SETUP}, 00572 {"BCHAN_SETUPED", BCHAN_SETUPED}, 00573 {"BCHAN_ACTIVE", BCHAN_ACTIVE}, 00574 {"BCHAN_ACTIVATED", BCHAN_ACTIVATED}, 00575 {"BCHAN_BRIDGE", BCHAN_BRIDGE}, 00576 {"BCHAN_BRIDGED", BCHAN_BRIDGED}, 00577 {"BCHAN_RELEASE", BCHAN_RELEASE}, 00578 {"BCHAN_RELEASED", BCHAN_RELEASED}, 00579 {"BCHAN_CLEAN", BCHAN_CLEAN}, 00580 {"BCHAN_CLEAN_REQUEST", BCHAN_CLEAN_REQUEST}, 00581 {"BCHAN_ERROR", BCHAN_ERROR} 00582 }; 00583 00584 for (i=0; i< sizeof(states)/sizeof(struct bchan_state_s); i++) 00585 if ( states[i].s == state) 00586 return states[i].n; 00587 00588 return "UNKNOWN"; 00589 }
| void bc_state_change | ( | struct misdn_bchannel * | bc, | |
| enum bchannel_state | state | |||
| ) |
Definition at line 591 of file isdn_lib.c.
References misdn_bchannel::bc_state, bc_state2str(), BCHAN_ACTIVATED, BCHAN_BRIDGED, BCHAN_EMPTY, cb_log, misdn_bchannel::conf_id, misdn_bchannel::l3_id, misdn_join_conf(), misdn_bchannel::next_bc_state, and misdn_bchannel::port.
Referenced by clean_up_bc(), handle_bchan(), handle_frm(), init_bc(), manager_bchannel_deactivate(), misdn_join_conf(), misdn_lib_send_event(), and misdn_split_conf().
00592 { 00593 cb_log(5,bc->port,"BC_STATE_CHANGE: l3id:%x from:%s to:%s\n", 00594 bc->l3_id, 00595 bc_state2str(bc->bc_state), 00596 bc_state2str(state) ); 00597 00598 switch (state) { 00599 case BCHAN_ACTIVATED: 00600 if (bc->next_bc_state == BCHAN_BRIDGED) { 00601 misdn_join_conf(bc, bc->conf_id); 00602 bc->next_bc_state = BCHAN_EMPTY; 00603 return; 00604 } 00605 default: 00606 bc->bc_state=state; 00607 break; 00608 } 00609 }
| void get_show_stack_details | ( | int | port, | |
| char * | buf | |||
| ) |
Definition at line 148 of file isdn_lib.c.
References get_misdn_stack(), misdn_stack::next, and misdn_stack::port.
Referenced by misdn_show_port(), and misdn_show_stacks().
00149 { 00150 struct misdn_stack *stack=get_misdn_stack(); 00151 00152 for ( ; stack; stack=stack->next) { 00153 if (stack->port == port) break; 00154 } 00155 00156 if (stack) { 00157 sprintf(buf, "* Port %d Type %s Prot. %s L2Link %s L1Link:%s Blocked:%d", 00158 stack->port, stack->nt ? "NT" : "TE", stack->ptp ? "PTP" : "PMP", 00159 stack->l2link ? "UP" : "DOWN", stack->l1link ? "UP" : "DOWN", 00160 stack->blocked); 00161 } else { 00162 buf[0]=0; 00163 } 00164 }
| void isdn_lib_stop_dtmf | ( | struct misdn_bchannel * | bc | ) |
Definition at line 4305 of file isdn_lib.c.
References misdn_stack::bc, and manager_ph_control().
Referenced by process_ast_dsp().
04306 { 04307 manager_ph_control(bc, DTMF_TONE_STOP, 0); 04308 }
| void isdn_lib_update_ec | ( | struct misdn_bchannel * | bc | ) |
Definition at line 4293 of file isdn_lib.c.
References misdn_stack::bc, misdn_bchannel::ec_enable, manager_ec_disable(), and manager_ec_enable().
Referenced by process_ast_dsp().
04294 { 04295 #ifdef MISDN_1_2 04296 if (*bc->pipeline) 04297 #else 04298 if (bc->ec_enable) 04299 #endif 04300 manager_ec_enable(bc); 04301 else 04302 manager_ec_disable(bc); 04303 }
| void isdn_lib_update_rxgain | ( | struct misdn_bchannel * | bc | ) |
Definition at line 4283 of file isdn_lib.c.
References misdn_stack::bc, manager_ph_control(), and misdn_bchannel::rxgain.
Referenced by process_ast_dsp().
04284 { 04285 manager_ph_control(bc, VOL_CHANGE_RX, bc->rxgain); 04286 }
| void isdn_lib_update_txgain | ( | struct misdn_bchannel * | bc | ) |
Definition at line 4288 of file isdn_lib.c.
References misdn_stack::bc, manager_ph_control(), and misdn_bchannel::txgain.
Referenced by process_ast_dsp().
04289 { 04290 manager_ph_control(bc, VOL_CHANGE_TX, bc->txgain); 04291 }
| void manager_bchannel_activate | ( | struct misdn_bchannel * | bc | ) |
Definition at line 4166 of file isdn_lib.c.
References misdn_bchannel::addr, misdn_bchannel::astbuf, misdn_stack::bc, cb_log, get_stack_by_bc(), misdn_stack::midev, misdn_stack::port, and misdn_bchannel::port.
04167 { 04168 char buf[128]; 04169 04170 struct misdn_stack *stack=get_stack_by_bc(bc); 04171 04172 if (!stack) { 04173 cb_log(0, bc->port, "bchannel_activate: Stack not found !"); 04174 return ; 04175 } 04176 04177 /* we must activate if we are deactivated */ 04178 clear_ibuffer(bc->astbuf); 04179 04180 cb_log(5, stack->port, "$$$ Bchan Activated addr %x\n", bc->addr); 04181 04182 mISDN_write_frame(stack->midev, buf, bc->addr | FLG_MSG_DOWN, DL_ESTABLISH | REQUEST, 0,0, NULL, TIMEOUT_1SEC); 04183 04184 return ; 04185 }
| void manager_bchannel_deactivate | ( | struct misdn_bchannel * | bc | ) |
Definition at line 4188 of file isdn_lib.c.
References misdn_bchannel::addr, misdn_bchannel::astbuf, misdn_stack::bc, misdn_bchannel::bc_state, bc_state_change(), BCHAN_ACTIVATED, BCHAN_BRIDGED, BCHAN_RELEASE, cb_log, misdn_bchannel::conf_id, misdn_bchannel::generate_tone, get_stack_by_bc(), misdn_stack::midev, misdn_split_conf(), misdn_stack::port, and misdn_bchannel::port.
Referenced by clean_up_bc().
04189 { 04190 struct misdn_stack *stack=get_stack_by_bc(bc); 04191 iframe_t dact; 04192 char buf[128]; 04193 04194 switch (bc->bc_state) { 04195 case BCHAN_ACTIVATED: 04196 break; 04197 case BCHAN_BRIDGED: 04198 misdn_split_conf(bc,bc->conf_id); 04199 break; 04200 default: 04201 cb_log( 4, bc->port,"bchan_deactivate: called but not activated\n"); 04202 return ; 04203 04204 } 04205 04206 cb_log(5, stack->port, "$$$ Bchan deActivated addr %x\n", bc->addr); 04207 04208 bc->generate_tone=0; 04209 04210 dact.prim = DL_RELEASE | REQUEST; 04211 dact.addr = bc->addr | FLG_MSG_DOWN; 04212 dact.dinfo = 0; 04213 dact.len = 0; 04214 mISDN_write_frame(stack->midev, buf, bc->addr | FLG_MSG_DOWN, DL_RELEASE|REQUEST,0,0,NULL, TIMEOUT_1SEC); 04215 04216 clear_ibuffer(bc->astbuf); 04217 04218 bc_state_change(bc,BCHAN_RELEASE); 04219 04220 return; 04221 }
| void manager_ec_disable | ( | struct misdn_bchannel * | bc | ) |
Definition at line 4521 of file isdn_lib.c.
References misdn_stack::bc, misdn_bchannel::capability, cb_log, misdn_bchannel::ec_enable, ECHOCAN_OFF, get_stack_by_bc(), manager_ph_control(), manager_ph_control_block(), misdn_cap_is_speech(), and