Sat Aug 6 00:39:29 2011

Asterisk developer's documentation


isdn_lib.h

Go to the documentation of this file.
00001 /*
00002  * Chan_Misdn -- Channel Driver for Asterisk
00003  *
00004  * Interface to mISDN
00005  *
00006  * Copyright (C) 2004, Christian Richter
00007  *
00008  * Christian Richter <crich@beronet.com>
00009  *
00010  * This program is free software, distributed under the terms of
00011  * the GNU General Public License
00012  */
00013 
00014 /*! \file
00015  * \brief Interface to mISDN
00016  *
00017  * \author Christian Richter <crich@beronet.com>
00018  */
00019 
00020 #ifndef TE_LIB
00021 #define TE_LIB
00022 
00023 #include <mISDNuser/suppserv.h>
00024 
00025 /** For initialization usage **/
00026 /* typedef int ie_nothing_t ;*/
00027 /** end of init usage **/
00028 
00029 
00030 /*
00031  * uncomment the following to make chan_misdn create
00032  * record files in /tmp/misdn-{rx|tx}-PortChannel format
00033  * */
00034 
00035 /*#define MISDN_SAVE_DATA*/
00036 
00037 #ifdef WITH_BEROEC
00038 typedef int beroec_t;
00039 
00040 
00041 enum beroec_type {
00042    BEROEC_FULLBAND=0,
00043    BEROEC_SUBBAND,
00044    BEROEC_FASTSUBBAND
00045 };
00046 
00047 void beroec_init(void);
00048 void beroec_exit(void);
00049 beroec_t *beroec_new(int tail, enum beroec_type type, int anti_howl,
00050            int tonedisable, int zerocoeff, int adapt, int nlp);
00051 
00052 void beroec_destroy(beroec_t *ec);
00053 int beroec_cancel_alaw_chunk(beroec_t *ec,
00054    char *send,
00055    char *receive,
00056    int len);
00057 
00058 int beroec_version(void);
00059 #endif
00060 
00061 
00062 
00063 enum tone_e {
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 };
00073 
00074 
00075 
00076 #define MAX_BCHANS 31
00077 
00078 enum bchannel_state {
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 };
00093 
00094 
00095 enum misdn_err_e {
00096    ENOCHAN=1
00097 };
00098 
00099 
00100 enum mISDN_NUMBER_PLAN {
00101    NUMPLAN_UNINITIALIZED=-1,
00102    NUMPLAN_INTERNATIONAL=0x1,
00103    NUMPLAN_NATIONAL=0x2,
00104    NUMPLAN_SUBSCRIBER=0x4,
00105    NUMPLAN_UNKNOWN=0x0
00106 };
00107 
00108 
00109 enum event_response_e {
00110    RESPONSE_IGNORE_SETUP_WITHOUT_CLOSE,
00111    RESPONSE_IGNORE_SETUP,
00112    RESPONSE_RELEASE_SETUP,
00113    RESPONSE_ERR,
00114    RESPONSE_OK
00115 };
00116 
00117 
00118 enum event_e {
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 };
00162 
00163 
00164 enum ie_name_e {
00165    IE_DUMMY,
00166    IE_LAST
00167 };
00168 
00169 enum { /* 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 };
00178 
00179 enum { /* 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 };
00191 
00192 enum { /*CODECS*/
00193    INFO_CODEC_ULAW=2,
00194    INFO_CODEC_ALAW=3
00195 };
00196 
00197 
00198 enum layer_e {
00199    L3,
00200    L2,
00201    L1,
00202    UNKNOWN
00203 };
00204 
00205 
00206 
00207 struct misdn_bchannel {
00208    /*! \brief B channel send locking structure */
00209    struct send_lock *send_lock;
00210 
00211    /*! \brief TRUE if this is a dummy BC record */
00212    int dummy;
00213 
00214    /*! \brief TRUE if NT side of protocol (TE otherwise) */
00215    int nt;
00216 
00217    /*! \brief TRUE if ISDN-PRI (ISDN-BRI otherwise) */
00218    int pri;
00219 
00220    /*! \brief Logical Layer 1 port associated with this B channel */
00221    int port;
00222 
00223    /** init stuff **/
00224    /*! \brief B Channel mISDN driver stack ID */
00225    int b_stid;
00226 
00227    /* int b_addr; */
00228 
00229    /*! \brief B Channel mISDN driver layer ID from mISDN_new_layer() */
00230    int layer_id;
00231 
00232    /*! \brief B channel layer; set to 3 or 4 */
00233    int layer;
00234 
00235    /* state stuff */
00236    /*! \brief TRUE if DISCONNECT needs to be sent to clear a call */
00237    int need_disconnect;
00238 
00239    /*! \brief TRUE if RELEASE needs to be sent to clear a call */
00240    int need_release;
00241 
00242    /*! \brief TRUE if RELEASE_COMPLETE needs to be sent to clear a call */
00243    int need_release_complete;
00244 
00245    /*! \brief TRUE if allocate higher B channels first */
00246    int dec;
00247 
00248    /* var stuff */
00249    /*! \brief Layer 3 process ID */
00250    int l3_id;
00251 
00252    /*! \brief B channel process ID (1-5000) */
00253    int pid;
00254 
00255    /*! \brief Not used. Saved mISDN stack CONNECT_t ces value */
00256    int ces;
00257 
00258    /*! \brief B channel to restart if received a RESTART message */
00259    int restart_channel;
00260 
00261    /*! \brief Assigned B channel number B1, B2... 0 if not assigned */
00262    int channel;
00263 
00264    /*! \brief TRUE if the B channel number is preselected */
00265    int channel_preselected;
00266 
00267    /*! \brief TRUE if B channel record is in use */
00268    int in_use;
00269 
00270    /*! \brief Time when empty_bc() last called on this record */
00271    struct timeval last_used;
00272 
00273    /*! \brief TRUE if call waiting */
00274    int cw;
00275 
00276    /*! \brief B Channel mISDN driver layer ID from mISDN_get_layerid() */
00277    int addr;
00278 
00279    /*! \brief B channel speech sample data buffer */
00280    char *bframe;
00281 
00282    /*! \brief B channel speech sample data buffer size */
00283    int bframe_len;
00284    int time_usec; /* Not used */
00285 
00286    /*! \brief Not used. Contents are setup but not used. */
00287    void *astbuf;
00288 
00289    void *misdnbuf;   /* Not used */
00290 
00291    /*! \brief TRUE if the TE side should choose the B channel to use
00292     * \note This value is user configurable in /etc/asterisk/misdn.conf
00293     */
00294    int te_choose_channel;
00295 
00296    /*! \brief TRUE if the call progress indicators can indicate an inband audio message for the user to listen to
00297     * \note This value is user configurable in /etc/asterisk/misdn.conf
00298     */
00299    int early_bconnect;
00300 
00301    /*! \brief Last decoded DTMF digit from mISDN driver */
00302    int dtmf;
00303 
00304    /*! \brief TRUE if we should produce DTMF tones ourselves
00305     * \note This value is user configurable in /etc/asterisk/misdn.conf
00306     */
00307    int send_dtmf;
00308 
00309    /*! \brief TRUE if we send SETUP_ACKNOWLEDGE on incoming calls anyway (instead of PROCEEDING).
00310     *
00311     * This requests additional INFORMATION messages, so we can
00312     * wait for digits without issues.
00313     * \note This value is user configurable in /etc/asterisk/misdn.conf
00314     */
00315    int need_more_infos;
00316 
00317    /*! \brief TRUE if all digits necessary to complete the call are available.
00318     * No more INFORMATION messages are needed.
00319     */
00320    int sending_complete;
00321 
00322 
00323    /*! \brief TRUE if we will not use jollys dsp */
00324    int nodsp;
00325 
00326    /*! \brief TRUE if we will not use the jitter buffer system */
00327    int nojitter;
00328 
00329    /*! \brief Type-of-number in ISDN terms for the dialed/called number
00330     * \note This value is set to "dialplan" in /etc/asterisk/misdn.conf for outgoing calls
00331     */
00332    enum mISDN_NUMBER_PLAN dnumplan;
00333 
00334    /*! \brief Type-of-number in ISDN terms for the redirecting number which a call diversion or transfer was invoked.
00335     * \note Collected from the incoming SETUP message but not used.
00336     */
00337    enum mISDN_NUMBER_PLAN rnumplan;
00338 
00339    /*! \brief Type-of-number in ISDN terms for the originating/calling number (Caller-ID)
00340     * \note This value is set to "localdialplan" in /etc/asterisk/misdn.conf for outgoing calls
00341     */
00342    enum mISDN_NUMBER_PLAN onumplan;
00343 
00344    /*! \brief Type-of-number in ISDN terms for the connected party number
00345     * \note This value is set to "cpndialplan" in /etc/asterisk/misdn.conf for outgoing calls
00346     */
00347    enum mISDN_NUMBER_PLAN cpnnumplan;
00348 
00349    /*! \brief Progress Indicator IE coding standard field.
00350     * \note Collected from the incoming messages but not used.
00351     */
00352    int progress_coding;
00353 
00354    /*! \brief Progress Indicator IE location field.
00355     * \note Collected from the incoming messages but not used.
00356     */
00357    int progress_location;
00358 
00359    /*! \brief Progress Indicator IE progress description field.
00360     * Used to determine if there is an inband audio message present.
00361     */
00362    int progress_indicator;
00363 
00364    /*! \brief Inbound FACILITY message function type and contents */
00365    struct FacParm fac_in;
00366 
00367    /*! \brief Outbound FACILITY message function type and contents.
00368     * \note Filled in by misdn facility commands before FACILITY message sent.
00369     */
00370    struct FacParm fac_out;
00371 
00372    /* storing the current AOCD info here */
00373    enum FacFunction AOCDtype;
00374    union {
00375       struct FacAOCDCurrency currency;
00376       struct FacAOCDChargingUnit chargingUnit;
00377    } AOCD;
00378 
00379    /*! \brief Event waiting for Layer 1 to come up */
00380    enum event_e evq;
00381 
00382    /*** CRYPTING STUFF ***/
00383    int crypt;     /* Initialized, Not used */
00384    int curprx;    /* Initialized, Not used */
00385    int curptx;    /* Initialized, Not used */
00386 
00387    /*! \brief Blowfish encryption key string (secret) */
00388    char crypt_key[255];
00389 
00390    int crypt_state;  /* Not used */
00391    /*** CRYPTING STUFF END***/
00392 
00393    /*! \brief Seems to have been intended for something to do with the jitter buffer.
00394     * \note Used as a boolean.  Only initialized to 0 and referenced in a couple places
00395     */
00396    int active;
00397    int upset;  /* Not used */
00398 
00399    /*! \brief TRUE if tone generator allowed to start */
00400    int generate_tone;
00401 
00402    /*! \brief Number of tone samples to generate */
00403    int tone_cnt;
00404 
00405    /*! \brief Current B Channel state */
00406    enum bchannel_state bc_state;
00407 
00408    /*! \brief This is used as a pending bridge join request for when bc_state becomes BCHAN_ACTIVATED */
00409    enum bchannel_state next_bc_state;
00410 
00411    /*! \brief Bridging conference ID */
00412    int conf_id;
00413 
00414    /*! \brief TRUE if this channel is on hold */
00415    int holded;
00416 
00417    /*! \brief TRUE if this channel is on the misdn_stack->holding list
00418     * \note If TRUE this implies that the structure is also malloced.
00419     */
00420    int stack_holder;
00421 
00422    /*! \brief Caller ID presentation restriction code
00423     * 0=Allowed, 1=Restricted, 2=Unavailable
00424     * \note It is settable by the misdn_set_opt() application.
00425     */
00426    int pres;
00427 
00428    /*! \brief Caller ID screening code
00429     * 0=Unscreened, 1=Passed Screen, 2=Failed Screen, 3=Network Number
00430     */
00431    int screen;
00432 
00433    /*! \brief SETUP message bearer capability field code value */
00434    int capability;
00435 
00436    /*! \brief Companding ALaw/uLaw encoding (INFO_CODEC_ALAW / INFO_CODEC_ULAW) */
00437    int law;
00438 
00439    /* V110 Stuff */
00440    /*! \brief Q.931 Bearer Capability IE Information Transfer Rate field. Initialized to 0x10 (64kbit). Altered by incoming SETUP messages. */
00441    int rate;
00442 
00443    /*! \brief Q.931 Bearer Capability IE Transfer Mode field. Initialized to 0 (Circuit). Altered by incoming SETUP messages. */
00444    int mode;
00445 
00446    /*! \brief Q.931 Bearer Capability IE User Information Layer 1 Protocol field code.
00447     * \note Collected from the incoming SETUP message but not used.
00448     */
00449    int user1;
00450 
00451    /*! \brief Q.931 Bearer Capability IE Layer 1 User Rate field.
00452     * \note Collected from the incoming SETUP message and exported to Asterisk variable MISDN_URATE.
00453     */
00454    int urate;
00455 
00456    /*! \brief TRUE if call made in digital HDLC mode
00457     * \note This value is user configurable in /etc/asterisk/misdn.conf.
00458     * It is also settable by the misdn_set_opt() application.
00459     */
00460    int hdlc;
00461    /* V110 */
00462 
00463    /*! \brief Display message that can be displayed by the user phone.
00464     * \note Maximum displayable length is 34 or 82 octets.
00465     * It is also settable by the misdn_set_opt() application.
00466     */
00467    char display[84];
00468 
00469    /*! \brief Not used. Contents are setup but not used. */
00470    char msn[32];
00471 
00472    /*! \brief Originating/Calling Phone Number (Address)
00473     * \note This value can be set to "callerid" in /etc/asterisk/misdn.conf for outgoing calls
00474     */
00475    char oad[32];
00476 
00477    /*! \brief Redirecting Phone Number (Address) where a call diversion or transfer was invoked */
00478    char rad[32];
00479 
00480    /*! \brief Dialed/Called Phone Number (Address) */
00481    char dad[32];
00482 
00483    /*! \brief Connected Party/Line Phone Number (Address) */
00484    char cad[32];
00485 
00486    /*! \brief Original Dialed/Called Phone Number (Address) before national/international dialing prefix added.
00487     * \note Not used. Contents are setup but not used.
00488     */
00489    char orig_dad[32];
00490 
00491    /*! \brief Q.931 Keypad Facility IE contents
00492     * \note Contents exported and imported to Asterisk variable MISDN_KEYPAD
00493     */
00494    char keypad[32];
00495 
00496    /*! \brief Current overlap dialing digits to/from INFORMATION messages */
00497    char info_dad[64];
00498 
00499    /*! \brief Collected digits to go into info_dad[] while waiting for a SETUP_ACKNOWLEDGE to come in. */
00500    char infos_pending[64];
00501 
00502 /*    unsigned char info_keypad[32]; */
00503 /*    unsigned char clisub[24]; */
00504 /*    unsigned char cldsub[24]; */
00505 
00506    /*! \brief User-User information string.
00507     * \note Contents exported and imported to Asterisk variable MISDN_USERUSER
00508     * \note We only support ASCII strings (IA5 characters).
00509     */
00510    char uu[256];
00511 
00512    /*! \brief User-User information string length in uu[] */
00513    int uulen;
00514 
00515    /*! \brief Q.931 Cause for disconnection code (received)
00516     * \note Need to use the AST_CAUSE_xxx code definitions in causes.h
00517     */
00518    int cause;
00519 
00520    /*! \brief Q.931 Cause for disconnection code (sent)
00521     * \note Need to use the AST_CAUSE_xxx code definitions in causes.h
00522     * \note -1 is used to suppress including the cause code in the RELEASE message.
00523     */
00524    int out_cause;
00525 
00526    /* struct misdn_bchannel hold_bc; */
00527 
00528    /** list stuf **/
00529 
00530 #ifdef MISDN_1_2
00531    /*! \brief The configuration string for the mISDN dsp pipeline in /etc/asterisk/misdn.conf. */
00532    char pipeline[128];
00533 #else
00534    /*! \brief TRUE if the echo cancellor is enabled */
00535    int ec_enable;
00536 
00537    /*! \brief Number of taps in the echo cancellor when enabled.
00538     * \note This value is user configurable in /etc/asterisk/misdn.conf (echocancel)
00539     */
00540    int ec_deftaps;
00541 #endif
00542 
00543    /*! \brief TRUE if the channel was allocated from the available B channels */
00544    int channel_found;
00545 
00546    /*! \brief Who originated the call (ORG_AST, ORG_MISDN)
00547     * \note Set but not used when the misdn_set_opt() application enables echo cancellation.
00548     */
00549    int orig;
00550 
00551    /*! \brief Tx gain setting (range -8 to 8)
00552     * \note This value is user configurable in /etc/asterisk/misdn.conf.
00553     * It is also settable by the misdn_set_opt() application.
00554     */
00555    int txgain;
00556 
00557    /*! \brief Rx gain setting (range -8 to 8)
00558     * \note This value is user configurable in /etc/asterisk/misdn.conf.
00559     * It is also settable by the misdn_set_opt() application.
00560     */
00561    int rxgain;
00562 
00563    /*! \brief Next node in the misdn_stack.holding list */
00564    struct misdn_bchannel *next;
00565 };
00566 
00567 
00568 enum event_response_e (*cb_event) (enum event_e event, struct misdn_bchannel *bc, void *user_data);
00569 void (*cb_log) (int level, int port, char *tmpl, ...)
00570    __attribute__ ((format (printf, 3, 4)));
00571 int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
00572 
00573 struct misdn_lib_iface {
00574    enum event_response_e (*cb_event)(enum event_e event, struct misdn_bchannel *bc, void *user_data);
00575    void (*cb_log)(int level, int port, char *tmpl, ...)
00576       __attribute__ ((format (printf, 3, 4)));
00577    int (*cb_jb_empty)(struct misdn_bchannel *bc, char *buffer, int len);
00578 };
00579 
00580 /***** USER IFACE **********/
00581 
00582 void misdn_lib_nt_keepcalls(int kc);
00583 
00584 void misdn_lib_nt_debug_init( int flags, char *file );
00585 
00586 int misdn_lib_init(char *portlist, struct misdn_lib_iface* iface, void *user_data);
00587 int misdn_lib_send_event(struct misdn_bchannel *bc, enum event_e event );
00588 void misdn_lib_destroy(void);
00589 
00590 void misdn_lib_isdn_l1watcher(int port);
00591 
00592 void misdn_lib_log_ies(struct misdn_bchannel *bc);
00593 
00594 char *manager_isdn_get_info(enum event_e event);
00595 
00596 struct misdn_bchannel* misdn_lib_get_free_bc(int port, int channel, int inout, int dec);
00597 
00598 void manager_bchannel_activate(struct misdn_bchannel *bc);
00599 void manager_bchannel_deactivate(struct misdn_bchannel * bc);
00600 
00601 int misdn_lib_tx2misdn_frm(struct misdn_bchannel *bc, void *data, int len);
00602 
00603 void manager_ph_control(struct misdn_bchannel *bc, int c1, int c2);
00604 
00605 void isdn_lib_update_rxgain (struct misdn_bchannel *bc);
00606 void isdn_lib_update_txgain (struct misdn_bchannel *bc);
00607 void isdn_lib_update_ec (struct misdn_bchannel *bc);
00608 void isdn_lib_stop_dtmf (struct misdn_bchannel *bc);
00609 
00610 int misdn_lib_port_restart(int port);
00611 int misdn_lib_pid_restart(int pid);
00612 int misdn_lib_send_restart(int port, int channel);
00613 
00614 int misdn_lib_get_port_info(int port);
00615 
00616 int misdn_lib_is_port_blocked(int port);
00617 int misdn_lib_port_block(int port);
00618 int misdn_lib_port_unblock(int port);
00619 
00620 int misdn_lib_port_is_pri(int port);
00621 
00622 int misdn_lib_port_up(int port, int notcheck);
00623 
00624 int misdn_lib_get_port_down(int port);
00625 
00626 int misdn_lib_get_port_up (int port) ;
00627 
00628 int misdn_lib_maxports_get(void) ;
00629 
00630 struct misdn_bchannel *misdn_lib_find_held_bc(int port, int l3_id);
00631 void misdn_lib_release(struct misdn_bchannel *bc);
00632 
00633 int misdn_cap_is_speech(int cap);
00634 int misdn_inband_avail(struct misdn_bchannel *bc);
00635 
00636 void manager_ec_enable(struct misdn_bchannel *bc);
00637 void manager_ec_disable(struct misdn_bchannel *bc);
00638 
00639 void misdn_lib_send_tone(struct misdn_bchannel *bc, enum tone_e tone);
00640 
00641 void get_show_stack_details(int port, char *buf);
00642 
00643 
00644 void misdn_lib_tone_generator_start(struct misdn_bchannel *bc);
00645 void misdn_lib_tone_generator_stop(struct misdn_bchannel *bc);
00646 
00647 
00648 void misdn_lib_setup_bc(struct misdn_bchannel *bc);
00649 
00650 void misdn_lib_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2);
00651 void misdn_lib_split_bridge( struct misdn_bchannel * bc1, struct misdn_bchannel *bc2);
00652 
00653 void misdn_lib_echo(struct misdn_bchannel *bc, int onoff);
00654 
00655 int misdn_lib_is_ptp(int port);
00656 int misdn_lib_get_maxchans(int port);
00657 
00658 void misdn_lib_reinit_nt_stack(int port);
00659 
00660 #define PRI_TRANS_CAP_SPEECH                                    0x0
00661 #define PRI_TRANS_CAP_DIGITAL                                   0x08
00662 #define PRI_TRANS_CAP_RESTRICTED_DIGITAL                        0x09
00663 #define PRI_TRANS_CAP_3_1K_AUDIO                                0x10
00664 #define PRI_TRANS_CAP_7K_AUDIO                                  0x11
00665 
00666 
00667 
00668 char *bc_state2str(enum bchannel_state state);
00669 void bc_state_change(struct misdn_bchannel *bc, enum bchannel_state state);
00670 
00671 void misdn_dump_chanlist(void);
00672 
00673 #endif

Generated on Sat Aug 6 00:39:29 2011 for Asterisk - the Open Source PBX by  doxygen 1.4.7