Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
BoxDialer
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
Kulya
BoxDialer
Commits
21783b00
Commit
21783b00
authored
Sep 08, 2023
by
Muhammadali
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
version1.2.5
parent
b23b26b7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
49 deletions
+42
-49
package.json
package.json
+1
-1
index.jsx
src/components/ModalPhoneNumpad/index.jsx
+16
-17
boxDIaler.js
src/lib/boxDIaler.js
+25
-31
No files found.
package.json
View file @
21783b00
{
"name"
:
"boxdialer"
,
"version"
:
"1.2.
4
"
,
"version"
:
"1.2.
5
"
,
"description"
:
""
,
"main"
:
"src/boxDialer.js"
,
"scripts"
:
{
...
...
src/components/ModalPhoneNumpad/index.jsx
View file @
21783b00
...
...
@@ -36,17 +36,16 @@ const ModalPhoneNumpad = ({
// }, [call_history]);
const
addNumberStorage
=
({
number
})
=>
{
let
stringNumber
=
number
.
toString
()
||
''
;
let
storageNumbers
=
// (localStorage.getItem('call_history') &&
// JSON.parse(localStorage.getItem('call_history'))) ||
// [];
console
.
log
(
stringNumber
,
null
===
localStorage
.
getItem
(
'
call_history
'
),
typeof
[],
);
// let stringNumber = number.toString() || '';
// let storageNumbers =
// // (localStorage.getItem('call_history') &&
// // JSON.parse(localStorage.getItem('call_history'))) ||
// // [];
// // console.log(
// // stringNumber,
// // null === localStorage.getItem('call_history'),
// // typeof [],
// // );
// localStorage.setItem('call_history', [
// stringNumber,
// ,
...
...
src/lib/boxDIaler.js
View file @
21783b00
...
...
@@ -28,6 +28,7 @@ export class BoxDialer {
ringtone
;
ringbacktone
;
sipState
;
sipBxState
;
soundBool
;
onSipStateChange
=
{};
callEvetsBoxDialer
;
...
...
@@ -211,6 +212,18 @@ export class BoxDialer {
this
.
oSipSessionRegister
.
register
();
}
getBxUiState
(
sipState
)
{
if
(
sipState
&&
!!
sipState
.
length
)
sipState
=
this
.
sipState
;
let
uiStates
=
{
stack_i_new_call
:
'
connectingIncoming
'
,
call_connected
:
'
connectingOutgoing
'
,
call_m_stream_audio_remote_added
:
'
connected
'
,
call_i_ao_request
:
'
connectingOutgoing
'
,
};
return
sipState
&&
uiStates
[
sipState
]
?
uiStates
[
sipState
]
:
'
idle
'
;
}
callBxMethods
({
bxMethodName
,
bxFuncParams
,
callback
})
{
if
(
window
.
BX24
&&
window
.
BX24
.
placement
)
{
window
?.
BX24
.
placement
.
call
(
bxMethodName
,
bxFuncParams
,
callback
);
...
...
@@ -221,34 +234,13 @@ export class BoxDialer {
setGuiPhoneState
({
stateCode
,
funcName
,
funcParam
})
{
if
(
window
?.
alovoice_wsphone
)
{
let
uiState
=
false
;
switch
(
stateCode
)
{
case
'
i_new_call
'
:
uiState
=
'
incoming
'
;
break
;
case
'
call_connected
'
:
uiState
=
'
connectingOutgoing
'
;
break
;
case
'
call_m_stream_audio_remote_added
'
:
uiState
=
'
connected
'
;
break
;
case
'
call_i_ao_request
'
:
uiState
=
'
connectingOutgoing
'
;
break
;
default
:
break
;
}
if
(
uiState
)
{
this
.
callBxMethods
({
bxMethodName
:
'
CallCardSetUiState
'
,
bxFuncParams
:
{
uiState
},
bxFuncParams
:
{
uiState
:
this
.
getBxUiState
(
stateCode
)
},
callback
:
(
e
)
=>
{
console
.
log
(
e
,
`CallCardSetUiState method done
${
e
}
`
);
},
});
}
}
else
if
(
funcName
&&
this
.
onSipStateChange
[
funcName
]
!==
'
undefined
'
)
{
this
.
onSipStateChange
[
funcName
](
funcParam
);
}
...
...
@@ -261,6 +253,8 @@ export class BoxDialer {
this
.
sipState
=
type
+
'
_
'
+
event
?.
type
;
console
.
log
(
'
---onSessionEvent EVENT [
'
+
this
.
sipState
+
'
]
'
,
event
);
this
.
setGuiPhoneState
({
stateCode
:
this
.
sipState
});
switch
(
this
.
sipState
)
{
case
'
register_stopping
'
:
case
'
register_stoped
'
:
...
...
@@ -299,11 +293,11 @@ export class BoxDialer {
break
;
case
'
call_m_stream_audio_remote_added
'
:
case
'
call_connected
'
:
this
.
setGuiPhoneState
({
stateCode
:
this
.
sipState
});
//
this.setGuiPhoneState({ stateCode: this.sipState });
// QORA EKRANDA ULANYAPTI.. SOZINI VAHTGA OZGARTIRISH KERE ( SEKKUNDAMER )
break
;
case
'
call_i_ao_request
'
:
this
.
setGuiPhoneState
({
stateCode
:
this
.
sipState
});
//
this.setGuiPhoneState({ stateCode: this.sipState });
break
;
case
'
hangup_terminating
'
:
...
...
@@ -340,7 +334,7 @@ export class BoxDialer {
this
.
oSipSessionCall
.
setConfiguration
(
this
.
oConfigCall
);
this
.
onSoundType
({
type
:
'
ring
'
,
bool
:
true
});
this
.
setGuiPhoneState
({
stateCode
:
'
i_new_call
'
,
//
stateCode: 'i_new_call',
funcName
:
'
modalState
'
,
funcParam
:
{
bool
:
true
,
...
...
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