Add support to enable/disable facility IE Supplementary Services
git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@217 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
3803535593
commit
8205ce358a
4
libpri.h
4
libpri.h
@ -411,6 +411,10 @@ extern void pri_set_debug(struct pri *pri, int debug);
|
||||
/* Get debug parameters on PRI -- see above debug definitions */
|
||||
extern int pri_get_debug(struct pri *pri);
|
||||
|
||||
#define PRI_FACILITY_ENABLE
|
||||
/* Enable transmission support of Facility IEs on the pri */
|
||||
extern void pri_facility_enable(struct pri *pri);
|
||||
|
||||
/* Run PRI on the given D-channel, taking care of any events that
|
||||
need to be handled. If block is set, it will block until an event
|
||||
occurs which needs to be handled */
|
||||
|
10
pri.c
10
pri.c
@ -400,6 +400,16 @@ int pri_get_debug(struct pri *pri)
|
||||
return pri->debug;
|
||||
}
|
||||
|
||||
void pri_facility_enable(struct pri *pri)
|
||||
{
|
||||
if (!pri)
|
||||
return;
|
||||
pri->sendfacility = 1;
|
||||
if (pri->subchannel)
|
||||
pri_facility_enable(pri->subchannel);
|
||||
return;
|
||||
}
|
||||
|
||||
int pri_acknowledge(struct pri *pri, q931_call *call, int channel, int info)
|
||||
{
|
||||
if (!pri || !call)
|
||||
|
@ -1237,8 +1237,13 @@ extern int pri_call_apdu_queue_cleanup(q931_call *call)
|
||||
|
||||
extern int pri_call_add_standard_apdus(struct pri *pri, q931_call *call)
|
||||
{
|
||||
if (!pri->sendfacility)
|
||||
return 0;
|
||||
|
||||
if (pri->switchtype == PRI_SWITCH_QSIG) { /* For Q.SIG it does network and cpe operations */
|
||||
/* FIXME: Presumably, it should only send on a redirect */
|
||||
rose_diverting_leg_information2_encode(pri, call);
|
||||
add_callername_facility_ies(pri, call, 1);
|
||||
}
|
||||
|
||||
if (pri->localtype == PRI_NETWORK) {
|
||||
|
@ -108,6 +108,7 @@ struct pri {
|
||||
#endif
|
||||
|
||||
unsigned char last_invoke; /* Last ROSE invoke ID */
|
||||
unsigned char sendfacility;
|
||||
};
|
||||
|
||||
struct pri_sr {
|
||||
|
Loading…
Reference in New Issue
Block a user