Fix closing rtp ports after call finished in chan_unistim.
Fix ASTERISK-26565 by adding ast_rtp_instance_stop before rtp instance destroy for chan_unistim. Also several fixes for displayed text translation. Change-Id: If42a03eea09bd1633471406bdc829cf98bf6affc
This commit is contained in:
parent
3d5c61d2e0
commit
dfb951817f
|
@ -4127,7 +4127,7 @@ static void show_main_page(struct unistimsession *pte)
|
||||||
send_date_time2(pte);
|
send_date_time2(pte);
|
||||||
send_idle_clock(pte);
|
send_idle_clock(pte);
|
||||||
if (strlen(pte->device->maintext0)) {
|
if (strlen(pte->device->maintext0)) {
|
||||||
send_text(TEXT_LINE0, TEXT_NORMAL, pte, pte->device->maintext0);
|
send_text(TEXT_LINE0, TEXT_NORMAL, pte, ustmtext(pte->device->maintext0, pte));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (pte->device->missed_call == 1) {
|
if (pte->device->missed_call == 1) {
|
||||||
|
@ -4146,11 +4146,11 @@ static void show_main_page(struct unistimsession *pte)
|
||||||
strcat(tmpbuf, ast_inet_ntoa(pte->sin.sin_addr));
|
strcat(tmpbuf, ast_inet_ntoa(pte->sin.sin_addr));
|
||||||
send_text(TEXT_LINE2, TEXT_NORMAL, pte, tmpbuf);
|
send_text(TEXT_LINE2, TEXT_NORMAL, pte, tmpbuf);
|
||||||
} else {
|
} else {
|
||||||
send_text(TEXT_LINE2, TEXT_NORMAL, pte, pte->device->maintext2);
|
send_text(TEXT_LINE2, TEXT_NORMAL, pte, ustmtext(pte->device->maintext2, pte));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
send_texttitle(pte, pte->device->titledefault);
|
send_texttitle(pte, ustmtext(pte->device->titledefault, pte));
|
||||||
change_favorite_icon(pte, FAV_LINE_ICON);
|
change_favorite_icon(pte, FAV_LINE_ICON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4405,7 +4405,7 @@ static void init_phone_step2(struct unistimsession *pte)
|
||||||
strcat(tmp, pte->macaddr);
|
strcat(tmp, pte->macaddr);
|
||||||
send_text(TEXT_LINE2, TEXT_NORMAL, pte, tmp);
|
send_text(TEXT_LINE2, TEXT_NORMAL, pte, tmp);
|
||||||
send_text_status(pte, "");
|
send_text_status(pte, "");
|
||||||
send_texttitle(pte, "UNISTIM for*");
|
send_texttitle(pte, ustmtext("UNISTIM for*", pte));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4895,14 +4895,15 @@ static int unistim_hangup_clean(struct ast_channel *ast, struct unistim_subchann
|
||||||
ast_channel_tech_pvt_set(ast, NULL);
|
ast_channel_tech_pvt_set(ast, NULL);
|
||||||
unistim_set_owner(sub, NULL);
|
unistim_set_owner(sub, NULL);
|
||||||
sub->alreadygone = 0;
|
sub->alreadygone = 0;
|
||||||
ast_mutex_unlock(&sub->lock);
|
|
||||||
if (sub->rtp) {
|
if (sub->rtp) {
|
||||||
if (unistimdebug) {
|
if (unistimdebug) {
|
||||||
ast_verb(0, "Destroying RTP session\n");
|
ast_verb(0, "Destroying RTP session\n");
|
||||||
}
|
}
|
||||||
|
ast_rtp_instance_stop(sub->rtp);
|
||||||
ast_rtp_instance_destroy(sub->rtp);
|
ast_rtp_instance_destroy(sub->rtp);
|
||||||
sub->rtp = NULL;
|
sub->rtp = NULL;
|
||||||
}
|
}
|
||||||
|
ast_mutex_unlock(&sub->lock);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue