diff --git a/libvoice/libvoice.h b/libvoice/libvoice.h index 55a6fd9569cca8dd866973ea2319f537d76933a0..7e2cea93a9e46a059fe153bb8bf7fb1b0a19e2c9 100644 --- a/libvoice/libvoice.h +++ b/libvoice/libvoice.h @@ -156,6 +156,7 @@ struct line_t { pe_list_t *pending_digits; // List of keypad digits waiting to be sent enum PAGING_STATUS paging_status; // Line's paging status #define VOICEMNGR_LINE_FLAG_NARROW_BAND_ONLY 0x1 +#define VOICEMNGR_LINE_FLAG_OVERLAP_DIALING 0x2 uint32_t flags; void *priv; // Platform dependent data diff --git a/line-dect.c b/line-dect.c index 9064d4402770e3188d8e70b647b268cbb9553505..eeeec49791e1f8054e5b9823b0a55636e0322ac4 100644 --- a/line-dect.c +++ b/line-dect.c @@ -180,6 +180,12 @@ int simulate_digits_pressing(int line, const char *pressed_digits) { if(lines[line].type != VOICE_LINE_DECT) return 0; + if (!pressed_digits) { + ENDPT_DBG("line: %d overlap dialing\n", line); + lines[line].flags |= VOICEMNGR_LINE_FLAG_OVERLAP_DIALING; + return 0; + } + ENDPT_DBG("line: %d pressed_digits: %s\n", line, (pressed_digits ? pressed_digits : "")); // Store digits in a list. diff --git a/line.c b/line.c index bc340d296685cbcef4ae2cf24b5d56384d8207dc..242262f0639a174aaccd81c2186258cc20fbdfbe 100644 --- a/line.c +++ b/line.c @@ -99,7 +99,7 @@ static int perhaps_simulate_busy(int line, struct voice_ubus_req_t *ubus_req) } //---------------------------------------------------------------------------------- // DECT handset tone trigger -static int dect_tone_play(int line, int pcm, enum VOICE_SIGNAL signal, const char *data, struct voice_ubus_req_t *ubus_req) +/*static int dect_tone_play(int line, int pcm, enum VOICE_SIGNAL signal, const char *data, struct voice_ubus_req_t *ubus_req) { struct line_req_t *line_req = NULL; ENDPT_DBG("line=%d, pcm=%d, data=%s\n", line, pcm, data); @@ -136,7 +136,7 @@ static int dect_tone_play(int line, int pcm, enum VOICE_SIGNAL signal, const cha line_req->ubus.reqIn = NULL; return 0; -} +}*/ static void setCLIDinfo(const char *data, struct line_req_t *line_req) { @@ -390,15 +390,10 @@ int line_signal(int line, const char *signame, const char *data, struct voice_ub case VOICE_SIG_NETBUSY: if (lines[line].type == VOICE_LINE_DECT) { pcm_states_dump(__func__, line); - if (get_callid_state(lines[line].pcm_callid[PCM_0])==CALLID_ESTABLISHED && get_callid_state(lines[line].pcm_callid[PCM_1])==CALLID_ESTABLISHED){ + if (get_callid_state(lines[line].pcm_callid[PCM_0])==CALLID_ESTABLISHED && get_callid_state(lines[line].pcm_callid[PCM_1])==CALLID_ESTABLISHED) send_dect_event_to_asterisk(line, dect_event_map[DECT_EVT_RELEASE]); - } else if (get_callid_state(lines[line].pcm_callid[PCM_0]) == CALLID_ESTABLISHED || get_callid_state(lines[line].pcm_callid[PCM_1]) == CALLID_ESTABLISHED){ - // play tone on DECT - res = dect_tone_play(line, get_callid_state(lines[line].pcm_callid[PCM_0]) == CALLID_ESTABLISHED ? PCM_0 : PCM_1, sig->signal, data, ubus_req); - } else { - // In other cases, just play the tone on DECT by DSP in the same way as FXS + else res = voice_line_signal(line, -1, sig->signal, atoi(data), NULL); - } } else { res = voice_line_signal(line, -1, sig->signal, atoi(data), NULL); } diff --git a/main.c b/main.c index 16b91327e66612983caa518aa34bd68d73e05852..c288beed9b9b368712cf6a7a60967bfdb83845ce 100644 --- a/main.c +++ b/main.c @@ -213,6 +213,7 @@ static void voicemngr_event_report(int line, const char *event, const char *data msg->name = event; msg->data = data; msg->line = line; + ENDPT_ERR("%s: event: %s, data: %s, line: %d\n", __func__, msg->name ? msg->name : "null", msg->data ? msg->data : "null", msg->line); send_event_main(msg, EVENT_MAIN_LINE); } }