Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
U
util
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘旋尧
util
Commits
1e20ff83
Commit
1e20ff83
authored
Jul 28, 2016
by
usual2970
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加取消通话接口
parent
ccae4c34
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletions
+27
-1
tel.go
service/controllers/tel.go
+27
-1
No files found.
service/controllers/tel.go
View file @
1e20ff83
...
...
@@ -32,7 +32,7 @@ func (c *TelController) Dial() {
if
err
!=
nil
{
rs
.
ErrNo
=
"2"
rs
.
Msg
=
"拨打失败"
break
;
break
}
rs
.
Data
=
resp
...
...
@@ -42,3 +42,29 @@ func (c *TelController) Dial() {
c
.
Data
[
"json"
]
=
rs
c
.
ServeJSON
()
}
func
(
c
*
TelController
)
Cancel
(){
rs
:=&
models
.
Result
{
"0"
,
"success"
,
nil
}
for
{
from
,
to
:=
""
,
""
sessionId
:=
c
.
GetString
(
"sessionId"
)
if
sessionId
==
""
{
rs
.
ErrNo
=
"1"
rs
.
Msg
=
"请提交会话ID"
break
}
telObj
:=
tel
.
NewTel
(
from
,
to
)
resp
,
err
:=
telObj
.
Cancel
(
sessionId
)
if
err
!=
nil
{
rs
.
ErrNo
=
"2"
rs
.
Msg
=
"取消失败"
break
}
rs
.
Data
=
resp
break
}
c
.
Data
[
"json"
]
=
rs
c
.
ServeJSON
()
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment