@ -159,7 +159,7 @@ void parse_setup (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc,
{
{
int type , plan , present , screen ;
int type , plan , present , screen ;
char id [ 32 ] ;
char id [ 32 ] ;
dec_ie_calling_pn ( setup - > CALLING_PN , qi , & type , & plan , & present , & screen , ( unsigned char * ) id , sizeof ( id ) , nt , bc ) ;
dec_ie_calling_pn ( setup - > CALLING_PN , qi , & type , & plan , & present , & screen , ( unsigned char * ) id , sizeof ( id ) - 1 , nt , bc ) ;
bc - > onumplan = type ;
bc - > onumplan = type ;
strcpy ( bc - > oad , id ) ;
strcpy ( bc - > oad , id ) ;
@ -183,13 +183,13 @@ void parse_setup (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc,
{
{
int type , plan ;
int type , plan ;
char number [ 32 ] ;
char number [ 32 ] ;
dec_ie_called_pn ( setup - > CALLED_PN , ( Q931_info_t * ) setup , & type , & plan , ( unsigned char * ) number , sizeof ( number ) , nt , bc ) ;
dec_ie_called_pn ( setup - > CALLED_PN , ( Q931_info_t * ) setup , & type , & plan , ( unsigned char * ) number , sizeof ( number ) - 1 , nt , bc ) ;
strcpy ( bc - > dad , number ) ;
strcpy ( bc - > dad , number ) ;
bc - > dnumplan = type ;
bc - > dnumplan = type ;
}
}
{
{
char keypad [ 32 ] ;
char keypad [ 32 ] ;
dec_ie_keypad ( setup - > KEYPAD , ( Q931_info_t * ) setup , ( unsigned char * ) keypad , sizeof ( keypad ) , nt , bc ) ;
dec_ie_keypad ( setup - > KEYPAD , ( Q931_info_t * ) setup , ( unsigned char * ) keypad , sizeof ( keypad ) - 1 , nt , bc ) ;
strcpy ( bc - > keypad , keypad ) ;
strcpy ( bc - > keypad , keypad ) ;
}
}
@ -201,7 +201,7 @@ void parse_setup (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc,
{
{
int type , plan , present , screen , reason ;
int type , plan , present , screen , reason ;
char id [ 32 ] ;
char id [ 32 ] ;
dec_ie_redir_nr ( setup - > REDIR_NR , ( Q931_info_t * ) setup , & type , & plan , & present , & screen , & reason , ( unsigned char * ) id , sizeof ( id ) , nt , bc ) ;
dec_ie_redir_nr ( setup - > REDIR_NR , ( Q931_info_t * ) setup , & type , & plan , & present , & screen , & reason , ( unsigned char * ) id , sizeof ( id ) - 1 , nt , bc ) ;
strcpy ( bc - > rad , id ) ;
strcpy ( bc - > rad , id ) ;
bc - > rnumplan = type ;
bc - > rnumplan = type ;
@ -333,17 +333,18 @@ void parse_connect (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *b
int HEADER_LEN = nt ? mISDNUSER_HEAD_SIZE : mISDN_HEADER_LEN ;
int HEADER_LEN = nt ? mISDNUSER_HEAD_SIZE : mISDN_HEADER_LEN ;
CONNECT_t * connect = ( CONNECT_t * ) ( ( unsigned long ) ( msg - > data + HEADER_LEN ) ) ;
CONNECT_t * connect = ( CONNECT_t * ) ( ( unsigned long ) ( msg - > data + HEADER_LEN ) ) ;
int type , plan , pres , screen ;
int plan , pres , screen ;
char connected_pn [ 32 ] ;
bc - > ces = connect - > ces ;
bc - > ces = connect - > ces ;
bc - > ces = connect - > ces ;
bc - > ces = connect - > ces ;
dec_ie_progress ( connect - > PROGRESS , ( Q931_info_t * ) connect , & bc - > progress_coding , & bc - > progress_location , & bc - > progress_indicator , nt , bc ) ;
dec_ie_progress ( connect - > PROGRESS , ( Q931_info_t * ) connect , & bc - > progress_coding , & bc - > progress_location , & bc - > progress_indicator , nt , bc ) ;
dec_ie_connected_pn ( connect - > CONNECT_PN , ( Q931_info_t * ) connect , & type , & plan , & pres , & screen , connected_pn , 31 , nt , bc ) ;
dec_ie_connected_pn ( connect - > CONNECT_PN , ( Q931_info_t * ) connect , & bc- > cpnnumplan , & plan , & pres , & screen , bc- > cad , 31 , nt , bc ) ;
cb_log ( 1 , bc - > port , " CONNETED PN: %s cpn_dialplan:%d \n " , connected_pn , type ) ;
/*
cb_log ( 1 , bc - > port , " CONNETED PN: %s cpn_dialplan:%d \n " , connected_pn , type ) ;
*/
# if DEBUG
# if DEBUG
printf ( " Parsing CONNECT Msg \n " ) ;
printf ( " Parsing CONNECT Msg \n " ) ;
@ -367,7 +368,7 @@ msg_t *build_connect (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt)
{
{
int type = bc - > cpnnumplan , plan = 1 , present = 2 , screen = 0 ;
int type = bc - > cpnnumplan , plan = 1 , present = 2 , screen = 0 ;
enc_ie_connected_pn ( & connect - > CONNECT_PN , msg , type , plan , present , screen , ( unsigned char * ) bc - > dad , nt , bc ) ;
enc_ie_connected_pn ( & connect - > CONNECT_PN , msg , type , plan , present , screen , ( unsigned char * ) bc - > cad , nt , bc ) ;
}
}
# if DEBUG
# if DEBUG
@ -961,8 +962,8 @@ void parse_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchanne
int type , plan ;
int type , plan ;
char number [ 32 ] ;
char number [ 32 ] ;
char keypad [ 32 ] ;
char keypad [ 32 ] ;
dec_ie_called_pn ( information - > CALLED_PN , ( Q931_info_t * ) information , & type , & plan , ( unsigned char * ) number , sizeof ( number ) , nt , bc ) ;
dec_ie_called_pn ( information - > CALLED_PN , ( Q931_info_t * ) information , & type , & plan , ( unsigned char * ) number , sizeof ( number ) - 1 , nt , bc ) ;
dec_ie_keypad ( information - > KEYPAD , ( Q931_info_t * ) information , ( unsigned char * ) keypad , sizeof ( keypad ) , nt , bc ) ;
dec_ie_keypad ( information - > KEYPAD , ( Q931_info_t * ) information , ( unsigned char * ) keypad , sizeof ( keypad ) - 1 , nt , bc ) ;
strcpy ( bc - > info_dad , number ) ;
strcpy ( bc - > info_dad , number ) ;
strcpy ( bc - > keypad , keypad ) ;
strcpy ( bc - > keypad , keypad ) ;
}
}