diff --git a/src/isdn/dss1.c b/src/isdn/dss1.c index d81e77b..4011461 100644 --- a/src/isdn/dss1.c +++ b/src/isdn/dss1.c @@ -1934,6 +1934,9 @@ int process_progress(call_t *call, osmo_cc_msg_t *msg, struct l3_msg *l3m, int c case TONES_TYPE_OLDGERMAN: tone = TONE_GERMAN_OLDDIALTONE; break; + case TONES_TYPE_MORSEGERMAN: + tone = TONE_GERMAN_MORSEDIALTONE; + break; default: tone = TONE_AMERICAN_DIALTONE; } @@ -1949,6 +1952,7 @@ int process_progress(call_t *call, osmo_cc_msg_t *msg, struct l3_msg *l3m, int c tone = TONE_GERMAN_RINGING; break; case TONES_TYPE_OLDGERMAN: + case TONES_TYPE_MORSEGERMAN: tone = TONE_GERMAN_OLDRINGING; break; default: @@ -1965,6 +1969,7 @@ int process_progress(call_t *call, osmo_cc_msg_t *msg, struct l3_msg *l3m, int c tone = TONE_GERMAN_BUSY; break; case TONES_TYPE_OLDGERMAN: + case TONES_TYPE_MORSEGERMAN: tone = TONE_GERMAN_OLDBUSY; break; default: @@ -1978,6 +1983,7 @@ int process_progress(call_t *call, osmo_cc_msg_t *msg, struct l3_msg *l3m, int c tone = TONE_GERMAN_HANGUP; break; case TONES_TYPE_OLDGERMAN: + case TONES_TYPE_MORSEGERMAN: tone = TONE_GERMAN_OLDHANGUP; break; default: @@ -1990,6 +1996,7 @@ int process_progress(call_t *call, osmo_cc_msg_t *msg, struct l3_msg *l3m, int c tone = TONE_GERMAN_GASSENBESETZT; break; case TONES_TYPE_OLDGERMAN: + case TONES_TYPE_MORSEGERMAN: tone = TONE_GERMAN_OLDHANGUP; break; default: @@ -2002,6 +2009,7 @@ int process_progress(call_t *call, osmo_cc_msg_t *msg, struct l3_msg *l3m, int c tone = TONE_SPECIAL_INFO; break; case TONES_TYPE_OLDGERMAN: + case TONES_TYPE_MORSEGERMAN: tone = TONE_SPECIAL_INFO; break; default: diff --git a/src/isdn/isdn.h b/src/isdn/isdn.h index ced1dec..68b97d5 100644 --- a/src/isdn/isdn.h +++ b/src/isdn/isdn.h @@ -26,6 +26,7 @@ #define TONES_TYPE_AMERICAN 1 #define TONES_TYPE_GERMAN 2 #define TONES_TYPE_OLDGERMAN 3 +#define TONES_TYPE_MORSEGERMAN 4 #define DIRECTION_ORIGINATOR 0 #define DIRECTION_TERMINATOR 1 diff --git a/src/isdn/main.c b/src/isdn/main.c index a696b0d..8fd2c4b 100644 --- a/src/isdn/main.c +++ b/src/isdn/main.c @@ -134,7 +134,7 @@ static void print_help() 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 | morsegerman | american\n"); printf(" Send locally generated tones, if not provided by remote interface.\n"); printf(" -D --debug-misdn\n"); printf(" Enables mISDN stack debugging.\n"); @@ -268,6 +268,8 @@ static int handle_options(int short_option, int argi, char **argv) local_tones = TONES_TYPE_GERMAN; else if (!strcasecmp(argv[argi], "oldgerman")) local_tones = TONES_TYPE_OLDGERMAN; + else if (!strcasecmp(argv[argi], "morsegerman")) + local_tones = TONES_TYPE_MORSEGERMAN; else { fprintf(stderr, "Invalid tones type given!\n"); return -EINVAL; diff --git a/src/isdn/tones.c b/src/isdn/tones.c index 21ff727..c97ba38 100644 --- a/src/isdn/tones.c +++ b/src/isdn/tones.c @@ -258,6 +258,11 @@ static struct pattern { {SIZE_GO, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, {7956, 0, 0, 0, 0, 0, 0, 0, 0, 0} }, + {TONE_GERMAN_MORSEDIALTONE, + {DATA_GO, DATA_S, DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL}, + {SIZE_GO, SIZE_S, SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL}, + {1600, 2400, 5600, 6400, 0, 0, 0, 0, 0, 0} }, + {TONE_AMERICAN_DIALTONE, {DATA_DT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, {SIZE_DT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, @@ -292,7 +297,7 @@ static struct pattern { {TONE_GERMAN_OLDRINGING, {DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, {SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, - {8000, 40000, 0, 0, 0, 0, 0, 0, 0, 0} }, + {8000, 32000, 0, 0, 0, 0, 0, 0, 0, 0} }, {TONE_AMERICAN_RINGING, {DATA_RI, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, @@ -317,12 +322,12 @@ static struct pattern { {TONE_GERMAN_BUSY, {DATA_GA, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, {SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, - {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, + {3840, 3840, 0, 0, 0, 0, 0, 0, 0, 0} }, {TONE_GERMAN_OLDBUSY, {DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, {SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, - {1000, 5000, 0, 0, 0, 0, 0, 0, 0, 0} }, + {1000, 3800, 0, 0, 0, 0, 0, 0, 0, 0} }, {TONE_AMERICAN_BUSY, {DATA_BU, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, @@ -332,12 +337,12 @@ static struct pattern { {TONE_GERMAN_HANGUP, {DATA_GA, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, {SIZE_GA, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, - {4000, 4000, 0, 0, 0, 0, 0, 0, 0, 0} }, + {3840, 3840, 0, 0, 0, 0, 0, 0, 0, 0} }, {TONE_GERMAN_OLDHANGUP, {DATA_GO, DATA_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, {SIZE_GO, SIZE_S, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, - {1000, 5000, 0, 0, 0, 0, 0, 0, 0, 0} }, + {1000, 3800, 0, 0, 0, 0, 0, 0, 0, 0} }, {TONE_AMERICAN_HANGUP, {DATA_DT, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}, diff --git a/src/libmisdn/mISDNif.h b/src/libmisdn/mISDNif.h index d51ce6d..9e1ca5f 100644 --- a/src/libmisdn/mISDNif.h +++ b/src/libmisdn/mISDNif.h @@ -177,12 +177,13 @@ #define TONE_OFF 0x0000 #define TONE_GERMAN_DIALTONE 0x0001 #define TONE_GERMAN_OLDDIALTONE 0x0002 -#define TONE_AMERICAN_DIALTONE 0x0003 -#define TONE_GERMAN_DIALPBX 0x0004 -#define TONE_GERMAN_OLDDIALPBX 0x0005 -#define TONE_AMERICAN_DIALPBX 0x0006 -#define TONE_GERMAN_RINGING 0x0007 -#define TONE_GERMAN_OLDRINGING 0x0008 +#define TONE_GERMAN_MORSEDIALTONE 0x0003 +#define TONE_AMERICAN_DIALTONE 0x0004 +#define TONE_GERMAN_DIALPBX 0x0005 +#define TONE_GERMAN_OLDDIALPBX 0x0006 +#define TONE_AMERICAN_DIALPBX 0x0007 +#define TONE_GERMAN_RINGING 0x0008 +#define TONE_GERMAN_OLDRINGING 0x0009 #define TONE_AMERICAN_RINGPBX 0x000b #define TONE_GERMAN_RINGPBX 0x000c #define TONE_GERMAN_OLDRINGPBX 0x000d @@ -195,7 +196,7 @@ #define TONE_AMERICAN_HANGUP 0x0014 #define TONE_SPECIAL_INFO 0x0015 #define TONE_GERMAN_GASSENBESETZT 0x0016 -#define TONE_GERMAN_AUFSCHALTTON 0x0016 +#define TONE_GERMAN_AUFSCHALTTON 0x0017 /* MPH_INFORMATION_IND */ #define L1_SIGNAL_LOS_OFF 0x0010 diff --git a/src/libmisdnuser/include/mISDN/mISDNif.h b/src/libmisdnuser/include/mISDN/mISDNif.h index 310be44..78c67a6 100644 --- a/src/libmisdnuser/include/mISDN/mISDNif.h +++ b/src/libmisdnuser/include/mISDN/mISDNif.h @@ -181,12 +181,13 @@ #define TONE_OFF 0x0000 #define TONE_GERMAN_DIALTONE 0x0001 #define TONE_GERMAN_OLDDIALTONE 0x0002 -#define TONE_AMERICAN_DIALTONE 0x0003 -#define TONE_GERMAN_DIALPBX 0x0004 -#define TONE_GERMAN_OLDDIALPBX 0x0005 -#define TONE_AMERICAN_DIALPBX 0x0006 -#define TONE_GERMAN_RINGING 0x0007 -#define TONE_GERMAN_OLDRINGING 0x0008 +#define TONE_GERMAN_MORSEDIALTONE 0x0003 +#define TONE_AMERICAN_DIALTONE 0x0004 +#define TONE_GERMAN_DIALPBX 0x0005 +#define TONE_GERMAN_OLDDIALPBX 0x0006 +#define TONE_AMERICAN_DIALPBX 0x0007 +#define TONE_GERMAN_RINGING 0x0008 +#define TONE_GERMAN_OLDRINGING 0x0009 #define TONE_AMERICAN_RINGPBX 0x000b #define TONE_GERMAN_RINGPBX 0x000c #define TONE_GERMAN_OLDRINGPBX 0x000d @@ -199,7 +200,7 @@ #define TONE_AMERICAN_HANGUP 0x0014 #define TONE_SPECIAL_INFO 0x0015 #define TONE_GERMAN_GASSENBESETZT 0x0016 -#define TONE_GERMAN_AUFSCHALTTON 0x0016 +#define TONE_GERMAN_AUFSCHALTTON 0x0017 /* MPH_INFORMATION_IND */ #define L1_SIGNAL_LOS_OFF 0x0010