mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-06-04 04:12:03 +00:00
Add ZAP_TON_* (taken from Q931.h, drop Q921.h and Q931.h include from openzap.h and fixup all users of the old Q931_TON_ enum values)
git-svn-id: http://svn.openzap.org/svn/openzap/trunk@707 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
parent
406f778846
commit
d5b33bf982
@ -978,13 +978,13 @@ static switch_call_cause_t channel_outgoing_channel(switch_core_session_t *sessi
|
|||||||
|
|
||||||
if ((var = switch_event_get_header(var_event, "openzap_outbound_ton")) || (var = switch_core_get_variable("openzap_outbound_ton"))) {
|
if ((var = switch_event_get_header(var_event, "openzap_outbound_ton")) || (var = switch_core_get_variable("openzap_outbound_ton"))) {
|
||||||
if (!strcasecmp(var, "national")) {
|
if (!strcasecmp(var, "national")) {
|
||||||
caller_data.ani.type = Q931_TON_NATIONAL;
|
caller_data.ani.type = ZAP_TON_NATIONAL;
|
||||||
} else if (!strcasecmp(var, "international")) {
|
} else if (!strcasecmp(var, "international")) {
|
||||||
caller_data.ani.type = Q931_TON_INTERNATIONAL;
|
caller_data.ani.type = ZAP_TON_INTERNATIONAL;
|
||||||
} else if (!strcasecmp(var, "local")) {
|
} else if (!strcasecmp(var, "local")) {
|
||||||
caller_data.ani.type = Q931_TON_SUBSCRIBER_NUMBER;
|
caller_data.ani.type = ZAP_TON_SUBSCRIBER_NUMBER;
|
||||||
} else if (!strcasecmp(var, "unknown")) {
|
} else if (!strcasecmp(var, "unknown")) {
|
||||||
caller_data.ani.type = Q931_TON_UNKNOWN;
|
caller_data.ani.type = ZAP_TON_UNKNOWN;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
caller_data.ani.type = outbound_profile->destination_number_ton;
|
caller_data.ani.type = outbound_profile->destination_number_ton;
|
||||||
|
@ -167,8 +167,6 @@
|
|||||||
#include "libteletone.h"
|
#include "libteletone.h"
|
||||||
#include "zap_buffer.h"
|
#include "zap_buffer.h"
|
||||||
#include "zap_threadmutex.h"
|
#include "zap_threadmutex.h"
|
||||||
#include "Q921.h"
|
|
||||||
#include "Q931.h"
|
|
||||||
|
|
||||||
#define XX if (0)
|
#define XX if (0)
|
||||||
|
|
||||||
@ -410,6 +408,19 @@ struct zap_fsk_modulator {
|
|||||||
int16_t sample_buffer[64];
|
int16_t sample_buffer[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Type Of Number (TON)
|
||||||
|
*/
|
||||||
|
typedef enum {
|
||||||
|
ZAP_TON_UNKNOWN = 0,
|
||||||
|
ZAP_TON_INTERNATIONAL,
|
||||||
|
ZAP_TON_NATIONAL,
|
||||||
|
ZAP_TON_NETWORK_SPECIFIC,
|
||||||
|
ZAP_TON_SUBSCRIBER_NUMBER,
|
||||||
|
ZAP_TON_ABBREVIATED_NUMBER,
|
||||||
|
ZAP_TON_RESERVED
|
||||||
|
} zap_ton_t;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
char digits[25];
|
char digits[25];
|
||||||
uint8_t type;
|
uint8_t type;
|
||||||
|
@ -32,7 +32,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "openzap.h"
|
#include "openzap.h"
|
||||||
#include "zap_isdn.h"
|
|
||||||
#include "Q931.h"
|
#include "Q931.h"
|
||||||
#include "Q921.h"
|
#include "Q921.h"
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
@ -41,6 +40,8 @@
|
|||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "zap_isdn.h"
|
||||||
|
|
||||||
#define LINE "--------------------------------------------------------------------------------"
|
#define LINE "--------------------------------------------------------------------------------"
|
||||||
//#define IODEBUG
|
//#define IODEBUG
|
||||||
|
|
||||||
|
@ -463,13 +463,13 @@ static __inline__ void state_advance(zap_channel_t *zchan)
|
|||||||
|
|
||||||
dp = zchan->caller_data.ani.type;
|
dp = zchan->caller_data.ani.type;
|
||||||
switch(dp) {
|
switch(dp) {
|
||||||
case Q931_TON_NATIONAL:
|
case ZAP_TON_NATIONAL:
|
||||||
dp = PRI_NATIONAL_ISDN;
|
dp = PRI_NATIONAL_ISDN;
|
||||||
break;
|
break;
|
||||||
case Q931_TON_INTERNATIONAL:
|
case ZAP_TON_INTERNATIONAL:
|
||||||
dp = PRI_INTERNATIONAL_ISDN;
|
dp = PRI_INTERNATIONAL_ISDN;
|
||||||
break;
|
break;
|
||||||
case Q931_TON_SUBSCRIBER_NUMBER:
|
case ZAP_TON_SUBSCRIBER_NUMBER:
|
||||||
dp = PRI_LOCAL_ISDN;
|
dp = PRI_LOCAL_ISDN;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user