Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flexydial
/
hdfc-beu-v2
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
0361b189
authored
2019-02-08 14:38:55 +0000
by
Manish Mihsra
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Added Attended Transfer Logic and made required changes
1 parent
74336949
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
20 additions
and
59 deletions
application/app/Http/Controllers/DialerController.php
application/app/Jobs/KPAMIListen.php
application/app/Models/Kqueue.php
application/public/assets/extras/data/asterisk/extensions.conf
application/public/assets/js/dialer.js
application/resources/views/layout/top_menu.blade.php
application/app/Http/Controllers/DialerController.php
View file @
0361b18
...
...
@@ -497,18 +497,18 @@ if($action=="transfercall")
$olddialline
=
Dialline
::
find
(
$oldcrmcall
->
dialline_id
);
$dspan
=
"1"
;
if
(
$olddialline
)
$dspan
=
$olddialline
->
dspan
;
$dialline
=
Dialline
::
where
(
"status"
,
"="
,
"Free"
)
->
where
(
"enabled"
,
"="
,
"1"
);
if
(
$dspan
!=
""
)
$dialline
=
$dialline
->
where
(
'dspan'
,
'='
,
$dspan
);
$dialline
=
$dialline
->
orderBy
(
'updated_at'
,
'ASC'
)
->
first
();
//
$dialline=Dialline::where("status","=","Free")->where("enabled","=","1");
//
if($dspan!="")$dialline=$dialline->where('dspan','=',$dspan);
//
$dialline=$dialline->orderBy('updated_at','ASC')->first();
if
(
$dialline
)
if
(
$
old
dialline
)
{
$callerid
=
$oldcrmcall
->
did
;
$dialline
->
status
=
"transfer"
;
$dialline
->
channel
=
$olddialline
->
channel
;
$dialline
->
save
();
//
$dialline->status="transfer";
//
$dialline->channel=$olddialline->channel;
//
$dialline->save();
$nowts
=
microtime
(
true
)
*
1000
;
...
...
@@ -521,10 +521,10 @@ if($action=="transfercall")
$crmcall
->
client
=
$oldcrmcall
->
client
;
$crmcall
->
department
=
$oldcrmcall
->
department
;
$crmcall
->
state
=
'New'
;
$crmcall
->
userstatus
=
'
Conference
'
;
$crmcall
->
usersubstatus
=
'
Conference
'
;
$crmcall
->
type
=
'
Conference
'
;
$crmcall
->
dialline_id
=
$dialline
->
id
;
$crmcall
->
userstatus
=
'
Transfer
'
;
$crmcall
->
usersubstatus
=
'
Transfer
'
;
$crmcall
->
type
=
'
Transfer
'
;
//
$crmcall->dialline_id=$dialline->id;
$crmcall
->
setTs
(
'ts_Wait'
,
$nowts
);
$crmcall
->
setTs
(
'ts_Call'
,
$nowts
);
...
...
@@ -537,7 +537,7 @@ if($action=="transfercall")
$newqueue
=
new
Kqueue
();
$newqueue
->
transferCall
(
$sipid
,
$callnumber
,
$callerid
,
$crmcall
,
$dialline
);
$newqueue
->
transferCall
(
$sipid
,
$callnumber
,
$callerid
,
$crmcall
,
$
old
dialline
);
//start actual calls
// $newqueue=new Kqueue();
...
...
application/app/Jobs/KPAMIListen.php
View file @
0361b18
...
...
@@ -850,7 +850,7 @@ class KPAMIListen implements IEventListener
//notify UI (only the sip id)
$newqueue
=
new
Kqueue
();
$newqueue
->
sipNotify
(
$tsip
,
"dialerUI"
,
"dialend"
,
"c"
,
$crmcall
->
id
.
"~"
.
$crmcall
->
number
.
"~"
.
base64_encode
(
$
d
channel
));
$newqueue
->
sipNotify
(
$tsip
,
"dialerUI"
,
"dialend"
,
"c"
,
$crmcall
->
id
.
"~"
.
$crmcall
->
number
.
"~"
.
base64_encode
(
$channel
));
$crmcall
->
addEventLog
(
$nowts
,
"
$accountcode
:Unknown :
$eventname
$dchannelstate
:
$dchannelstatedesc
$duniqueid
$dexten
:
$dpriority
$dchannel
$dialstatus
"
);
...
...
@@ -886,40 +886,6 @@ class KPAMIListen implements IEventListener
}
}
else
if
(
$accountcodearr
[
1
]
==
"t"
)
// Code Added by AmolG: AutoDial
{
$crmcall
=
CRMCall
::
find
(
$accountcodearr
[
2
]);
if
(
$crmcall
)
{
$nowts
=
microtime
(
true
)
*
1000
;
$crmcall
->
setTs
(
'ts_Talk'
,
$nowts
);
$crmcall
->
state
=
$eventname
;
$crmcall
->
status
=
$dialstatus
;
$crmcall
->
uniqueid
=
$uniqueid
;
$dialline
=
Dialline
::
find
(
$crmcall
->
dialline_id
);
if
(
$dialline
&&
$dialstatus
==
"ANSWER"
)
{
// $tsip=Sipid::find($crmcall->sipid_id);
// $newqueue=new Kqueue();
// $newqueue->channelRedirectToExten($tsip->server,$dchannel,"1004".$tsip->id."|".$dialline->channel,"confTransfer","1");
$dialline
->
channel
=
$dchannel
;
$dialline
->
uniqueid
=
$uniqueid
;
$dialline
->
status
=
"transfer"
;
$dialline
->
save
();
}
$crmcall
->
addEventLog
(
$nowts
,
"
$accountcode
:Unknown :
$eventname
$dchannelstate
:
$dchannelstatedesc
$duniqueid
$dexten
:
$dpriority
$dchannel
$dialstatus
"
);
$crmcall
->
type
=
"transferred"
;
$crmcall
->
save
();
}
}
}
}
}
...
...
@@ -1780,7 +1746,7 @@ if($crmcall->did=='46130234'){
}
else
if
(
$tqueue
->
key
==
"transfer"
)
{
$blindtransferaction
=
new
BlindTransferAction
(
$data
[
'channel'
],
$data
[
'exten'
],
$data
[
'context'
]
);
$blindtransferaction
=
new
AttendedTransferAction
(
$data
[
'channel'
],
$data
[
'exten'
],
$data
[
'context'
],
"1"
);
$res
=
$this
->
_client
->
send
(
$blindtransferaction
);
}
...
...
application/app/Models/Kqueue.php
View file @
0361b18
...
...
@@ -88,7 +88,7 @@ class Kqueue extends Model{
$odata['VARS']['callnumber']=$callnumber;*/
$odata
[
'channel'
]
=
$channel
;
$odata
[
'exten'
]
=
"1003"
.
$
dialline
->
dialstr
.
$
callnumber
;
$odata
[
'exten'
]
=
"1003"
.
$callnumber
;
$odata
[
'context'
]
=
"initiateTransfer"
;
$odata
[
'priority'
]
=
1
;
...
...
application/public/assets/extras/data/asterisk/extensions.conf
View file @
0361b18
...
...
@@ -49,8 +49,8 @@ exten => _X!,n,ConfBridge(${CHANNEL})
exten
=>
_
X
!,
n
,
Hangup
[
initiateTransfer
]
exten
=>
_
X
!,
n
,
Dial
(
${
EXTEN
:
4
},
30
,
tT
)
exten
=>
_
X
!,
n
,
Hangup
exten
=>
_
1003
XXXXXXXXXX
!,
1
,
Dial
(
SIP
/
GATEWAY
/
${
EXTEN
:
4
},
30
,
tT
)
exten
=>
_
1003
XXXXXXXXX
X
!,
n
,
Hangup
;
exten
=>
_
X
!,
1
,
Answer
;
exten
=>
_
X
!,
n
,
Verbose
(${
CALLERID
(
num
)}${
dialstr
}${
chnl
})
...
...
application/public/assets/js/dialer.js
View file @
0361b18
...
...
@@ -1247,11 +1247,6 @@ function dialerTimersUpdate()
saveCloseDialerCall
(
'AUTOWRAPUP'
);
}
if
(
thiswraptime
==
90
||
thiswraptime
==
300
)
{
showWrapUp
();
}
dispD
=
"Wrapup : "
+
thiswraptime
;
$
(
"#spandialer_ts"
).
html
(
dispD
);
$
(
"#dialertimes1"
).
removeClass
(
"btn-default"
).
addClass
(
"btn-primary"
);
...
...
@@ -2247,7 +2242,7 @@ function dialerSipMsg(omsg)
{
try
{
if
(
omsg
.
ao_headers
[
6
].
s_name
==
'kstych-
d
ata'
)
if
(
omsg
.
ao_headers
[
6
].
s_name
==
'kstych-
D
ata'
)
{
var
vparts
=
omsg
.
ao_headers
[
6
].
s_value
.
split
(
"|"
);
...
...
application/resources/views/layout/top_menu.blade.php
View file @
0361b18
...
...
@@ -380,8 +380,8 @@ $("#"+divid).html(searchRecordDivHTML);
doAjax
(
'dialer?action=transfercall&confnumber='
+
confnumber
,
datastr
,
'__fake__div__'
,
'ajax_confdial'
,
'singlefail'
,
'POST'
,
function
(
retstr
){
if
(
retstr
.
responseText
.
indexOf
(
'Error'
)
<
0
)
{
kcallSetConnection
(
confnumber
,
'callid'
,
retstr
.
responseText
);
kcallSetConnection
(
confnumber
,
'ts_Call'
,
getNowTS
());
//
kcallSetConnection(confnumber,'callid',retstr.responseText);
//
kcallSetConnection(confnumber,'ts_Call',getNowTS());
updateDialerState
();
}
...
...
Write
Preview
Styling with
Markdown
is supported
Attach a file
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 post a comment