freetdm - ISDN:Fix for bearer Cap
This commit is contained in:
parent
342678698c
commit
98fa4a914c
|
@ -470,11 +470,10 @@ ftdm_status_t set_restart_ind_ie(ftdm_channel_t *ftdmchan, RstInd *rstInd);
|
|||
ftdm_status_t set_facility_ie(ftdm_channel_t *ftdmchan, FacilityStr *facilityStr);
|
||||
ftdm_status_t set_facility_ie_str(ftdm_channel_t *ftdmchan, uint8_t *data, uint8_t *data_len);
|
||||
|
||||
|
||||
uint8_t sngisdn_get_infoTranCap_from_stack(ftdm_bearer_cap_t bearer_capability);
|
||||
uint8_t sngisdn_get_usrInfoLyr1Prot_from_stack(ftdm_user_layer1_prot_t layer1_prot);
|
||||
ftdm_bearer_cap_t sngisdn_get_infoTranCap_from_user(uint8_t bearer_capability);
|
||||
ftdm_user_layer1_prot_t sngisdn_get_usrInfoLyr1Prot_from_user(uint8_t layer1_prot);
|
||||
uint8_t sngisdn_get_infoTranCap_from_user(ftdm_bearer_cap_t bearer_capability);
|
||||
uint8_t sngisdn_get_usrInfoLyr1Prot_from_user(ftdm_user_layer1_prot_t layer1_prot);
|
||||
ftdm_bearer_cap_t sngisdn_get_infoTranCap_from_stack(uint8_t bearer_capability);
|
||||
ftdm_user_layer1_prot_t sngisdn_get_usrInfoLyr1Prot_from_stack(uint8_t layer1_prot);
|
||||
|
||||
static __inline__ uint32_t sngisdn_test_flag(sngisdn_chan_data_t *sngisdn_info, sngisdn_flag_t flag)
|
||||
{
|
||||
|
|
|
@ -141,7 +141,7 @@ void sngisdn_process_con_ind (sngisdn_event_data_t *sngisdn_event)
|
|||
ftdm_log_chan(sngisdn_info->ftdmchan, FTDM_LOG_INFO, "Incoming call: Called No:[%s] Calling No:[%s]\n", ftdmchan->caller_data.dnis.digits, ftdmchan->caller_data.cid_num.digits);
|
||||
|
||||
if (conEvnt->bearCap[0].eh.pres) {
|
||||
ftdmchan->caller_data.bearer_layer1 = sngisdn_get_infoTranCap_from_stack(conEvnt->bearCap[0].usrInfoLyr1Prot.val);
|
||||
ftdmchan->caller_data.bearer_layer1 = sngisdn_get_usrInfoLyr1Prot_from_stack(conEvnt->bearCap[0].usrInfoLyr1Prot.val);
|
||||
ftdmchan->caller_data.bearer_capability = sngisdn_get_infoTranCap_from_stack(conEvnt->bearCap[0].infoTranCap.val);
|
||||
}
|
||||
|
||||
|
|
|
@ -1033,7 +1033,7 @@ void get_memory_info(void)
|
|||
return;
|
||||
}
|
||||
|
||||
uint8_t sngisdn_get_infoTranCap_from_stack(ftdm_bearer_cap_t bearer_capability)
|
||||
uint8_t sngisdn_get_infoTranCap_from_user(ftdm_bearer_cap_t bearer_capability)
|
||||
{
|
||||
switch(bearer_capability) {
|
||||
case FTDM_BEARER_CAP_SPEECH:
|
||||
|
@ -1049,7 +1049,7 @@ uint8_t sngisdn_get_infoTranCap_from_stack(ftdm_bearer_cap_t bearer_capability)
|
|||
return FTDM_BEARER_CAP_SPEECH;
|
||||
}
|
||||
|
||||
uint8_t sngisdn_get_usrInfoLyr1Prot_from_stack(ftdm_user_layer1_prot_t layer1_prot)
|
||||
uint8_t sngisdn_get_usrInfoLyr1Prot_from_user(ftdm_user_layer1_prot_t layer1_prot)
|
||||
{
|
||||
switch(layer1_prot) {
|
||||
case FTDM_USER_LAYER1_PROT_V110:
|
||||
|
@ -1065,25 +1065,22 @@ uint8_t sngisdn_get_usrInfoLyr1Prot_from_stack(ftdm_user_layer1_prot_t layer1_pr
|
|||
return IN_UIL1_G711ULAW;
|
||||
}
|
||||
|
||||
ftdm_bearer_cap_t sngisdn_get_infoTranCap_from_user(uint8_t bearer_capability)
|
||||
ftdm_bearer_cap_t sngisdn_get_infoTranCap_from_stack(uint8_t bearer_capability)
|
||||
{
|
||||
switch(bearer_capability) {
|
||||
case IN_ITC_SPEECH:
|
||||
return FTDM_BEARER_CAP_SPEECH;
|
||||
|
||||
return FTDM_BEARER_CAP_SPEECH;
|
||||
case IN_ITC_UNRDIG:
|
||||
return FTDM_BEARER_CAP_64K_UNRESTRICTED;
|
||||
|
||||
return FTDM_BEARER_CAP_64K_UNRESTRICTED;
|
||||
case IN_ITC_A31KHZ:
|
||||
return FTDM_BEARER_CAP_3_1KHZ_AUDIO;
|
||||
|
||||
default:
|
||||
return FTDM_BEARER_CAP_SPEECH;
|
||||
}
|
||||
return FTDM_BEARER_CAP_SPEECH;
|
||||
}
|
||||
|
||||
ftdm_user_layer1_prot_t sngisdn_get_usrInfoLyr1Prot_from_user(uint8_t layer1_prot)
|
||||
ftdm_user_layer1_prot_t sngisdn_get_usrInfoLyr1Prot_from_stack(uint8_t layer1_prot)
|
||||
{
|
||||
switch(layer1_prot) {
|
||||
case IN_UIL1_CCITTV110:
|
||||
|
|
Loading…
Reference in New Issue