Option to disable seconds within date/time IE
New option "time-no-seconds" disables sending current seconds within the date/time IE. Some phones ignore the date/time IE if it is more precise than the current minute.
This commit is contained in:
parent
882cda66df
commit
a11bfb5740
|
@ -2257,7 +2257,7 @@ void setup_rsp(call_t *call, uint32_t pid, osmo_cc_msg_t *msg)
|
||||||
/* date & time, in NT mode only */
|
/* date & time, in NT mode only */
|
||||||
if (call->isdn_ep->ntmode) {
|
if (call->isdn_ep->ntmode) {
|
||||||
time(¤t_time);
|
time(¤t_time);
|
||||||
enc_ie_date(l3m, current_time, 0);
|
enc_ie_date(l3m, current_time, call->isdn_ep->time_no_sec);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* connected number */
|
/* connected number */
|
||||||
|
|
|
@ -690,7 +690,7 @@ void isdn_destroy(isdn_t *isdn_ep)
|
||||||
static void clock_timeout(void *data);
|
static void clock_timeout(void *data);
|
||||||
|
|
||||||
/* initialization and configuration to isdn interface instance */
|
/* initialization and configuration to isdn interface instance */
|
||||||
int isdn_initialize(isdn_t *isdn_ep, ph_socket_t *ph_socket, char law, const char *portname, int ntmode, int ptp, int layer1hold, int layer2hold, const char *channel_out, const char *channel_in, const char *timeouts, int tx_delay, int local_tones, int serving_location, int aocd, int aocs)
|
int isdn_initialize(isdn_t *isdn_ep, ph_socket_t *ph_socket, char law, const char *portname, int ntmode, int ptp, int layer1hold, int layer2hold, const char *channel_out, const char *channel_in, const char *timeouts, int tx_delay, int local_tones, int serving_location, int aocd, int aocs, int time_no_sec)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
void *mui;
|
void *mui;
|
||||||
|
@ -728,6 +728,7 @@ int isdn_initialize(isdn_t *isdn_ep, ph_socket_t *ph_socket, char law, const cha
|
||||||
isdn_ep->serving_location = serving_location;
|
isdn_ep->serving_location = serving_location;
|
||||||
isdn_ep->aocd = aocd;
|
isdn_ep->aocd = aocd;
|
||||||
isdn_ep->aocs = aocs;
|
isdn_ep->aocs = aocs;
|
||||||
|
isdn_ep->time_no_sec = time_no_sec;
|
||||||
|
|
||||||
/* channel selection list */
|
/* channel selection list */
|
||||||
if (channel_out) {
|
if (channel_out) {
|
||||||
|
|
|
@ -105,6 +105,7 @@ typedef struct isdn {
|
||||||
int l1hold;
|
int l1hold;
|
||||||
int l2hold;
|
int l2hold;
|
||||||
int l2sock;
|
int l2sock;
|
||||||
|
int time_no_sec;
|
||||||
void *l2inst;
|
void *l2inst;
|
||||||
ph_socket_t *ph_socket;
|
ph_socket_t *ph_socket;
|
||||||
pthread_mutex_t upqueue_lock;
|
pthread_mutex_t upqueue_lock;
|
||||||
|
@ -214,7 +215,7 @@ int open_bchannel_out(call_t *call, unsigned int cmd, int channel, int exclusive
|
||||||
/* isdn instance */
|
/* isdn instance */
|
||||||
isdn_t *isdn_create(void);
|
isdn_t *isdn_create(void);
|
||||||
void isdn_destroy(isdn_t *isdn_ep);
|
void isdn_destroy(isdn_t *isdn_ep);
|
||||||
int isdn_initialize(isdn_t *isdn_ep, ph_socket_t *ph_socket, char law, const char *portname, int ntmode, int ptp, int layer1hold, int layer2hold, const char *channel_out, const char *channel_in, const char *timeouts, int tx_delay, int local_tones, int serving_location, int aocd, int aocs);
|
int isdn_initialize(isdn_t *isdn_ep, ph_socket_t *ph_socket, char law, const char *portname, int ntmode, int ptp, int layer1hold, int layer2hold, const char *channel_out, const char *channel_in, const char *timeouts, int tx_delay, int local_tones, int serving_location, int aocd, int aocs, int time_no_sec);
|
||||||
int isdn_open(isdn_t *isdn_ep);
|
int isdn_open(isdn_t *isdn_ep);
|
||||||
void isdn_close(isdn_t *isdn_ep);
|
void isdn_close(isdn_t *isdn_ep);
|
||||||
void isdn_add_msn(isdn_t *isdn_ep, const char *msn);
|
void isdn_add_msn(isdn_t *isdn_ep, const char *msn);
|
||||||
|
|
|
@ -48,6 +48,7 @@ static int layer1hold = 0;
|
||||||
static int layer2hold = 0;
|
static int layer2hold = 0;
|
||||||
static int aocd = 0;
|
static int aocd = 0;
|
||||||
static int aocs = 0;
|
static int aocs = 0;
|
||||||
|
static int time_no_sec = 0;
|
||||||
static const char *channel_out = NULL;
|
static const char *channel_out = NULL;
|
||||||
static const char *channel_in = NULL;
|
static const char *channel_in = NULL;
|
||||||
static const char *timeouts = NULL;
|
static const char *timeouts = NULL;
|
||||||
|
@ -131,6 +132,8 @@ static void print_help()
|
||||||
printf(" Send AOC-D charging information\n");
|
printf(" Send AOC-D charging information\n");
|
||||||
printf(" --aocs\n");
|
printf(" --aocs\n");
|
||||||
printf(" Send AOC-S charging information\n");
|
printf(" Send AOC-S charging information\n");
|
||||||
|
printf(" --time-no-seconds\n");
|
||||||
|
printf(" Send date/time IE without seconds\n");
|
||||||
printf(" -T --local-tones german | oldgerman | american\n");
|
printf(" -T --local-tones german | oldgerman | american\n");
|
||||||
printf(" Send locally generated tones, if not provided by remote interface.\n");
|
printf(" Send locally generated tones, if not provided by remote interface.\n");
|
||||||
printf(" -D --debug-misdn\n");
|
printf(" -D --debug-misdn\n");
|
||||||
|
@ -162,6 +165,7 @@ static void print_help()
|
||||||
#define OPT_BR_ONLY 267
|
#define OPT_BR_ONLY 267
|
||||||
#define OPT_AOCD 268
|
#define OPT_AOCD 268
|
||||||
#define OPT_AOCS 269
|
#define OPT_AOCS 269
|
||||||
|
#define OPT_TIME_NO_SEC 270
|
||||||
|
|
||||||
static void add_options(void)
|
static void add_options(void)
|
||||||
{
|
{
|
||||||
|
@ -182,6 +186,7 @@ static void add_options(void)
|
||||||
option_add('T', "local-tones", 1);
|
option_add('T', "local-tones", 1);
|
||||||
option_add(OPT_AOCD, "aocd", 0);
|
option_add(OPT_AOCD, "aocd", 0);
|
||||||
option_add(OPT_AOCS, "aocs", 0);
|
option_add(OPT_AOCS, "aocs", 0);
|
||||||
|
option_add(OPT_TIME_NO_SEC, "time-no-seconds", 0);
|
||||||
option_add('D', "debug-misdn", 0);
|
option_add('D', "debug-misdn", 0);
|
||||||
option_add(OPT_SERVING, "serving-location", 1);
|
option_add(OPT_SERVING, "serving-location", 1);
|
||||||
option_add('B', "bridging", 1);
|
option_add('B', "bridging", 1);
|
||||||
|
@ -253,6 +258,9 @@ static int handle_options(int short_option, int argi, char **argv)
|
||||||
case OPT_AOCS:
|
case OPT_AOCS:
|
||||||
aocs = 1;
|
aocs = 1;
|
||||||
break;
|
break;
|
||||||
|
case OPT_TIME_NO_SEC:
|
||||||
|
time_no_sec = 1;
|
||||||
|
break;
|
||||||
case 'T':
|
case 'T':
|
||||||
if (!strcasecmp(argv[argi], "american"))
|
if (!strcasecmp(argv[argi], "american"))
|
||||||
local_tones = TONES_TYPE_AMERICAN;
|
local_tones = TONES_TYPE_AMERICAN;
|
||||||
|
|
Loading…
Reference in New Issue