Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
fab8e0d5
提交
fab8e0d5
authored
4月 15, 2010
作者:
Joao Mesquita
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix some things on the console and start implementing the transfer.
上级
0f29f461
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
31 行增加
和
6 行删除
+31
-6
call.cpp
fscomm/call.cpp
+6
-0
call.h
fscomm/call.h
+4
-1
consolewindow.cpp
fscomm/debugtools/consolewindow.cpp
+17
-3
mainwindow.cpp
fscomm/mainwindow.cpp
+3
-2
mainwindow.h
fscomm/mainwindow.h
+1
-0
没有找到文件。
fscomm/call.cpp
浏览文件 @
fab8e0d5
...
@@ -112,3 +112,9 @@ QTime Call::getCurrentStateTime()
...
@@ -112,3 +112,9 @@ QTime Call::getCurrentStateTime()
int
now
=
QDateTime
::
fromTime_t
(
time
).
secsTo
(
QDateTime
::
currentDateTime
());
int
now
=
QDateTime
::
fromTime_t
(
time
).
secsTo
(
QDateTime
::
currentDateTime
());
return
QTime
::
fromString
(
QString
::
number
(
now
),
"s"
);
return
QTime
::
fromString
(
QString
::
number
(
now
),
"s"
);
}
}
/*bool Call::transfer()
{
g_FSHost.sendCmd("uuid_bridge", "")
}*/
fscomm/call.h
浏览文件 @
fab8e0d5
...
@@ -38,7 +38,8 @@ typedef enum {
...
@@ -38,7 +38,8 @@ typedef enum {
FSCOMM_CALL_STATE_RINGING
=
0
,
FSCOMM_CALL_STATE_RINGING
=
0
,
FSCOMM_CALL_STATE_TRYING
=
1
,
FSCOMM_CALL_STATE_TRYING
=
1
,
FSCOMM_CALL_STATE_ANSWERED
=
2
,
FSCOMM_CALL_STATE_ANSWERED
=
2
,
FSCOMM_CALL_STATE_FAILED
=
3
FSCOMM_CALL_STATE_FAILED
=
3
,
FSCOMM_CALL_STATE_TRANSFER
=
4
}
fscomm_call_state_t
;
}
fscomm_call_state_t
;
typedef
enum
{
typedef
enum
{
...
@@ -76,6 +77,8 @@ public:
...
@@ -76,6 +77,8 @@ public:
void
setAnsweredEpoch
(
qulonglong
time
)
{
_answeredEpoch
=
time
/
1000000
;
}
void
setAnsweredEpoch
(
qulonglong
time
)
{
_answeredEpoch
=
time
/
1000000
;
}
QTime
getCurrentStateTime
();
QTime
getCurrentStateTime
();
/*bool transfer();*/
private
:
private
:
QSharedPointer
<
Channel
>
_channel
;
/* This should be our portaudio channel */
QSharedPointer
<
Channel
>
_channel
;
/* This should be our portaudio channel */
QSharedPointer
<
Channel
>
_otherLegChannel
;
QSharedPointer
<
Channel
>
_otherLegChannel
;
...
...
fscomm/debugtools/consolewindow.cpp
浏览文件 @
fab8e0d5
...
@@ -105,9 +105,23 @@ void ConsoleWindow::cmdSendClicked()
...
@@ -105,9 +105,23 @@ void ConsoleWindow::cmdSendClicked()
QString
res
;
QString
res
;
g_FSHost
.
sendCmd
(
cmd
.
toAscii
().
data
(),
args
.
toAscii
().
data
(),
&
res
);
g_FSHost
.
sendCmd
(
cmd
.
toAscii
().
data
(),
args
.
toAscii
().
data
(),
&
res
);
QStandardItem
*
item
=
new
QStandardItem
(
res
);
if
(
!
res
.
isEmpty
())
item
->
setData
(
SWITCH_LOG_CONSOLE
,
ConsoleModel
::
LogLevelRole
);
{
addNewConsoleItem
(
item
);
/* Remove \r\n */
QStringList
textList
=
res
.
split
(
QRegExp
(
"(
\r
+)"
),
QString
::
SkipEmptyParts
);
QString
final_str
;
for
(
int
line
=
0
;
line
<
textList
.
size
();
line
++
)
{
final_str
+=
textList
[
line
];
}
QStringList
lines
=
final_str
.
split
(
QRegExp
(
"(
\n
+)"
),
QString
::
SkipEmptyParts
);
for
(
int
line
=
0
;
line
<
lines
.
size
();
++
line
)
{
QStandardItem
*
item
=
new
QStandardItem
(
lines
[
line
]);
item
->
setData
(
SWITCH_LOG_CONSOLE
,
ConsoleModel
::
LogLevelRole
);
addNewConsoleItem
(
item
);
}
}
ui
->
lineCmd
->
clear
();
ui
->
lineCmd
->
clear
();
}
}
...
...
fscomm/mainwindow.cpp
浏览文件 @
fab8e0d5
...
@@ -101,6 +101,7 @@ MainWindow::MainWindow(QWidget *parent) :
...
@@ -101,6 +101,7 @@ MainWindow::MainWindow(QWidget *parent) :
connect
(
ui
->
hangupBtn
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
paHangup
()));
connect
(
ui
->
hangupBtn
,
SIGNAL
(
clicked
()),
this
,
SLOT
(
paHangup
()));
connect
(
ui
->
recoredCallBtn
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
recordCall
(
bool
)));
connect
(
ui
->
recoredCallBtn
,
SIGNAL
(
toggled
(
bool
)),
SLOT
(
recordCall
(
bool
)));
connect
(
ui
->
btnHold
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
holdCall
(
bool
)));
connect
(
ui
->
btnHold
,
SIGNAL
(
toggled
(
bool
)),
this
,
SLOT
(
holdCall
(
bool
)));
/*connect(ui->btnTransfer, SIGNAL(clicked()), this, SLOT(transferCall()));*/
connect
(
ui
->
tableCalls
,
SIGNAL
(
itemDoubleClicked
(
QTableWidgetItem
*
)),
this
,
SLOT
(
callTableDoubleClick
(
QTableWidgetItem
*
)));
connect
(
ui
->
tableCalls
,
SIGNAL
(
itemDoubleClicked
(
QTableWidgetItem
*
)),
this
,
SLOT
(
callTableDoubleClick
(
QTableWidgetItem
*
)));
connect
(
ui
->
action_Preferences
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
prefTriggered
()));
connect
(
ui
->
action_Preferences
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
prefTriggered
()));
connect
(
ui
->
action_Exit
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
close
()));
connect
(
ui
->
action_Exit
,
SIGNAL
(
triggered
()),
this
,
SLOT
(
close
()));
...
@@ -280,9 +281,9 @@ void MainWindow::callTableDoubleClick(QTableWidgetItem *item)
...
@@ -280,9 +281,9 @@ void MainWindow::callTableDoubleClick(QTableWidgetItem *item)
void
MainWindow
::
makeCall
()
void
MainWindow
::
makeCall
()
{
{
bool
ok
;
bool
ok
=
true
;
QString
dialstring
=
QInputDialog
::
getText
(
this
,
tr
(
"Make new call"
),
QString
dialstring
=
QInputDialog
::
getText
(
this
,
tr
(
"Make new call"
),
tr
(
"Number to dial:"
),
QLineEdit
::
Normal
,
NULL
,
&
ok
);
tr
(
"Number to dial:"
),
QLineEdit
::
Normal
,
NULL
,
&
ok
);
QSharedPointer
<
Account
>
acc
=
g_FSHost
.
getCurrentDefaultAccount
();
QSharedPointer
<
Account
>
acc
=
g_FSHost
.
getCurrentDefaultAccount
();
if
(
!
acc
.
isNull
())
{
if
(
!
acc
.
isNull
())
{
...
...
fscomm/mainwindow.h
浏览文件 @
fab8e0d5
...
@@ -77,6 +77,7 @@ private slots:
...
@@ -77,6 +77,7 @@ private slots:
void
callFailed
(
QSharedPointer
<
Call
>
);
void
callFailed
(
QSharedPointer
<
Call
>
);
void
recordCall
(
bool
);
void
recordCall
(
bool
);
void
holdCall
(
bool
);
void
holdCall
(
bool
);
/*void transferCall();*/
void
setDefaultAccount
();
void
setDefaultAccount
();
void
accountAdd
(
QSharedPointer
<
Account
>
);
void
accountAdd
(
QSharedPointer
<
Account
>
);
void
accountDel
(
QSharedPointer
<
Account
>
);
void
accountDel
(
QSharedPointer
<
Account
>
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论