freetdm: OPENZAP-187 --resolve Add ability to set called party subaddress
This commit is contained in:
parent
b434cac526
commit
c55ac6c900
|
@ -507,6 +507,7 @@ ftdm_status_t set_called_num(ftdm_channel_t *ftdmchan, CdPtyNmb *cdPtyNmb);
|
|||
ftdm_status_t set_redir_num(ftdm_channel_t *ftdmchan, RedirNmb *redirNmb);
|
||||
ftdm_status_t set_calling_name(ftdm_channel_t *ftdmchan, ConEvnt *conEvnt);
|
||||
ftdm_status_t set_calling_subaddr(ftdm_channel_t *ftdmchan, CgPtySad *cgPtySad);
|
||||
ftdm_status_t set_called_subaddr(ftdm_channel_t *ftdmchan, CdPtySad *cdPtySad);
|
||||
ftdm_status_t set_prog_ind_ie(ftdm_channel_t *ftdmchan, ProgInd *progInd, ftdm_sngisdn_progind_t prog_ind);
|
||||
ftdm_status_t set_bear_cap_ie(ftdm_channel_t *ftdmchan, BearCap *bearCap);
|
||||
ftdm_status_t set_network_specific_fac(ftdm_channel_t *ftdmchan, NetFac *netFac);
|
||||
|
|
|
@ -67,6 +67,7 @@ void sngisdn_snd_setup(ftdm_channel_t *ftdmchan)
|
|||
set_calling_num(ftdmchan, &conEvnt.cgPtyNmb);
|
||||
set_calling_num2(ftdmchan, &conEvnt.cgPtyNmb2);
|
||||
set_calling_subaddr(ftdmchan, &conEvnt.cgPtySad);
|
||||
set_called_subaddr(ftdmchan, &conEvnt.cdPtySad);
|
||||
set_redir_num(ftdmchan, &conEvnt.redirNmb);
|
||||
set_calling_name(ftdmchan, &conEvnt);
|
||||
set_network_specific_fac(ftdmchan, &conEvnt.netFac[0]);
|
||||
|
|
|
@ -847,6 +847,26 @@ ftdm_status_t set_calling_subaddr(ftdm_channel_t *ftdmchan, CgPtySad *cgPtySad)
|
|||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
ftdm_status_t set_called_subaddr(ftdm_channel_t *ftdmchan, CdPtySad *cdPtySad)
|
||||
{
|
||||
const char* cld_subaddr = NULL;
|
||||
cld_subaddr = ftdm_usrmsg_get_var(ftdmchan->usrmsg, "isdn.called_subaddr");
|
||||
if (!ftdm_strlen_zero(cld_subaddr)) {
|
||||
unsigned len = strlen (cld_subaddr);
|
||||
cdPtySad->eh.pres = PRSNT_NODEF;
|
||||
cdPtySad->typeSad.pres = 1;
|
||||
cdPtySad->typeSad.val = 0; /* NSAP */
|
||||
cdPtySad->oddEvenInd.pres = 1;
|
||||
cdPtySad->oddEvenInd.val = 0;
|
||||
|
||||
ftdm_log_chan(ftdmchan, FTDM_LOG_DEBUG, "Sending Called Party Subaddress:%s\n", cld_subaddr);
|
||||
cdPtySad->sadInfo.pres = 1;
|
||||
cdPtySad->sadInfo.len = len;
|
||||
memcpy(cdPtySad->sadInfo.val, cld_subaddr, len);
|
||||
}
|
||||
return FTDM_SUCCESS;
|
||||
}
|
||||
|
||||
ftdm_status_t set_facility_ie(ftdm_channel_t *ftdmchan, FacilityStr *facilityStr)
|
||||
{
|
||||
ftdm_status_t status;
|
||||
|
|
Loading…
Reference in New Issue