Thu Oct 11 06:36:33 2012

Asterisk developer's documentation


isdn_msg_parser.c File Reference

Interface to mISDN - message parser. More...

#include "isdn_lib_intern.h"
#include "isdn_lib.h"
#include "ie.c"

Include dependency graph for isdn_msg_parser.c:

Go to the source code of this file.

Defines

#define ANY_CHANNEL   0xff
#define msgs_max   (sizeof(msgs_g)/sizeof(struct isdn_msg))

Functions

static msg_t * build_alerting (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_connect (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_connect_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_disconnect (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static void build_display_str (char *display, size_t display_length, int display_format, const char *name, const char *number)
static msg_t * build_facility (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_hold (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_hold_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_hold_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_information (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_notify (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_proceeding (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_progress (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_release (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_release_complete (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_restart (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_resume (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_resume_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_resume_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_retrieve (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_retrieve_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_retrieve_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_setup (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_setup_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_status (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_status_enquiry (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_suspend (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_suspend_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_suspend_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_timeout (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static msg_t * build_user_information (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
static void dec_ie_facility (unsigned char *p, Q931_info_t *qi, struct FacParm *fac, int nt, struct misdn_bchannel *bc)
static void enc_ie_facility (unsigned char **ntmode, msg_t *msg, struct FacParm *fac, int nt)
char * isdn_get_info (struct isdn_msg msgs[], enum event_e event, int nt)
msg_t * isdn_msg_build_event (struct isdn_msg msgs[], struct misdn_bchannel *bc, enum event_e event, int nt)
enum event_e isdn_msg_get_event (struct isdn_msg msgs[], msg_t *msg, int nt)
int isdn_msg_get_index (struct isdn_msg msgs[], msg_t *msg, int nt)
int isdn_msg_get_index_by_event (struct isdn_msg msgs[], enum event_e event, int nt)
char * isdn_msg_get_info (struct isdn_msg msgs[], msg_t *msg, int nt)
int isdn_msg_parse_event (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_alerting (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_connect (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_connect_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_disconnect (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_facility (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_hold (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_hold_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_hold_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_notify (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_proceeding (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_progress (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_release (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_release_complete (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_restart (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_resume (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_resume_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_resume_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_retrieve (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_retrieve_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_retrieve_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_setup (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_setup_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_status (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_status_enquiry (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_suspend (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_suspend_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_suspend_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_timeout (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void parse_user_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt)
static void set_channel (struct misdn_bchannel *bc, int channel)

Variables

char EVENT_BCHAN_ACTIVATED_INFO [] = "BCHAN_ACTIVATED"
char EVENT_BCHAN_DATA_INFO [] = "BCHAN_DATA"
char EVENT_BCHAN_ERROR_INFO [] = "BCHAN_ERROR"
char EVENT_CLEAN_INFO [] = "CLEAN_UP"
char EVENT_DTMF_TONE_INFO [] = "DTMF_TONE"
char EVENT_NEW_BC_INFO [] = "NEW_BC"
char EVENT_NEW_CHANNEL_INFO [] = "NEW_CHANNEL"
char EVENT_NEW_L3ID_INFO [] = "NEW_L3ID"
char EVENT_PORT_ALARM_INFO [] = "ALARM"
char EVENT_TONE_GENERATE_INFO [] = "TONE_GENERATE"
struct isdn_msg msgs_g []


Detailed Description

Interface to mISDN - message parser.

Author:
Christian Richter <crich@beronet.com>

Definition in file isdn_msg_parser.c.


Define Documentation

#define ANY_CHANNEL   0xff

Definition at line 499 of file isdn_msg_parser.c.

Referenced by build_setup().

#define msgs_max   (sizeof(msgs_g)/sizeof(struct isdn_msg))

Definition at line 1671 of file isdn_msg_parser.c.

Referenced by isdn_msg_get_index(), and isdn_msg_get_index_by_event().


Function Documentation

static msg_t* build_alerting ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 237 of file isdn_msg_parser.c.

References misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), enc_ie_facility(), enc_ie_progress(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.

00238 {
00239    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00240    ALERTING_t *alerting;
00241    msg_t *msg =(msg_t*)create_l3msg(CC_ALERTING | REQUEST, MT_ALERTING,  bc?bc->l3_id:-1, sizeof(ALERTING_t) ,nt);
00242 
00243    alerting=(ALERTING_t*)((msg->data+HEADER_LEN));
00244 
00245    enc_ie_channel_id(&alerting->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
00246 
00247    if (nt)
00248       enc_ie_progress(&alerting->PROGRESS, msg, 0, nt?1:5, 8, nt,bc);
00249 
00250    if (bc->fac_out.Function != Fac_None) {
00251       enc_ie_facility(&alerting->FACILITY, msg, &bc->fac_out, nt);
00252    }
00253 
00254    /* enc_ie_redir_dn */
00255 
00256 #ifdef DEBUG
00257    printf("Building ALERTING Msg\n");
00258 #endif
00259    return msg;
00260 }

static msg_t* build_connect ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 680 of file isdn_msg_parser.c.

References build_display_str(), cb_log, misdn_bchannel::connected, create_l3msg(), misdn_bchannel::display, misdn_bchannel::display_connected, enc_ie_connected_pn(), enc_ie_date(), enc_ie_display(), enc_ie_facility(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_party_id::name, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, misdn_bchannel::outgoing_colp, misdn_bchannel::port, misdn_party_id::presentation, and misdn_party_id::screening.

00681 {
00682    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00683    CONNECT_t *connect;
00684    msg_t *msg =(msg_t*)create_l3msg(CC_CONNECT | REQUEST, MT_CONNECT,  bc?bc->l3_id:-1, sizeof(CONNECT_t) ,nt);
00685 
00686    cb_log(6,bc->port,"BUILD_CONNECT: bc:%p bc->l3id:%d, nt:%d\n",bc,bc->l3_id,nt);
00687 
00688    connect=(CONNECT_t*)((msg->data+HEADER_LEN));
00689 
00690    if (nt) {
00691       time_t now;
00692       time(&now);
00693       enc_ie_date(&connect->DATE, msg, now, nt,bc);
00694    }
00695 
00696    switch (bc->outgoing_colp) {
00697    case 0:/* pass */
00698    case 1:/* restricted */
00699       enc_ie_connected_pn(&connect->CONNECT_PN, msg, bc->connected.number_type,
00700          bc->connected.number_plan, bc->connected.presentation,
00701          bc->connected.screening, bc->connected.number, nt, bc);
00702       break;
00703    default:
00704       break;
00705    }
00706 
00707    if (nt && bc->connected.presentation == 0) {
00708       char display[sizeof(bc->display)];
00709 
00710       /* Presentation is allowed */
00711       build_display_str(display, sizeof(display), bc->display_connected, bc->connected.name, bc->connected.number);
00712       if (display[0]) {
00713          enc_ie_display(&connect->DISPLAY, msg, display, nt, bc);
00714       }
00715    }
00716 
00717    if (bc->fac_out.Function != Fac_None) {
00718       enc_ie_facility(&connect->FACILITY, msg, &bc->fac_out, nt);
00719    }
00720 
00721 #ifdef DEBUG
00722    printf("Building CONNECT Msg\n");
00723 #endif
00724    return msg;
00725 }

static msg_t* build_connect_acknowledge ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 783 of file isdn_msg_parser.c.

References misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.

00784 {
00785    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00786    CONNECT_ACKNOWLEDGE_t *connect_acknowledge;
00787    msg_t *msg =(msg_t*)create_l3msg(CC_CONNECT | RESPONSE, MT_CONNECT,  bc?bc->l3_id:-1, sizeof(CONNECT_ACKNOWLEDGE_t) ,nt);
00788 
00789    connect_acknowledge=(CONNECT_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN));
00790 
00791    enc_ie_channel_id(&connect_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc);
00792 
00793 #ifdef DEBUG
00794    printf("Building CONNECT_ACKNOWLEDGE Msg\n");
00795 #endif
00796    return msg;
00797 }

static msg_t* build_disconnect ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1070 of file isdn_msg_parser.c.

References cb_log, create_l3msg(), enc_ie_cause(), enc_ie_facility(), enc_ie_progress(), enc_ie_useruser(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_bchannel::out_cause, misdn_bchannel::port, misdn_bchannel::uu, and misdn_bchannel::uulen.

01071 {
01072    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01073    DISCONNECT_t *disconnect;
01074    msg_t *msg =(msg_t*)create_l3msg(CC_DISCONNECT | REQUEST, MT_DISCONNECT,  bc?bc->l3_id:-1, sizeof(DISCONNECT_t) ,nt);
01075 
01076    disconnect=(DISCONNECT_t*)((msg->data+HEADER_LEN));
01077 
01078    enc_ie_cause(&disconnect->CAUSE, msg, (nt)?1:0, bc->out_cause,nt,bc);
01079    if (nt) {
01080       enc_ie_progress(&disconnect->PROGRESS, msg, 0, nt ? 1 : 5, 8, nt, bc);
01081    }
01082 
01083    if (bc->fac_out.Function != Fac_None) {
01084       enc_ie_facility(&disconnect->FACILITY, msg, &bc->fac_out, nt);
01085    }
01086 
01087    if (bc->uulen) {
01088       int  protocol=4;
01089       enc_ie_useruser(&disconnect->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
01090       cb_log(1, bc->port, "ENCODING USERUSERINFO:%s\n", bc->uu);
01091    }
01092 
01093 #ifdef DEBUG
01094    printf("Building DISCONNECT Msg\n");
01095 #endif
01096    return msg;
01097 }

static void build_display_str ( char *  display,
size_t  display_length,
int  display_format,
const char *  name,
const char *  number 
) [static]

Definition at line 42 of file isdn_msg_parser.c.

Referenced by build_connect(), and build_setup().

00043 {
00044    display[0] = 0;
00045    switch (display_format) {
00046    default:
00047    case 0:     /* none */
00048       break;
00049 
00050    case 1:     /* name */
00051       snprintf(display, display_length, "%s", name);
00052       break;
00053 
00054    case 2:     /* number */
00055       snprintf(display, display_length, "%s", number);
00056       break;
00057 
00058    case 3:     /* both */
00059       if (name[0] || number[0]) {
00060          snprintf(display, display_length, "\"%s\" <%s>", name, number);
00061       }
00062       break;
00063    }
00064 }

static msg_t* build_facility ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1314 of file isdn_msg_parser.c.

References create_l3msg(), misdn_bchannel::display, enc_ie_display(), enc_ie_notify(), enc_ie_redir_dn(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, len(), mISDN_NOTIFY_CODE_INVALID, mISDNUSER_HEAD_SIZE, misdn_bchannel::notify_description_code, misdn_bchannel::nt, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, misdn_bchannel::outgoing_colp, misdn_party_id::presentation, misdn_bchannel::redirecting, misdn_party_redirecting::to, and misdn_party_redirecting::to_changed.

01315 {
01316    int len;
01317    int HEADER_LEN;
01318    unsigned char *ie_fac;
01319    unsigned char fac_tmp[256];
01320    msg_t *msg;
01321    FACILITY_t *facility;
01322    Q931_info_t *qi;
01323 
01324 #ifdef DEBUG
01325    printf("Building FACILITY Msg\n");
01326 #endif
01327 
01328    len = encodeFac(fac_tmp, &(bc->fac_out));
01329    if (len <= 0) {
01330       /*
01331        * mISDN does not know how to build the requested facility structure
01332        * Clear facility information
01333        */
01334       bc->fac_out.Function = Fac_None;
01335 
01336 #if defined(AST_MISDN_ENHANCEMENTS)
01337       /* Clear other one shot information. */
01338       bc->notify_description_code = mISDN_NOTIFY_CODE_INVALID;
01339       bc->redirecting.to_changed = 0;
01340 #endif   /* defined(AST_MISDN_ENHANCEMENTS) */
01341       return NULL;
01342    }
01343 
01344    msg = (msg_t *) create_l3msg(CC_FACILITY | REQUEST, MT_FACILITY, bc ? bc->l3_id : -1, sizeof(FACILITY_t), nt);
01345    HEADER_LEN = nt ? mISDNUSER_HEAD_SIZE : mISDN_HEADER_LEN;
01346    facility = (FACILITY_t *) (msg->data + HEADER_LEN);
01347 
01348    ie_fac = msg_put(msg, len);
01349    if (bc->nt) {
01350       facility->FACILITY = ie_fac + 1;
01351    } else {
01352       qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN);
01353       qi->QI_ELEMENT(facility) = ie_fac - (unsigned char *)qi - sizeof(Q931_info_t);
01354    }
01355 
01356    memcpy(ie_fac, fac_tmp, len);
01357 
01358    /* Clear facility information */
01359    bc->fac_out.Function = Fac_None;
01360 
01361    if (*bc->display) {
01362 #ifdef DEBUG
01363       printf("Sending %s as Display\n", bc->display);
01364 #endif
01365       enc_ie_display(&facility->DISPLAY, msg, bc->display, nt,bc);
01366    }
01367 
01368 #if defined(AST_MISDN_ENHANCEMENTS)
01369    if (bc->notify_description_code != mISDN_NOTIFY_CODE_INVALID) {
01370       enc_ie_notify(&facility->NOTIFY, msg, bc->notify_description_code, nt, bc);
01371       bc->notify_description_code = mISDN_NOTIFY_CODE_INVALID;
01372    }
01373 
01374    if (bc->redirecting.to_changed) {
01375       bc->redirecting.to_changed = 0;
01376       switch (bc->outgoing_colp) {
01377       case 0:/* pass */
01378       case 1:/* restricted */
01379          enc_ie_redir_dn(&facility->REDIR_DN, msg, bc->redirecting.to.number_type,
01380             bc->redirecting.to.number_plan, bc->redirecting.to.presentation,
01381             bc->redirecting.to.number, nt, bc);
01382          break;
01383       default:
01384          break;
01385       }
01386    }
01387 #endif   /* defined(AST_MISDN_ENHANCEMENTS) */
01388 
01389    return msg;
01390 }

static msg_t* build_hold ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 865 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00866 {
00867    msg_t *msg =(msg_t*)create_l3msg(CC_HOLD | REQUEST, MT_HOLD,  bc?bc->l3_id:-1, sizeof(HOLD_t) ,nt);
00868 
00869 #ifdef DEBUG
00870    printf("Building HOLD Msg\n");
00871 #endif
00872    return msg;
00873 }

static msg_t* build_hold_acknowledge ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 922 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00923 {
00924    msg_t *msg =(msg_t*)create_l3msg(CC_HOLD_ACKNOWLEDGE | REQUEST, MT_HOLD_ACKNOWLEDGE,  bc?bc->l3_id:-1, sizeof(HOLD_ACKNOWLEDGE_t) ,nt);
00925 
00926 #ifdef DEBUG
00927    printf("Building HOLD_ACKNOWLEDGE Msg\n");
00928 #endif
00929    return msg;
00930 }

static msg_t* build_hold_reject ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 979 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00980 {
00981    msg_t *msg =(msg_t*)create_l3msg(CC_HOLD_REJECT | REQUEST, MT_HOLD_REJECT,  bc?bc->l3_id:-1, sizeof(HOLD_REJECT_t) ,nt);
00982 
00983 #ifdef DEBUG
00984    printf("Building HOLD_REJECT Msg\n");
00985 #endif
00986    return msg;
00987 }

static msg_t* build_information ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1556 of file isdn_msg_parser.c.

References create_l3msg(), misdn_bchannel::display, enc_ie_called_pn(), enc_ie_display(), misdn_bchannel::info_dad, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.

01557 {
01558    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01559    INFORMATION_t *information;
01560    msg_t *msg =(msg_t*)create_l3msg(CC_INFORMATION | REQUEST, MT_INFORMATION,  bc?bc->l3_id:-1, sizeof(INFORMATION_t) ,nt);
01561 
01562    information=(INFORMATION_t*)((msg->data+HEADER_LEN));
01563 
01564    enc_ie_called_pn(&information->CALLED_PN, msg, 0, 1, bc->info_dad, nt,bc);
01565 
01566    {
01567       if (*bc->display) {
01568 #ifdef DEBUG
01569          printf("Sending %s as Display\n", bc->display);
01570 #endif
01571          enc_ie_display(&information->DISPLAY, msg, bc->display, nt,bc);
01572       }
01573    }
01574 
01575 #ifdef DEBUG
01576    printf("Building INFORMATION Msg\n");
01577 #endif
01578    return msg;
01579 }

static msg_t* build_notify ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1494 of file isdn_msg_parser.c.

References create_l3msg(), enc_ie_notify(), enc_ie_redir_dn(), misdn_bchannel::l3_id, mISDN_NOTIFY_CODE_INVALID, mISDNUSER_HEAD_SIZE, misdn_bchannel::notify_description_code, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, misdn_bchannel::outgoing_colp, misdn_party_id::presentation, misdn_bchannel::redirecting, misdn_party_redirecting::to, and misdn_party_redirecting::to_changed.

01495 {
01496    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01497    NOTIFY_t *notify;
01498    msg_t *msg =(msg_t*)create_l3msg(CC_NOTIFY | REQUEST, MT_NOTIFY,  bc?bc->l3_id:-1, sizeof(NOTIFY_t) ,nt);
01499 
01500 #ifdef DEBUG
01501    printf("Building NOTIFY Msg\n");
01502 #endif
01503 
01504    notify = (NOTIFY_t *) (msg->data + HEADER_LEN);
01505 
01506    enc_ie_notify(&notify->NOTIFY, msg, bc->notify_description_code, nt, bc);
01507    bc->notify_description_code = mISDN_NOTIFY_CODE_INVALID;
01508 
01509    if (bc->redirecting.to_changed) {
01510       bc->redirecting.to_changed = 0;
01511       switch (bc->outgoing_colp) {
01512       case 0:/* pass */
01513       case 1:/* restricted */
01514          enc_ie_redir_dn(&notify->REDIR_DN, msg, bc->redirecting.to.number_type,
01515             bc->redirecting.to.number_plan, bc->redirecting.to.presentation,
01516             bc->redirecting.to.number, nt, bc);
01517          break;
01518       default:
01519          break;
01520       }
01521    }
01522    return msg;
01523 }

static msg_t* build_proceeding ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 193 of file isdn_msg_parser.c.

References misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), enc_ie_facility(), enc_ie_progress(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.

00194 {
00195    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00196    CALL_PROCEEDING_t *proceeding;
00197    msg_t *msg =(msg_t*)create_l3msg(CC_PROCEEDING | REQUEST, MT_CALL_PROCEEDING,  bc?bc->l3_id:-1, sizeof(CALL_PROCEEDING_t) ,nt);
00198 
00199    proceeding=(CALL_PROCEEDING_t*)((msg->data+HEADER_LEN));
00200 
00201    enc_ie_channel_id(&proceeding->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
00202 
00203    if (nt)
00204       enc_ie_progress(&proceeding->PROGRESS, msg, 0, nt?1:5, 8, nt,bc);
00205 
00206    if (bc->fac_out.Function != Fac_None) {
00207       enc_ie_facility(&proceeding->FACILITY, msg, &bc->fac_out, nt);
00208    }
00209 
00210    /* enc_ie_redir_dn */
00211 
00212 #ifdef DEBUG
00213    printf("Building PROCEEDING Msg\n");
00214 #endif
00215    return msg;
00216 }

static msg_t* build_progress ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 278 of file isdn_msg_parser.c.

References create_l3msg(), enc_ie_facility(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.

00279 {
00280    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00281    PROGRESS_t *progress;
00282    msg_t *msg =(msg_t*)create_l3msg(CC_PROGRESS | REQUEST, MT_PROGRESS,  bc?bc->l3_id:-1, sizeof(PROGRESS_t) ,nt);
00283 
00284    progress=(PROGRESS_t*)((msg->data+HEADER_LEN));
00285 
00286    if (bc->fac_out.Function != Fac_None) {
00287       enc_ie_facility(&progress->FACILITY, msg, &bc->fac_out, nt);
00288    }
00289 
00290 #ifdef DEBUG
00291    printf("Building PROGRESS Msg\n");
00292 #endif
00293    return msg;
00294 }

static msg_t* build_release ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1160 of file isdn_msg_parser.c.

References cb_log, create_l3msg(), enc_ie_cause(), enc_ie_facility(), enc_ie_useruser(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_bchannel::out_cause, misdn_bchannel::port, misdn_bchannel::uu, and misdn_bchannel::uulen.

01161 {
01162    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01163    RELEASE_t *release;
01164    msg_t *msg =(msg_t*)create_l3msg(CC_RELEASE | REQUEST, MT_RELEASE,  bc?bc->l3_id:-1, sizeof(RELEASE_t) ,nt);
01165 
01166    release=(RELEASE_t*)((msg->data+HEADER_LEN));
01167 
01168    if (bc->out_cause>= 0)
01169       enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
01170 
01171    if (bc->fac_out.Function != Fac_None) {
01172       enc_ie_facility(&release->FACILITY, msg, &bc->fac_out, nt);
01173    }
01174 
01175    if (bc->uulen) {
01176       int  protocol=4;
01177       enc_ie_useruser(&release->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
01178       cb_log(1, bc->port, "ENCODING USERUSERINFO:%s\n", bc->uu);
01179    }
01180 
01181 #ifdef DEBUG
01182    printf("Building RELEASE Msg\n");
01183 #endif
01184    return msg;
01185 }

static msg_t* build_release_complete ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1223 of file isdn_msg_parser.c.

References cb_log, create_l3msg(), enc_ie_cause(), enc_ie_facility(), enc_ie_useruser(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_bchannel::out_cause, misdn_bchannel::port, misdn_bchannel::uu, and misdn_bchannel::uulen.

01224 {
01225    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01226    RELEASE_COMPLETE_t *release_complete;
01227    msg_t *msg =(msg_t*)create_l3msg(CC_RELEASE_COMPLETE | REQUEST, MT_RELEASE_COMPLETE,  bc?bc->l3_id:-1, sizeof(RELEASE_COMPLETE_t) ,nt);
01228 
01229    release_complete=(RELEASE_COMPLETE_t*)((msg->data+HEADER_LEN));
01230 
01231    enc_ie_cause(&release_complete->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc);
01232 
01233    if (bc->fac_out.Function != Fac_None) {
01234       enc_ie_facility(&release_complete->FACILITY, msg, &bc->fac_out, nt);
01235    }
01236 
01237    if (bc->uulen) {
01238       int  protocol=4;
01239       enc_ie_useruser(&release_complete->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
01240       cb_log(1, bc->port, "ENCODING USERUSERINFO:%s\n", bc->uu);
01241    }
01242 
01243 #ifdef DEBUG
01244    printf("Building RELEASE_COMPLETE Msg\n");
01245 #endif
01246    return msg;
01247 }

static msg_t* build_restart ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1118 of file isdn_msg_parser.c.

References cb_log, misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), enc_ie_restart_ind(), HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, and misdn_bchannel::port.

01119 {
01120    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01121    RESTART_t *restart;
01122    msg_t *msg =(msg_t*)create_l3msg(CC_RESTART | REQUEST, MT_RESTART,  bc?bc->l3_id:-1, sizeof(RESTART_t) ,nt);
01123 
01124    restart=(RESTART_t*)((msg->data+HEADER_LEN));
01125 
01126 #ifdef DEBUG
01127    printf("Building RESTART Msg\n");
01128 #endif
01129 
01130    if (bc->channel > 0) {
01131       enc_ie_channel_id(&restart->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
01132       enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x80, nt, bc);
01133    } else {
01134       enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x87, nt, bc);
01135    }
01136 
01137    cb_log(0,bc->port, "Restarting channel %d\n", bc->channel);
01138    return msg;
01139 }

static msg_t* build_resume ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 903 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00904 {
00905    msg_t *msg =(msg_t*)create_l3msg(CC_RESUME | REQUEST, MT_RESUME,  bc?bc->l3_id:-1, sizeof(RESUME_t) ,nt);
00906 
00907 #ifdef DEBUG
00908    printf("Building RESUME Msg\n");
00909 #endif
00910    return msg;
00911 }

static msg_t* build_resume_acknowledge ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 960 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00961 {
00962    msg_t *msg =(msg_t*)create_l3msg(CC_RESUME_ACKNOWLEDGE | REQUEST, MT_RESUME_ACKNOWLEDGE,  bc?bc->l3_id:-1, sizeof(RESUME_ACKNOWLEDGE_t) ,nt);
00963 
00964 #ifdef DEBUG
00965    printf("Building RESUME_ACKNOWLEDGE Msg\n");
00966 #endif
00967    return msg;
00968 }

static msg_t* build_resume_reject ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 846 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00847 {
00848    msg_t *msg =(msg_t*)create_l3msg(CC_RESUME_REJECT | REQUEST, MT_RESUME_REJECT,  bc?bc->l3_id:-1, sizeof(RESUME_REJECT_t) ,nt);
00849 
00850 #ifdef DEBUG
00851    printf("Building RESUME_REJECT Msg\n");
00852 #endif
00853    return msg;
00854 }

static msg_t* build_retrieve ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 998 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00999 {
01000    msg_t *msg =(msg_t*)create_l3msg(CC_RETRIEVE | REQUEST, MT_RETRIEVE,  bc?bc->l3_id:-1, sizeof(RETRIEVE_t) ,nt);
01001 
01002 #ifdef DEBUG
01003    printf("Building RETRIEVE Msg\n");
01004 #endif
01005    return msg;
01006 }

static msg_t* build_retrieve_acknowledge ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1017 of file isdn_msg_parser.c.

References misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.

01018 {
01019    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01020    RETRIEVE_ACKNOWLEDGE_t *retrieve_acknowledge;
01021    msg_t *msg =(msg_t*)create_l3msg(CC_RETRIEVE_ACKNOWLEDGE | REQUEST, MT_RETRIEVE_ACKNOWLEDGE,  bc?bc->l3_id:-1, sizeof(RETRIEVE_ACKNOWLEDGE_t) ,nt);
01022 
01023    retrieve_acknowledge=(RETRIEVE_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN));
01024 
01025    enc_ie_channel_id(&retrieve_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc);
01026 #ifdef DEBUG
01027    printf("Building RETRIEVE_ACKNOWLEDGE Msg\n");
01028 #endif
01029    return msg;
01030 }

static msg_t* build_retrieve_reject ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1041 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

01042 {
01043    msg_t *msg =(msg_t*)create_l3msg(CC_RETRIEVE_REJECT | REQUEST, MT_RETRIEVE_REJECT,  bc?bc->l3_id:-1, sizeof(RETRIEVE_REJECT_t) ,nt);
01044 
01045 #ifdef DEBUG
01046    printf("Building RETRIEVE_REJECT Msg\n");
01047 #endif
01048    return msg;
01049 }

static msg_t* build_setup ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 500 of file isdn_msg_parser.c.

References ANY_CHANNEL, build_display_str(), misdn_bchannel::caller, misdn_bchannel::capability, cb_log, misdn_bchannel::channel, create_l3msg(), misdn_bchannel::dialed, misdn_bchannel::display, misdn_bchannel::display_setup, enc_ie_bearer(), enc_ie_called_pn(), enc_ie_calling_pn(), enc_ie_channel_id(), enc_ie_complete(), enc_ie_display(), enc_ie_facility(), enc_ie_keypad(), enc_ie_redir_nr(), enc_ie_useruser(), misdn_bchannel::fac_out, misdn_party_redirecting::from, HEADER_LEN, INFO_CAPABILITY_DIGITAL_RESTRICTED, INFO_CAPABILITY_DIGITAL_UNRESTRICTED, INFO_CAPABILITY_SPEECH, INFO_CODEC_ALAW, INFO_CODEC_ULAW, misdn_bchannel::keypad, misdn_bchannel::l3_id, misdn_bchannel::law, misdn_lib_is_ptp(), mISDNUSER_HEAD_SIZE, misdn_bchannel::mode, misdn_party_id::name, misdn_party_dialing::number, misdn_party_id::number, misdn_party_dialing::number_plan, misdn_party_id::number_plan, misdn_party_dialing::number_type, misdn_party_id::number_type, misdn_bchannel::outgoing_colp, misdn_bchannel::port, misdn_party_id::presentation, misdn_bchannel::rate, misdn_party_redirecting::reason, misdn_bchannel::redirecting, misdn_party_id::screening, misdn_bchannel::sending_complete, misdn_bchannel::uu, and misdn_bchannel::uulen.

00501 {
00502    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00503    SETUP_t *setup;
00504    msg_t *msg =(msg_t*)create_l3msg(CC_SETUP | REQUEST, MT_SETUP,  bc?bc->l3_id:-1, sizeof(SETUP_t) ,nt);
00505    int is_ptp;
00506    enum FacFunction fac_type;
00507 
00508    setup=(SETUP_t*)((msg->data+HEADER_LEN));
00509 
00510    if (bc->channel == 0 || bc->channel == ANY_CHANNEL || bc->channel==-1)
00511       enc_ie_channel_id(&setup->CHANNEL_ID, msg, 0, bc->channel, nt,bc);
00512    else
00513       enc_ie_channel_id(&setup->CHANNEL_ID, msg, 1, bc->channel, nt,bc);
00514 
00515    fac_type = bc->fac_out.Function;
00516    if (fac_type != Fac_None) {
00517       enc_ie_facility(&setup->FACILITY, msg, &bc->fac_out, nt);
00518    }
00519 
00520    enc_ie_calling_pn(&setup->CALLING_PN, msg, bc->caller.number_type, bc->caller.number_plan,
00521       bc->caller.presentation, bc->caller.screening, bc->caller.number, nt, bc);
00522 
00523    if (bc->dialed.number[0]) {
00524       enc_ie_called_pn(&setup->CALLED_PN, msg, bc->dialed.number_type, bc->dialed.number_plan, bc->dialed.number, nt, bc);
00525    }
00526 
00527    switch (bc->outgoing_colp) {
00528    case 0:/* pass */
00529    case 1:/* restricted */
00530       is_ptp = misdn_lib_is_ptp(bc->port);
00531       if (bc->redirecting.from.number[0]
00532          && ((!is_ptp && nt)
00533             || (is_ptp
00534 #if defined(AST_MISDN_ENHANCEMENTS)
00535                /*
00536                 * There is no need to send out this ie when we are also sending
00537                 * a Fac_DivertingLegInformation2 as well.  The
00538                 * Fac_DivertingLegInformation2 supercedes the information in
00539                 * this ie.
00540                 */
00541                && fac_type != Fac_DivertingLegInformation2
00542 #endif   /* defined(AST_MISDN_ENHANCEMENTS) */
00543          ))) {
00544 #if 1
00545          /* ETSI and Q.952 do not define the screening field */
00546          enc_ie_redir_nr(&setup->REDIR_NR, msg, bc->redirecting.from.number_type,
00547             bc->redirecting.from.number_plan, bc->redirecting.from.presentation, 0,
00548             bc->redirecting.reason, bc->redirecting.from.number, nt, bc);
00549 #else
00550          /* Q.931 defines the screening field */
00551          enc_ie_redir_nr(&setup->REDIR_NR, msg, bc->redirecting.from.number_type,
00552             bc->redirecting.from.number_plan, bc->redirecting.from.presentation,
00553             bc->redirecting.from.screening, bc->redirecting.reason,
00554             bc->redirecting.from.number, nt, bc);
00555 #endif
00556       }
00557       break;
00558    default:
00559       break;
00560    }
00561 
00562    if (bc->keypad[0]) {
00563       enc_ie_keypad(&setup->KEYPAD, msg, bc->keypad, nt,bc);
00564    }
00565 
00566 
00567 
00568    if (*bc->display) {
00569       enc_ie_display(&setup->DISPLAY, msg, bc->display, nt, bc);
00570    } else if (nt && bc->caller.presentation == 0) {
00571       char display[sizeof(bc->display)];
00572 
00573       /* Presentation is allowed */
00574       build_display_str(display, sizeof(display), bc->display_setup, bc->caller.name, bc->caller.number);
00575       if (display[0]) {
00576          enc_ie_display(&setup->DISPLAY, msg, display, nt, bc);
00577       }
00578    }
00579 
00580    {
00581       int coding = 0;
00582       int capability;
00583       int mode = 0;  /* 2 for packet! */
00584       int user;
00585       int rate = 0x10;
00586 
00587       switch (bc->law) {
00588       case INFO_CODEC_ULAW: user=2;
00589          break;
00590       case INFO_CODEC_ALAW: user=3;
00591          break;
00592       default:
00593          user=3;
00594       }
00595 
00596       switch (bc->capability) {
00597       case INFO_CAPABILITY_SPEECH: capability = 0;
00598          break;
00599       case INFO_CAPABILITY_DIGITAL_UNRESTRICTED: capability = 8;
00600          user=-1;
00601          mode=bc->mode;
00602          rate=bc->rate;
00603          break;
00604       case INFO_CAPABILITY_DIGITAL_RESTRICTED: capability = 9;
00605          user=-1;
00606          break;
00607       default:
00608          capability=bc->capability;
00609       }
00610 
00611       enc_ie_bearer(&setup->BEARER, msg, coding, capability, mode, rate, -1, user, nt,bc);
00612    }
00613 
00614    if (bc->sending_complete) {
00615       enc_ie_complete(&setup->COMPLETE,msg, bc->sending_complete, nt, bc);
00616    }
00617 
00618    if (bc->uulen) {
00619       int  protocol=4;
00620       enc_ie_useruser(&setup->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc);
00621       cb_log(1, bc->port, "ENCODING USERUSERINFO:%s\n", bc->uu);
00622    }
00623 
00624 #if defined(AST_MISDN_ENHANCEMENTS)
00625    extract_setup_Bc_Hlc_Llc(setup, nt, bc);
00626 #endif   /* defined(AST_MISDN_ENHANCEMENTS) */
00627 
00628 #ifdef DEBUG
00629    printf("Building SETUP Msg\n");
00630 #endif
00631    return msg;
00632 }

static msg_t* build_setup_acknowledge ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 751 of file isdn_msg_parser.c.

References misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), enc_ie_facility(), enc_ie_progress(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.

00752 {
00753    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00754    SETUP_ACKNOWLEDGE_t *setup_acknowledge;
00755    msg_t *msg =(msg_t*)create_l3msg(CC_SETUP_ACKNOWLEDGE | REQUEST, MT_SETUP_ACKNOWLEDGE,  bc?bc->l3_id:-1, sizeof(SETUP_ACKNOWLEDGE_t) ,nt);
00756 
00757    setup_acknowledge=(SETUP_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN));
00758 
00759    enc_ie_channel_id(&setup_acknowledge->CHANNEL_ID, msg, 1,bc->channel, nt,bc);
00760 
00761    if (nt)
00762       enc_ie_progress(&setup_acknowledge->PROGRESS, msg, 0, nt?1:5, 8, nt,bc);
00763 
00764    if (bc->fac_out.Function != Fac_None) {
00765       enc_ie_facility(&setup_acknowledge->FACILITY, msg, &bc->fac_out, nt);
00766    }
00767 
00768 #ifdef DEBUG
00769    printf("Building SETUP_ACKNOWLEDGE Msg\n");
00770 #endif
00771    return msg;
00772 }

static msg_t* build_status ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1596 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

01597 {
01598    msg_t *msg =(msg_t*)create_l3msg(CC_STATUS | REQUEST, MT_STATUS,  bc?bc->l3_id:-1, sizeof(STATUS_t) ,nt);
01599 
01600 #ifdef DEBUG
01601    printf("Building STATUS Msg\n");
01602 #endif
01603    return msg;
01604 }

static msg_t* build_status_enquiry ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1532 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

01533 {
01534    msg_t *msg =(msg_t*)create_l3msg(CC_STATUS_ENQUIRY | REQUEST, MT_STATUS_ENQUIRY,  bc?bc->l3_id:-1, sizeof(STATUS_ENQUIRY_t) ,nt);
01535 
01536 #ifdef DEBUG
01537    printf("Building STATUS_ENQUIRY Msg\n");
01538 #endif
01539    return msg;
01540 }

static msg_t* build_suspend ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 884 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00885 {
00886    msg_t *msg =(msg_t*)create_l3msg(CC_SUSPEND | REQUEST, MT_SUSPEND,  bc?bc->l3_id:-1, sizeof(SUSPEND_t) ,nt);
00887 
00888 #ifdef DEBUG
00889    printf("Building SUSPEND Msg\n");
00890 #endif
00891    return msg;
00892 }

static msg_t* build_suspend_acknowledge ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 941 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00942 {
00943    msg_t *msg =(msg_t*)create_l3msg(CC_SUSPEND_ACKNOWLEDGE | REQUEST, MT_SUSPEND_ACKNOWLEDGE,  bc?bc->l3_id:-1, sizeof(SUSPEND_ACKNOWLEDGE_t) ,nt);
00944 
00945 #ifdef DEBUG
00946    printf("Building SUSPEND_ACKNOWLEDGE Msg\n");
00947 #endif
00948    return msg;
00949 }

static msg_t* build_suspend_reject ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 827 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00828 {
00829    msg_t *msg =(msg_t*)create_l3msg(CC_SUSPEND_REJECT | REQUEST, MT_SUSPEND_REJECT,  bc?bc->l3_id:-1, sizeof(SUSPEND_REJECT_t) ,nt);
00830 
00831 #ifdef DEBUG
00832    printf("Building SUSPEND_REJECT Msg\n");
00833 #endif
00834    return msg;
00835 }

static msg_t* build_timeout ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1613 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

01614 {
01615    msg_t *msg =(msg_t*)create_l3msg(CC_STATUS | REQUEST, MT_STATUS,  bc?bc->l3_id:-1, sizeof(STATUS_t) ,nt);
01616 
01617 #ifdef DEBUG
01618    printf("Building STATUS Msg\n");
01619 #endif
01620    return msg;
01621 }

static msg_t* build_user_information ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 808 of file isdn_msg_parser.c.

References create_l3msg(), and misdn_bchannel::l3_id.

00809 {
00810    msg_t *msg =(msg_t*)create_l3msg(CC_USER_INFORMATION | REQUEST, MT_USER_INFORMATION,  bc?bc->l3_id:-1, sizeof(USER_INFORMATION_t) ,nt);
00811 
00812 #ifdef DEBUG
00813    printf("Building USER_INFORMATION Msg\n");
00814 #endif
00815    return msg;
00816 }

static void dec_ie_facility ( unsigned char *  p,
Q931_info_t *  qi,
struct FacParm *  fac,
int  nt,
struct misdn_bchannel bc 
) [static]

Definition at line 120 of file isdn_msg_parser.c.

References cb_log, and misdn_bchannel::port.

Referenced by parse_alerting(), parse_connect(), parse_disconnect(), parse_proceeding(), parse_progress(), parse_release(), parse_release_complete(), parse_setup(), and parse_setup_acknowledge().

00121 {
00122    fac->Function = Fac_None;
00123 
00124    if (!nt) {
00125       p = NULL;
00126       if (qi->QI_ELEMENT(facility)) {
00127          p = (unsigned char *) qi + sizeof(Q931_info_t) + qi->QI_ELEMENT(facility) + 1;
00128       }
00129    }
00130    if (!p) {
00131       return;
00132    }
00133 
00134    if (decodeFac(p, fac)) {
00135       cb_log(3, bc->port, "Decoding facility ie failed! Unrecognized facility message?\n");
00136    }
00137 }

static void enc_ie_facility ( unsigned char **  ntmode,
msg_t *  msg,
struct FacParm *  fac,
int  nt 
) [static]

Definition at line 77 of file isdn_msg_parser.c.

References len().

Referenced by build_alerting(), build_connect(), build_disconnect(), build_proceeding(), build_progress(), build_release(), build_release_complete(), build_setup(), and build_setup_acknowledge().

00078 {
00079    int len;
00080    Q931_info_t *qi;
00081    unsigned char *p;
00082    unsigned char buf[256];
00083 
00084    len = encodeFac(buf, fac);
00085    if (len <= 0) {
00086       /*
00087        * mISDN does not know how to build the requested facility structure
00088        * Clear facility information
00089        */
00090       fac->Function = Fac_None;
00091       return;
00092    }
00093 
00094    p = msg_put(msg, len);
00095    if (nt) {
00096       *ntmode = p + 1;
00097    } else {
00098       qi = (Q931_info_t *) (msg->data + mISDN_HEADER_LEN);
00099       qi->QI_ELEMENT(facility) = p - (unsigned char *) qi - sizeof(Q931_info_t);
00100    }
00101 
00102    memcpy(p, buf, len);
00103 
00104    /* Clear facility information */
00105    fac->Function = Fac_None;
00106 }

char* isdn_get_info ( struct isdn_msg  msgs[],
enum event_e  event,
int  nt 
)

Definition at line 1732 of file isdn_msg_parser.c.

References EVENT_BCHAN_ACTIVATED, EVENT_BCHAN_DATA, EVENT_BCHAN_ERROR, EVENT_CLEANUP, EVENT_DTMF_TONE, EVENT_NEW_BC, EVENT_NEW_CHANNEL, EVENT_NEW_L3ID, EVENT_PORT_ALARM, EVENT_TONE_GENERATE, isdn_msg::info, and isdn_msg_get_index_by_event().

Referenced by handle_event_nt(), handle_frm_te(), handle_l1(), manager_isdn_get_info(), and misdn_lib_send_event().

01733 {
01734    int i=isdn_msg_get_index_by_event(msgs, event, nt);
01735 
01736    if(i>=0) return msgs[i].info;
01737 
01738    if (event == EVENT_CLEANUP) return EVENT_CLEAN_INFO;
01739    if (event == EVENT_DTMF_TONE) return EVENT_DTMF_TONE_INFO;
01740    if (event == EVENT_NEW_L3ID) return EVENT_NEW_L3ID_INFO;
01741    if (event == EVENT_NEW_BC) return EVENT_NEW_BC_INFO;
01742    if (event == EVENT_NEW_CHANNEL) return EVENT_NEW_CHANNEL_INFO;
01743    if (event == EVENT_BCHAN_DATA) return EVENT_BCHAN_DATA_INFO;
01744    if (event == EVENT_BCHAN_ACTIVATED) return EVENT_BCHAN_ACTIVATED_INFO;
01745    if (event == EVENT_TONE_GENERATE) return EVENT_TONE_GENERATE_INFO;
01746    if (event == EVENT_PORT_ALARM) return EVENT_PORT_ALARM_INFO;
01747    if (event == EVENT_BCHAN_ERROR) return EVENT_BCHAN_ERROR_INFO;
01748 
01749    return NULL;
01750 }

msg_t* isdn_msg_build_event ( struct isdn_msg  msgs[],
struct misdn_bchannel bc,
enum event_e  event,
int  nt 
)

Definition at line 1761 of file isdn_msg_parser.c.

References isdn_msg_get_index_by_event(), and isdn_msg::msg_builder.

Referenced by misdn_lib_send_event().

01762 {
01763    int i=isdn_msg_get_index_by_event(msgs, event, nt);
01764    if(i<0) return NULL;
01765 
01766    return  msgs[i].msg_builder(msgs, bc, nt);
01767 }

enum event_e isdn_msg_get_event ( struct isdn_msg  msgs[],
msg_t *  msg,
int  nt 
)

Definition at line 1706 of file isdn_msg_parser.c.

References isdn_msg::event, EVENT_UNKNOWN, and isdn_msg_get_index().

Referenced by handle_event_nt(), and handle_frm_te().

01707 {
01708    int i=isdn_msg_get_index(msgs, msg, nt);
01709    if(i>=0) return msgs[i].event;
01710    return EVENT_UNKNOWN;
01711 }

int isdn_msg_get_index ( struct isdn_msg  msgs[],
msg_t *  msg,
int  nt 
)

INTERFACE FCTS

Definition at line 1674 of file isdn_msg_parser.c.

References isdn_msg::misdn_msg, and msgs_max.

Referenced by isdn_msg_get_event(), isdn_msg_get_info(), and isdn_msg_parse_event().

01675 {
01676    int i;
01677 
01678    if (nt){
01679       mISDNuser_head_t *hh = (mISDNuser_head_t*)msg->data;
01680 
01681       for (i=0; i< msgs_max -1; i++) {
01682          if ( (hh->prim&COMMAND_MASK)==(msgs[i].misdn_msg&COMMAND_MASK)) return i;
01683       }
01684 
01685    } else {
01686       iframe_t *frm = (iframe_t*)msg->data;
01687 
01688       for (i=0; i< msgs_max -1; i++)
01689          if ( (frm->prim&COMMAND_MASK)==(msgs[i].misdn_msg&COMMAND_MASK)) return i;
01690    }
01691 
01692    return -1;
01693 }

int isdn_msg_get_index_by_event ( struct isdn_msg  msgs[],
enum event_e  event,
int  nt 
)

Definition at line 1695 of file isdn_msg_parser.c.

References cb_log, and msgs_max.

Referenced by isdn_get_info(), and isdn_msg_build_event().

01696 {
01697    int i;
01698    for (i=0; i< msgs_max; i++)
01699       if ( event == msgs[i].event) return i;
01700 
01701    cb_log(10,0, "get_index: event not found!\n");
01702 
01703    return -1;
01704 }

char* isdn_msg_get_info ( struct isdn_msg  msgs[],
msg_t *  msg,
int  nt 
)

Definition at line 1713 of file isdn_msg_parser.c.

References isdn_msg::info, and isdn_msg_get_index().

01714 {
01715    int i=isdn_msg_get_index(msgs, msg, nt);
01716    if(i>=0) return msgs[i].info;
01717    return NULL;
01718 }

int isdn_msg_parse_event ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
)

Definition at line 1752 of file isdn_msg_parser.c.

References isdn_msg_get_index(), and isdn_msg::msg_parser.

Referenced by handle_event_nt(), and handle_frm_te().

01753 {
01754    int i=isdn_msg_get_index(msgs, msg, nt);
01755    if(i<0) return -1;
01756 
01757    msgs[i].msg_parser(msgs, msg, bc, nt);
01758    return 0;
01759 }

static void parse_alerting ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 218 of file isdn_msg_parser.c.

References dec_ie_facility(), dec_ie_progress(), misdn_bchannel::fac_in, HEADER_LEN, mISDNUSER_HEAD_SIZE, misdn_bchannel::progress_coding, misdn_bchannel::progress_indicator, and misdn_bchannel::progress_location.

00219 {
00220    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00221    ALERTING_t *alerting = (ALERTING_t *) (msg->data + HEADER_LEN);
00222    //Q931_info_t *qi=(Q931_info_t*)(msg->data+HEADER_LEN);
00223 
00224    dec_ie_facility(alerting->FACILITY, (Q931_info_t *) alerting, &bc->fac_in, nt, bc);
00225 
00226    /* dec_ie_redir_dn */
00227 
00228    dec_ie_progress(alerting->PROGRESS, (Q931_info_t *)alerting, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
00229 
00230 #ifdef DEBUG
00231    printf("Parsing ALERTING Msg\n");
00232 #endif
00233 
00234 
00235 }

static void parse_connect ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 634 of file isdn_msg_parser.c.

References misdn_bchannel::ces, misdn_bchannel::connected, dec_ie_connected_pn(), dec_ie_facility(), dec_ie_progress(), misdn_bchannel::fac_in, HEADER_LEN, mISDNUSER_HEAD_SIZE, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, misdn_party_id::presentation, misdn_bchannel::progress_coding, misdn_bchannel::progress_indicator, misdn_bchannel::progress_location, misdn_party_id::screening, and type.

00635 {
00636    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00637    CONNECT_t *connect = (CONNECT_t *) (msg->data + HEADER_LEN);
00638    int type;
00639    int plan;
00640    int pres;
00641    int screen;
00642 
00643    bc->ces = connect->ces;
00644 
00645    dec_ie_progress(connect->PROGRESS, (Q931_info_t *)connect, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
00646 
00647    dec_ie_connected_pn(connect->CONNECT_PN, (Q931_info_t *) connect, &type, &plan,
00648       &pres, &screen, bc->connected.number, sizeof(bc->connected.number), nt, bc);
00649    bc->connected.number_type = type;
00650    bc->connected.number_plan = plan;
00651    switch (pres) {
00652    default:
00653    case 0:
00654       bc->connected.presentation = 0;  /* presentation allowed */
00655       break;
00656    case 1:
00657       bc->connected.presentation = 1;  /* presentation restricted */
00658       break;
00659    case 2:
00660       bc->connected.presentation = 2;  /* Number not available */
00661       break;
00662    }
00663    if (0 <= screen) {
00664       bc->connected.screening = screen;
00665    } else {
00666       bc->connected.screening = 0;  /* Unscreened */
00667    }
00668 
00669    dec_ie_facility(connect->FACILITY, (Q931_info_t *) connect, &bc->fac_in, nt, bc);
00670 
00671    /*
00672       cb_log(1,bc->port,"CONNETED PN: %s cpn_dialplan:%d\n", connected_pn, type);
00673    */
00674 
00675 #ifdef DEBUG
00676    printf("Parsing CONNECT Msg\n");
00677 #endif
00678 }

static void parse_connect_acknowledge ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 774 of file isdn_msg_parser.c.

00775 {
00776 #ifdef DEBUG
00777    printf("Parsing CONNECT_ACKNOWLEDGE Msg\n");
00778 #endif
00779 
00780 
00781 }

static void parse_disconnect ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1051 of file isdn_msg_parser.c.

References misdn_bchannel::cause, cause, dec_ie_cause(), dec_ie_facility(), dec_ie_progress(), misdn_bchannel::fac_in, HEADER_LEN, mISDNUSER_HEAD_SIZE, misdn_bchannel::progress_coding, misdn_bchannel::progress_indicator, and misdn_bchannel::progress_location.

01052 {
01053    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01054    DISCONNECT_t *disconnect = (DISCONNECT_t *) (msg->data + HEADER_LEN);
01055    int location;
01056    int cause;
01057    dec_ie_cause(disconnect->CAUSE, (Q931_info_t *)(disconnect), &location, &cause, nt,bc);
01058    if (cause>0) bc->cause=cause;
01059 
01060    dec_ie_facility(disconnect->FACILITY, (Q931_info_t *) disconnect, &bc->fac_in, nt, bc);
01061 
01062    dec_ie_progress(disconnect->PROGRESS, (Q931_info_t *)disconnect, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
01063 #ifdef DEBUG
01064    printf("Parsing DISCONNECT Msg\n");
01065 #endif
01066 
01067 
01068 }

static void parse_facility ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1249 of file isdn_msg_parser.c.

References cb_log, dec_ie_notify(), dec_ie_redir_dn(), misdn_bchannel::fac_in, HEADER_LEN, mISDN_NOTIFY_CODE_INVALID, mISDNUSER_HEAD_SIZE, misdn_bchannel::notify_description_code, misdn_bchannel::nt, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, misdn_bchannel::port, misdn_party_id::presentation, misdn_bchannel::redirecting, misdn_party_id::screening, misdn_party_redirecting::to, misdn_party_redirecting::to_changed, and type.

01250 {
01251    int HEADER_LEN = nt ? mISDNUSER_HEAD_SIZE : mISDN_HEADER_LEN;
01252    FACILITY_t *facility = (FACILITY_t*)(msg->data+HEADER_LEN);
01253    Q931_info_t *qi = (Q931_info_t*)(msg->data+HEADER_LEN);
01254    unsigned char *p = NULL;
01255 #if defined(AST_MISDN_ENHANCEMENTS)
01256    int description_code;
01257    int type;
01258    int plan;
01259    int present;
01260    char number[sizeof(bc->redirecting.to.number)];
01261 #endif   /* defined(AST_MISDN_ENHANCEMENTS) */
01262 
01263 #ifdef DEBUG
01264    printf("Parsing FACILITY Msg\n");
01265 #endif
01266 
01267    bc->fac_in.Function = Fac_None;
01268 
01269    if (!bc->nt) {
01270       if (qi->QI_ELEMENT(facility))
01271          p = (unsigned char *)qi + sizeof(Q931_info_t) + qi->QI_ELEMENT(facility) + 1;
01272    } else {
01273       p = facility->FACILITY;
01274    }
01275    if (!p)
01276       return;
01277 
01278    if (decodeFac(p, &bc->fac_in)) {
01279       cb_log(3, bc->port, "Decoding facility ie failed! Unrecognized facility message?\n");
01280    }
01281 
01282 #if defined(AST_MISDN_ENHANCEMENTS)
01283    dec_ie_notify(facility->NOTIFY, qi, &description_code, nt, bc);
01284    if (description_code < 0) {
01285       bc->notify_description_code = mISDN_NOTIFY_CODE_INVALID;
01286    } else {
01287       bc->notify_description_code = description_code;
01288    }
01289 
01290    dec_ie_redir_dn(facility->REDIR_DN, qi, &type, &plan, &present, number, sizeof(number), nt, bc);
01291    if (0 <= type) {
01292       bc->redirecting.to_changed = 1;
01293 
01294       bc->redirecting.to.number_type = type;
01295       bc->redirecting.to.number_plan = plan;
01296       switch (present) {
01297       default:
01298       case 0:
01299          bc->redirecting.to.presentation = 0;   /* presentation allowed */
01300          break;
01301       case 1:
01302          bc->redirecting.to.presentation = 1;   /* presentation restricted */
01303          break;
01304       case 2:
01305          bc->redirecting.to.presentation = 2;   /* Number not available */
01306          break;
01307       }
01308       bc->redirecting.to.screening = 0;   /* Unscreened */
01309       strcpy(bc->redirecting.to.number, number);
01310    }
01311 #endif   /* defined(AST_MISDN_ENHANCEMENTS) */
01312 }

static void parse_hold ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 856 of file isdn_msg_parser.c.

00857 {
00858 #ifdef DEBUG
00859    printf("Parsing HOLD Msg\n");
00860 #endif
00861 
00862 
00863 }

static void parse_hold_acknowledge ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 913 of file isdn_msg_parser.c.

00914 {
00915 #ifdef DEBUG
00916    printf("Parsing HOLD_ACKNOWLEDGE Msg\n");
00917 #endif
00918 
00919 
00920 }

static void parse_hold_reject ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 970 of file isdn_msg_parser.c.

00971 {
00972 #ifdef DEBUG
00973    printf("Parsing HOLD_REJECT Msg\n");
00974 #endif
00975 
00976 
00977 }

static void parse_information ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1542 of file isdn_msg_parser.c.

References dec_ie_called_pn(), dec_ie_keypad(), misdn_bchannel::info_dad, misdn_bchannel::keypad, mISDNUSER_HEAD_SIZE, and type.

01543 {
01544    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01545    INFORMATION_t *information = (INFORMATION_t *) (msg->data + HEADER_LEN);
01546    int type, plan;
01547 
01548    dec_ie_called_pn(information->CALLED_PN, (Q931_info_t *) information, &type, &plan, bc->info_dad, sizeof(bc->info_dad), nt, bc);
01549    dec_ie_keypad(information->KEYPAD, (Q931_info_t *) information, bc->keypad, sizeof(bc->keypad), nt, bc);
01550 
01551 #ifdef DEBUG
01552    printf("Parsing INFORMATION Msg\n");
01553 #endif
01554 }

static void parse_notify ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1450 of file isdn_msg_parser.c.

References dec_ie_notify(), dec_ie_redir_dn(), mISDN_NOTIFY_CODE_INVALID, mISDNUSER_HEAD_SIZE, misdn_bchannel::notify_description_code, misdn_party_id::number, misdn_party_id::number_plan, misdn_party_id::number_type, misdn_party_id::presentation, misdn_bchannel::redirecting, misdn_party_id::screening, misdn_party_redirecting::to, misdn_party_redirecting::to_changed, and type.

01451 {
01452    int HEADER_LEN = nt ? mISDNUSER_HEAD_SIZE : mISDN_HEADER_LEN;
01453    NOTIFY_t *notify = (NOTIFY_t *) (msg->data + HEADER_LEN);
01454    int description_code;
01455    int type;
01456    int plan;
01457    int present;
01458    char number[sizeof(bc->redirecting.to.number)];
01459 
01460 #ifdef DEBUG
01461    printf("Parsing NOTIFY Msg\n");
01462 #endif
01463 
01464    dec_ie_notify(notify->NOTIFY, (Q931_info_t *) notify, &description_code, nt, bc);
01465    if (description_code < 0) {
01466       bc->notify_description_code = mISDN_NOTIFY_CODE_INVALID;
01467    } else {
01468       bc->notify_description_code = description_code;
01469    }
01470 
01471    dec_ie_redir_dn(notify->REDIR_DN, (Q931_info_t *) notify, &type, &plan, &present, number, sizeof(number), nt, bc);
01472    if (0 <= type) {
01473       bc->redirecting.to_changed = 1;
01474 
01475       bc->redirecting.to.number_type = type;
01476       bc->redirecting.to.number_plan = plan;
01477       switch (present) {
01478       default:
01479       case 0:
01480          bc->redirecting.to.presentation = 0;   /* presentation allowed */
01481          break;
01482       case 1:
01483          bc->redirecting.to.presentation = 1;   /* presentation restricted */
01484          break;
01485       case 2:
01486          bc->redirecting.to.presentation = 2;   /* Number not available */
01487          break;
01488       }
01489       bc->redirecting.to.screening = 0;   /* Unscreened */
01490       strcpy(bc->redirecting.to.number, number);
01491    }
01492 }

static void parse_proceeding ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 169 of file isdn_msg_parser.c.

References dec_ie_channel_id(), dec_ie_facility(), dec_ie_progress(), misdn_bchannel::fac_in, HEADER_LEN, mISDNUSER_HEAD_SIZE, misdn_bchannel::progress_coding, misdn_bchannel::progress_indicator, misdn_bchannel::progress_location, and set_channel().

00170 {
00171    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00172    CALL_PROCEEDING_t *proceeding = (CALL_PROCEEDING_t *) (msg->data + HEADER_LEN);
00173    //struct misdn_stack *stack=get_stack_by_bc(bc);
00174 
00175    {
00176       int  exclusive, channel;
00177       dec_ie_channel_id(proceeding->CHANNEL_ID, (Q931_info_t *)proceeding, &exclusive, &channel, nt,bc);
00178 
00179       set_channel(bc,channel);
00180 
00181    }
00182 
00183    dec_ie_progress(proceeding->PROGRESS, (Q931_info_t *)proceeding, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
00184 
00185    dec_ie_facility(proceeding->FACILITY, (Q931_info_t *) proceeding, &bc->fac_in, nt, bc);
00186 
00187    /* dec_ie_redir_dn */
00188 
00189 #ifdef DEBUG
00190    printf("Parsing PROCEEDING Msg\n");
00191 #endif
00192 }

static void parse_progress ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 263 of file isdn_msg_parser.c.

References dec_ie_facility(), dec_ie_progress(), misdn_bchannel::fac_in, HEADER_LEN, mISDNUSER_HEAD_SIZE, misdn_bchannel::progress_coding, misdn_bchannel::progress_indicator, and misdn_bchannel::progress_location.

00264 {
00265    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00266    PROGRESS_t *progress = (PROGRESS_t *) (msg->data + HEADER_LEN);
00267    //Q931_info_t *qi=(Q931_info_t*)(msg->data+HEADER_LEN);
00268 
00269    dec_ie_progress(progress->PROGRESS, (Q931_info_t *)progress, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
00270 
00271    dec_ie_facility(progress->FACILITY, (Q931_info_t *) progress, &bc->fac_in, nt, bc);
00272 
00273 #ifdef DEBUG
00274    printf("Parsing PROGRESS Msg\n");
00275 #endif
00276 }

static void parse_release ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1141 of file isdn_msg_parser.c.

References misdn_bchannel::cause, cause, dec_ie_cause(), dec_ie_facility(), misdn_bchannel::fac_in, HEADER_LEN, and mISDNUSER_HEAD_SIZE.

01142 {
01143    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01144    RELEASE_t *release = (RELEASE_t *) (msg->data + HEADER_LEN);
01145    int location;
01146    int cause;
01147 
01148    dec_ie_cause(release->CAUSE, (Q931_info_t *)(release), &location, &cause, nt,bc);
01149    if (cause>0) bc->cause=cause;
01150 
01151    dec_ie_facility(release->FACILITY, (Q931_info_t *) release, &bc->fac_in, nt, bc);
01152 
01153 #ifdef DEBUG
01154    printf("Parsing RELEASE Msg\n");
01155 #endif
01156 
01157 
01158 }

static void parse_release_complete ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1187 of file isdn_msg_parser.c.

References misdn_bchannel::cause, cause, cb_log, dec_ie_cause(), dec_ie_facility(), misdn_bchannel::fac_in, get_stack_by_bc(), HEADER_LEN, and mISDNUSER_HEAD_SIZE.

01188 {
01189    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01190    RELEASE_COMPLETE_t *release_complete = (RELEASE_COMPLETE_t *) (msg->data + HEADER_LEN);
01191    int location;
01192    int cause;
01193    iframe_t *frm = (iframe_t*) msg->data;
01194 
01195    struct misdn_stack *stack=get_stack_by_bc(bc);
01196    mISDNuser_head_t *hh;
01197    hh=(mISDNuser_head_t*)msg->data;
01198 
01199    /*hh=(mISDN_head_t*)msg->data;
01200    mISDN_head_t *hh;*/
01201 
01202    if (nt) {
01203       if (hh->prim == (CC_RELEASE_COMPLETE|CONFIRM)) {
01204          cb_log(0, stack->port, "CC_RELEASE_COMPLETE|CONFIRM [NT] \n");
01205          return;
01206       }
01207    } else {
01208       if (frm->prim == (CC_RELEASE_COMPLETE|CONFIRM)) {
01209          cb_log(0, stack->port, "CC_RELEASE_COMPLETE|CONFIRM [TE] \n");
01210          return;
01211       }
01212    }
01213    dec_ie_cause(release_complete->CAUSE, (Q931_info_t *)(release_complete), &location, &cause, nt,bc);
01214    if (cause>0) bc->cause=cause;
01215 
01216    dec_ie_facility(release_complete->FACILITY, (Q931_info_t *) release_complete, &bc->fac_in, nt, bc);
01217 
01218 #ifdef DEBUG
01219    printf("Parsing RELEASE_COMPLETE Msg\n");
01220 #endif
01221 }

static void parse_restart ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1099 of file isdn_msg_parser.c.

References cb_log, dec_ie_channel_id(), get_stack_by_bc(), HEADER_LEN, mISDNUSER_HEAD_SIZE, misdn_stack::port, and misdn_bchannel::restart_channel.

01100 {
01101    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01102    RESTART_t *restart = (RESTART_t *) (msg->data + HEADER_LEN);
01103 
01104    struct misdn_stack *stack=get_stack_by_bc(bc);
01105 
01106 #ifdef DEBUG
01107    printf("Parsing RESTART Msg\n");
01108 #endif
01109 
01110    {
01111       int  exclusive;
01112       dec_ie_channel_id(restart->CHANNEL_ID, (Q931_info_t *)restart, &exclusive, &bc->restart_channel, nt,bc);
01113       cb_log(3, stack->port, "CC_RESTART Request on channel:%d on this port.\n", bc->restart_channel);
01114    }
01115 
01116 }

static void parse_resume ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 894 of file isdn_msg_parser.c.

00895 {
00896 #ifdef DEBUG
00897    printf("Parsing RESUME Msg\n");
00898 #endif
00899 
00900 
00901 }

static void parse_resume_acknowledge ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 951 of file isdn_msg_parser.c.

00952 {
00953 #ifdef DEBUG
00954    printf("Parsing RESUME_ACKNOWLEDGE Msg\n");
00955 #endif
00956 
00957 
00958 }

static void parse_resume_reject ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 837 of file isdn_msg_parser.c.

00838 {
00839 #ifdef DEBUG
00840    printf("Parsing RESUME_REJECT Msg\n");
00841 #endif
00842 
00843 
00844 }

static void parse_retrieve ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 989 of file isdn_msg_parser.c.

00990 {
00991 #ifdef DEBUG
00992    printf("Parsing RETRIEVE Msg\n");
00993 #endif
00994 
00995 
00996 }

static void parse_retrieve_acknowledge ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1008 of file isdn_msg_parser.c.

01009 {
01010 #ifdef DEBUG
01011    printf("Parsing RETRIEVE_ACKNOWLEDGE Msg\n");
01012 #endif
01013 
01014 
01015 }

static void parse_retrieve_reject ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1032 of file isdn_msg_parser.c.

01033 {
01034 #ifdef DEBUG
01035    printf("Parsing RETRIEVE_REJECT Msg\n");
01036 #endif
01037 
01038 
01039 }

static void parse_setup ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 367 of file isdn_msg_parser.c.

References misdn_bchannel::caller, misdn_bchannel::capability, cb_log, dec_ie_bearer(), dec_ie_called_pn(), dec_ie_calling_pn(), dec_ie_channel_id(), dec_ie_complete(), dec_ie_facility(), dec_ie_keypad(), dec_ie_progress(), dec_ie_redir_nr(), dec_ie_useruser(), misdn_bchannel::dialed, misdn_bchannel::fac_in, misdn_party_redirecting::from, HEADER_LEN, INFO_CAPABILITY_DIGITAL_RESTRICTED, INFO_CAPABILITY_DIGITAL_UNRESTRICTED, INFO_CAPABILITY_SPEECH, INFO_CAPABILITY_VIDEO, INFO_CODEC_ALAW, INFO_CODEC_ULAW, misdn_bchannel::keypad, misdn_bchannel::law, mISDN_REDIRECTING_REASON_UNKNOWN, mISDNUSER_HEAD_SIZE, misdn_bchannel::mode, misdn_party_dialing::number, misdn_party_id::number, misdn_party_dialing::number_plan, misdn_party_id::number_plan, misdn_party_dialing::number_type, misdn_party_id::number_type, misdn_bchannel::port, misdn_party_id::presentation, misdn_bchannel::progress_coding, misdn_bchannel::progress_indicator, misdn_bchannel::progress_location, misdn_bchannel::rate, misdn_party_redirecting::reason, misdn_bchannel::redirecting, misdn_party_id::screening, misdn_bchannel::sending_complete, set_channel(), type, misdn_bchannel::urate, misdn_bchannel::user1, misdn_bchannel::uu, and misdn_bchannel::uulen.

00368 {
00369    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00370    SETUP_t *setup = (SETUP_t *) (msg->data + HEADER_LEN);
00371    Q931_info_t *qi = (Q931_info_t *) (msg->data + HEADER_LEN);
00372    int type;
00373    int plan;
00374    int present;
00375    int screen;
00376    int reason;
00377 
00378 #ifdef DEBUG
00379    printf("Parsing SETUP Msg\n");
00380 #endif
00381 
00382    dec_ie_calling_pn(setup->CALLING_PN, qi, &type, &plan, &present, &screen, bc->caller.number, sizeof(bc->caller.number), nt, bc);
00383    bc->caller.number_type = type;
00384    bc->caller.number_plan = plan;
00385    switch (present) {
00386    default:
00387    case 0:
00388       bc->caller.presentation = 0;  /* presentation allowed */
00389       break;
00390    case 1:
00391       bc->caller.presentation = 1;  /* presentation restricted */
00392       break;
00393    case 2:
00394       bc->caller.presentation = 2;  /* Number not available */
00395       break;
00396    }
00397    if (0 <= screen) {
00398       bc->caller.screening = screen;
00399    } else {
00400       bc->caller.screening = 0;  /* Unscreened */
00401    }
00402 
00403    dec_ie_facility(setup->FACILITY, (Q931_info_t *) setup, &bc->fac_in, nt, bc);
00404 
00405    dec_ie_called_pn(setup->CALLED_PN, (Q931_info_t *) setup, &type, &plan, bc->dialed.number, sizeof(bc->dialed.number), nt, bc);
00406    bc->dialed.number_type = type;
00407    bc->dialed.number_plan = plan;
00408 
00409    dec_ie_keypad(setup->KEYPAD, (Q931_info_t *) setup, bc->keypad, sizeof(bc->keypad), nt, bc);
00410 
00411    dec_ie_complete(setup->COMPLETE, (Q931_info_t *) setup, &bc->sending_complete, nt, bc);
00412 
00413    dec_ie_redir_nr(setup->REDIR_NR, (Q931_info_t *) setup, &type, &plan, &present, &screen, &reason, bc->redirecting.from.number, sizeof(bc->redirecting.from.number), nt, bc);
00414    bc->redirecting.from.number_type = type;
00415    bc->redirecting.from.number_plan = plan;
00416    switch (present) {
00417    default:
00418    case 0:
00419       bc->redirecting.from.presentation = 0; /* presentation allowed */
00420       break;
00421    case 1:
00422       bc->redirecting.from.presentation = 1; /* presentation restricted */
00423       break;
00424    case 2:
00425       bc->redirecting.from.presentation = 2; /* Number not available */
00426       break;
00427    }
00428    if (0 <= screen) {
00429       bc->redirecting.from.screening = screen;
00430    } else {
00431       bc->redirecting.from.screening = 0; /* Unscreened */
00432    }
00433    if (0 <= reason) {
00434       bc->redirecting.reason = reason;
00435    } else {
00436       bc->redirecting.reason = mISDN_REDIRECTING_REASON_UNKNOWN;
00437    }
00438 
00439    {
00440       int  coding, capability, mode, rate, multi, user, async, urate, stopbits, dbits, parity;
00441 
00442       dec_ie_bearer(setup->BEARER, (Q931_info_t *)setup, &coding, &capability, &mode, &rate, &multi, &user, &async, &urate, &stopbits, &dbits, &parity, nt,bc);
00443       switch (capability) {
00444       case -1: bc->capability=INFO_CAPABILITY_DIGITAL_UNRESTRICTED;
00445          break;
00446       case 0: bc->capability=INFO_CAPABILITY_SPEECH;
00447          break;
00448       case 18: bc->capability=INFO_CAPABILITY_VIDEO;
00449          break;
00450       case 8: bc->capability=INFO_CAPABILITY_DIGITAL_UNRESTRICTED;
00451          bc->user1 = user;
00452          bc->urate = urate;
00453 
00454          bc->rate = rate;
00455          bc->mode = mode;
00456          break;
00457       case 9: bc->capability=INFO_CAPABILITY_DIGITAL_RESTRICTED;
00458          break;
00459       default:
00460          break;
00461       }
00462 
00463       switch(user) {
00464       case 2:
00465          bc->law=INFO_CODEC_ULAW;
00466          break;
00467       case 3:
00468          bc->law=INFO_CODEC_ALAW;
00469          break;
00470       default:
00471          bc->law=INFO_CODEC_ALAW;
00472 
00473       }
00474 
00475       bc->capability=capability;
00476    }
00477    {
00478       int  exclusive, channel;
00479       dec_ie_channel_id(setup->CHANNEL_ID, (Q931_info_t *)setup, &exclusive, &channel, nt,bc);
00480 
00481       set_channel(bc,channel);
00482    }
00483 
00484    {
00485       int  protocol ;
00486       dec_ie_useruser(setup->USER_USER, (Q931_info_t *)setup, &protocol, bc->uu, &bc->uulen, nt,bc);
00487       if (bc->uulen) cb_log(1, bc->port, "USERUSERINFO:%s\n", bc->uu);
00488       else
00489       cb_log(1, bc->port, "NO USERUSERINFO\n");
00490    }
00491 
00492    dec_ie_progress(setup->PROGRESS, (Q931_info_t *)setup, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
00493 
00494 #if defined(AST_MISDN_ENHANCEMENTS)
00495    extract_setup_Bc_Hlc_Llc(setup, nt, bc);
00496 #endif   /* defined(AST_MISDN_ENHANCEMENTS) */
00497 }

static void parse_setup_acknowledge ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 727 of file isdn_msg_parser.c.

References dec_ie_channel_id(), dec_ie_facility(), dec_ie_progress(), misdn_bchannel::fac_in, HEADER_LEN, mISDNUSER_HEAD_SIZE, misdn_bchannel::progress_coding, misdn_bchannel::progress_indicator, misdn_bchannel::progress_location, and set_channel().

00728 {
00729    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
00730    SETUP_ACKNOWLEDGE_t *setup_acknowledge = (SETUP_ACKNOWLEDGE_t *) (msg->data + HEADER_LEN);
00731 
00732    {
00733       int  exclusive, channel;
00734       dec_ie_channel_id(setup_acknowledge->CHANNEL_ID, (Q931_info_t *)setup_acknowledge, &exclusive, &channel, nt,bc);
00735 
00736 
00737       set_channel(bc, channel);
00738    }
00739 
00740    dec_ie_progress(setup_acknowledge->PROGRESS, (Q931_info_t *)setup_acknowledge, &bc->progress_coding, &bc->progress_location, &bc->progress_indicator, nt, bc);
00741 
00742    dec_ie_facility(setup_acknowledge->FACILITY, (Q931_info_t *) setup_acknowledge, &bc->fac_in, nt, bc);
00743 
00744 #ifdef DEBUG
00745    printf("Parsing SETUP_ACKNOWLEDGE Msg\n");
00746 #endif
00747 
00748 
00749 }

static void parse_status ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1581 of file isdn_msg_parser.c.

References misdn_bchannel::cause, cause, dec_ie_cause(), mISDNUSER_HEAD_SIZE, and status.

01582 {
01583    int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN;
01584    STATUS_t *status = (STATUS_t *) (msg->data + HEADER_LEN);
01585    int location;
01586    int cause;
01587 
01588    dec_ie_cause(status->CAUSE, (Q931_info_t *)(status), &location, &cause, nt,bc);
01589    if (cause>0) bc->cause=cause;
01590 
01591 #ifdef DEBUG
01592    printf("Parsing STATUS Msg\n");
01593 #endif
01594 }

static void parse_status_enquiry ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1525 of file isdn_msg_parser.c.

01526 {
01527 #ifdef DEBUG
01528    printf("Parsing STATUS_ENQUIRY Msg\n");
01529 #endif
01530 }

static void parse_suspend ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 875 of file isdn_msg_parser.c.

00876 {
00877 #ifdef DEBUG
00878    printf("Parsing SUSPEND Msg\n");
00879 #endif
00880 
00881 
00882 }

static void parse_suspend_acknowledge ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 932 of file isdn_msg_parser.c.

00933 {
00934 #ifdef DEBUG
00935    printf("Parsing SUSPEND_ACKNOWLEDGE Msg\n");
00936 #endif
00937 
00938 
00939 }

static void parse_suspend_reject ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 818 of file isdn_msg_parser.c.

00819 {
00820 #ifdef DEBUG
00821    printf("Parsing SUSPEND_REJECT Msg\n");
00822 #endif
00823 
00824 
00825 }

static void parse_timeout ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 1606 of file isdn_msg_parser.c.

01607 {
01608 #ifdef DEBUG
01609    printf("Parsing STATUS Msg\n");
01610 #endif
01611 }

static void parse_user_information ( struct isdn_msg  msgs[],
msg_t *  msg,
struct misdn_bchannel bc,
int  nt 
) [static]

Definition at line 799 of file isdn_msg_parser.c.

00800 {
00801 #ifdef DEBUG
00802    printf("Parsing USER_INFORMATION Msg\n");
00803 #endif
00804 
00805 
00806 }

static void set_channel ( struct misdn_bchannel bc,
int  channel 
) [static]

Definition at line 141 of file isdn_msg_parser.c.

References cb_event, cb_log, misdn_bchannel::channel, EVENT_NEW_CHANNEL, misdn_bchannel::nt, and misdn_bchannel::port.

Referenced by parse_proceeding(), parse_setup(), and parse_setup_acknowledge().

00142 {
00143 
00144    cb_log(3,bc->port,"set_channel: bc->channel:%d channel:%d\n", bc->channel, channel);
00145 
00146 
00147    if (channel==0xff) {
00148       /* any channel */
00149       channel=-1;
00150    }
00151 
00152    /*  ALERT: is that everytime true ?  */
00153    if (channel > 0 && bc->nt ) {
00154 
00155       if (bc->channel && ( bc->channel != 0xff) ) {
00156          cb_log(0,bc->port,"We already have a channel (%d)\n", bc->channel);
00157       } else {
00158          bc->channel = channel;
00159          cb_event(EVENT_NEW_CHANNEL,bc,NULL);
00160       }
00161    }
00162 
00163    if (channel > 0 && !bc->nt ) {
00164       bc->channel = channel;
00165       cb_event(EVENT_NEW_CHANNEL,bc,NULL);
00166    }
00167 }


Variable Documentation

char EVENT_BCHAN_ACTIVATED_INFO[] = "BCHAN_ACTIVATED"

Definition at line 1728 of file isdn_msg_parser.c.

char EVENT_BCHAN_DATA_INFO[] = "BCHAN_DATA"

Definition at line 1727 of file isdn_msg_parser.c.

char EVENT_BCHAN_ERROR_INFO[] = "BCHAN_ERROR"

Definition at line 1730 of file isdn_msg_parser.c.

char EVENT_CLEAN_INFO[] = "CLEAN_UP"

Definition at line 1721 of file isdn_msg_parser.c.

char EVENT_DTMF_TONE_INFO[] = "DTMF_TONE"

Definition at line 1722 of file isdn_msg_parser.c.

char EVENT_NEW_BC_INFO[] = "NEW_BC"

Definition at line 1724 of file isdn_msg_parser.c.

char EVENT_NEW_CHANNEL_INFO[] = "NEW_CHANNEL"

Definition at line 1726 of file isdn_msg_parser.c.

char EVENT_NEW_L3ID_INFO[] = "NEW_L3ID"

Definition at line 1723 of file isdn_msg_parser.c.

char EVENT_PORT_ALARM_INFO[] = "ALARM"

Definition at line 1725 of file isdn_msg_parser.c.

char EVENT_TONE_GENERATE_INFO[] = "TONE_GENERATE"

Definition at line 1729 of file isdn_msg_parser.c.

struct isdn_msg msgs_g[]


Generated on Thu Oct 11 06:36:33 2012 for Asterisk - The Open Source Telephony Project by  doxygen 1.5.6