If a call fails, it fails...
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16318 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
eef55a55fb
commit
a86cce9149
|
@ -80,6 +80,7 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||
connect(&g_FSHost, SIGNAL(answered(QSharedPointer<Call>)), this, SLOT(answered(QSharedPointer<Call>)));
|
||||
connect(&g_FSHost, SIGNAL(hungup(QSharedPointer<Call>)), this, SLOT(hungup(QSharedPointer<Call>)));
|
||||
connect(&g_FSHost, SIGNAL(newOutgoingCall(QSharedPointer<Call>)), this, SLOT(newOutgoingCall(QSharedPointer<Call>)));
|
||||
connect(&g_FSHost, SIGNAL(callFailed(QSharedPointer<Call>)), this, SLOT(callFailed(QSharedPointer<Call>)));
|
||||
connect(&g_FSHost, SIGNAL(gwStateChange(QString,int)), this, SLOT(gwStateChanged(QString,int)));
|
||||
/*connect(&g_FSHost, SIGNAL(coreLoadingError(QString)), this, SLOT(coreLoadingError(QString)));*/
|
||||
|
||||
|
@ -286,6 +287,42 @@ void MainWindow::answered(QSharedPointer<Call> call)
|
|||
ui->dtmfPoundBtn->setEnabled(true);
|
||||
}
|
||||
|
||||
void MainWindow::callFailed(QSharedPointer<Call> call)
|
||||
{
|
||||
for (int i=0; i<ui->listCalls->count(); i++)
|
||||
{
|
||||
QListWidgetItem *item = ui->listCalls->item(i);
|
||||
if (item->data(Qt::UserRole).toString() == call.data()->getUUID())
|
||||
{
|
||||
delete ui->listCalls->takeItem(i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
ui->textEdit->setText(tr("Call with %1 (%2) failed with reason %3.").arg(call.data()->getCidName(),
|
||||
call.data()->getCidNumber(),
|
||||
call.data()->getCause()));
|
||||
/* TODO: Will cause problems if 2 calls are received at the same time */
|
||||
ui->answerBtn->setEnabled(false);
|
||||
ui->hangupBtn->setEnabled(false);
|
||||
ui->dtmf0Btn->setEnabled(false);
|
||||
ui->dtmf1Btn->setEnabled(false);
|
||||
ui->dtmf2Btn->setEnabled(false);
|
||||
ui->dtmf3Btn->setEnabled(false);
|
||||
ui->dtmf4Btn->setEnabled(false);
|
||||
ui->dtmf5Btn->setEnabled(false);
|
||||
ui->dtmf6Btn->setEnabled(false);
|
||||
ui->dtmf7Btn->setEnabled(false);
|
||||
ui->dtmf8Btn->setEnabled(false);
|
||||
ui->dtmf9Btn->setEnabled(false);
|
||||
ui->dtmfABtn->setEnabled(false);
|
||||
ui->dtmfBBtn->setEnabled(false);
|
||||
ui->dtmfCBtn->setEnabled(false);
|
||||
ui->dtmfDBtn->setEnabled(false);
|
||||
ui->dtmfAstBtn->setEnabled(false);
|
||||
ui->dtmfPoundBtn->setEnabled(false);
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::hungup(QSharedPointer<Call> call)
|
||||
{
|
||||
for (int i=0; i<ui->listCalls->count(); i++)
|
||||
|
|
|
@ -72,6 +72,7 @@ private slots:
|
|||
void ringing(QSharedPointer<Call>);
|
||||
void answered(QSharedPointer<Call>);
|
||||
void hungup(QSharedPointer<Call>);
|
||||
void callFailed(QSharedPointer<Call>);
|
||||
|
||||
private:
|
||||
Ui::MainWindow *ui;
|
||||
|
|
Loading…
Reference in New Issue