Commit 360f0efa authored by Muhammadali's avatar Muhammadali

update add code for sipRegister isIce

parent 35ebde2a
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "0.8.0", "version": "0.8.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "boxdialer", "name": "boxdialer",
"version": "0.8.0", "version": "0.8.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@emotion/react": "^11.11.1", "@emotion/react": "^11.11.1",
......
{ {
"name": "boxdialer", "name": "boxdialer",
"version": "0.8.1", "version": "0.8.2",
"description": "", "description": "",
"main": "src/boxDialer.js", "main": "src/boxDialer.js",
"scripts": { "scripts": {
......
/** @format */ /** @format */
import React from 'react'; import React from 'react';
import DefaultWidjetStyle, {DialPadIcon} from './style'; import DefaultWidjetStyle, { DialPadIcon } from './style';
import TimerUi from '../TimerUi'; import TimerUi from '../TimerUi';
const DefaultWidjet = ({ const DefaultWidjet = ({
...@@ -10,19 +10,19 @@ const DefaultWidjet = ({ ...@@ -10,19 +10,19 @@ const DefaultWidjet = ({
reason, reason,
widjetVersion, widjetVersion,
leftTime, leftTime,
onClick onClick,
}) => { }) => {
return ( return (
<DefaultWidjetStyle status={widjetState} onClick={onClick}> <DefaultWidjetStyle status={widjetState} onClick={onClick}>
<div className='left'> <div className='left'>
<p className='title'>{phoneNumber}</p> <p className='title'>{phoneNumber}</p>
<p> <p>
<span className='status'>{widjetState}</span> <span className='status'>{widjetState}</span>
<TimerUi reason={reason} time={leftTime}/> <TimerUi reason={reason} time={leftTime} />
</p> </p>
</div> </div>
<div className='right'> <div className='right'>
<DialPadIcon/> <DialPadIcon />
</div> </div>
<div className='bottom'> <div className='bottom'>
<DefaultWidjetStyle.StatusLine status={widjetState}> <DefaultWidjetStyle.StatusLine status={widjetState}>
......
...@@ -11,6 +11,7 @@ import PauseIcon from '@mui/icons-material/Pause'; ...@@ -11,6 +11,7 @@ import PauseIcon from '@mui/icons-material/Pause';
import SendToMobileIcon from '@mui/icons-material/SendToMobile'; import SendToMobileIcon from '@mui/icons-material/SendToMobile';
import DialpadIcon from '@mui/icons-material/Dialpad'; import DialpadIcon from '@mui/icons-material/Dialpad';
import CallCardDropDown from '../CallCardDropDown'; import CallCardDropDown from '../CallCardDropDown';
const Modal = ({ const Modal = ({
children, children,
hidden, hidden,
......
...@@ -153,7 +153,7 @@ export class BoxDialer { ...@@ -153,7 +153,7 @@ export class BoxDialer {
} }
} }
sipRegister = ({ number, secret, wsurl }) => { sipRegister = ({ number, secret, wsurl, isIce }) => {
try { try {
Notification.requestPermission(); Notification.requestPermission();
...@@ -174,7 +174,7 @@ export class BoxDialer { ...@@ -174,7 +174,7 @@ export class BoxDialer {
display_name: number, //'3003', display_name: number, //'3003',
websocket_proxy_url: `wss://${wsurl}/ws`, //'wss://cld.alovoice.uz:61040/ws', websocket_proxy_url: `wss://${wsurl}/ws`, //'wss://cld.alovoice.uz:61040/ws',
// outbound_proxy_url: '', //(window.localStorage ? window.localStorage.getItem('org.doubango.expert.sip_outboundproxy_url') : null), // outbound_proxy_url: '', //(window.localStorage ? window.localStorage.getItem('org.doubango.expert.sip_outboundproxy_url') : null),
ice_servers: [{ url: 'stun:stun.l.google.com:19302' }], //(window.localStorage ? window.localStorage.getItem('org.doubango.expert.ice_servers') : null), ice_servers: isIce ? [{ url: 'stun:stun.l.google.com:19302' }] : [], //(window.localStorage ? window.localStorage.getItem('org.doubango.expert.ice_servers') : null),
enable_rtcweb_breaker: true, //(window.localStorage ? window.localStorage.getItem('org.doubango.expert.enable_rtcweb_breaker') == "true" : false), enable_rtcweb_breaker: true, //(window.localStorage ? window.localStorage.getItem('org.doubango.expert.enable_rtcweb_breaker') == "true" : false),
events_listener: { events_listener: {
events: '*', events: '*',
......
/** @format */ /** @format */
import WidjetButton from '../components/WidjetButton'; import WidjetButton from '../components/WidjetButton';
import React, {useCallback, useEffect, useState} from 'react'; import React, { useEffect, useState } from 'react';
import packageJson from '../../package.json'; import packageJson from '../../package.json';
import CallIcon from '@mui/icons-material/Call';
import {toast} from 'react-hot-toast';
// import DropDownTailwind from '../components/TailwindComponents/DropDown';
// import Modal from '../components/Modal';
// import numbers from '../components/WidjetButton/numbers';
// import TimerUi from '../components/TimerUi';
import DefaultWidjet from '../components/DefaultWidjetUi'; import DefaultWidjet from '../components/DefaultWidjetUi';
import ModalPhoneNumpad from "../components/ModalPhoneNumpad" import ModalPhoneNumpad from '../components/ModalPhoneNumpad';
import Modal from "../components/Modal" import Modal from '../components/Modal';
const Root = ({data, onSetDnd, position}) => {
const Root = ({ data, onSetDnd, position }) => {
if (!data) { if (!data) {
data = { data = {
iscloud: true, iscloud: true,
...@@ -48,14 +41,12 @@ const Root = ({data, onSetDnd, position}) => { ...@@ -48,14 +41,12 @@ const Root = ({data, onSetDnd, position}) => {
} }
}, []); }, []);
const hangupButton = () => { const hangupButton = () => {
boxDialer.hangupButtonClick(); boxDialer.hangupButtonClick();
}; };
console.log(phoneModal, 'phoneModal')
if (!data || !data?.number) return; if (!data || !data?.number) return;
return ( return (
<> <>
<DefaultWidjet <DefaultWidjet
...@@ -80,14 +71,8 @@ const Root = ({data, onSetDnd, position}) => { ...@@ -80,14 +71,8 @@ const Root = ({data, onSetDnd, position}) => {
<Modal <Modal
className='tailwindGlobalCss' className='tailwindGlobalCss'
callAnswerType={modalState.callType} callAnswerType={modalState.callType}
hidden={ hidden={modalState.bool}
modalState.bool callType={modalState.callType}
// true
}
callType={
modalState.callType
// 'outcoming'
}
hangupButton={hangupButton} hangupButton={hangupButton}
phoneNumber={ phoneNumber={
modalState.callType === 'outcoming' modalState.callType === 'outcoming'
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment