Commit 360f0efa authored by Muhammadali's avatar Muhammadali

update add code for sipRegister isIce

parent 35ebde2a
{
"name": "boxdialer",
"version": "0.8.0",
"version": "0.8.1",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "boxdialer",
"version": "0.8.0",
"version": "0.8.1",
"license": "ISC",
"dependencies": {
"@emotion/react": "^11.11.1",
......
{
"name": "boxdialer",
"version": "0.8.1",
"version": "0.8.2",
"description": "",
"main": "src/boxDialer.js",
"scripts": {
......
/** @format */
import React from 'react';
import DefaultWidjetStyle, {DialPadIcon} from './style';
import DefaultWidjetStyle, { DialPadIcon } from './style';
import TimerUi from '../TimerUi';
const DefaultWidjet = ({
......@@ -10,19 +10,19 @@ const DefaultWidjet = ({
reason,
widjetVersion,
leftTime,
onClick
}) => {
onClick,
}) => {
return (
<DefaultWidjetStyle status={widjetState} onClick={onClick}>
<div className='left'>
<p className='title'>{phoneNumber}</p>
<p>
<span className='status'>{widjetState}</span>
<TimerUi reason={reason} time={leftTime}/>
<TimerUi reason={reason} time={leftTime} />
</p>
</div>
<div className='right'>
<DialPadIcon/>
<DialPadIcon />
</div>
<div className='bottom'>
<DefaultWidjetStyle.StatusLine status={widjetState}>
......
......@@ -11,6 +11,7 @@ import PauseIcon from '@mui/icons-material/Pause';
import SendToMobileIcon from '@mui/icons-material/SendToMobile';
import DialpadIcon from '@mui/icons-material/Dialpad';
import CallCardDropDown from '../CallCardDropDown';
const Modal = ({
children,
hidden,
......
......@@ -153,7 +153,7 @@ export class BoxDialer {
}
}
sipRegister = ({ number, secret, wsurl }) => {
sipRegister = ({ number, secret, wsurl, isIce }) => {
try {
Notification.requestPermission();
......@@ -174,7 +174,7 @@ export class BoxDialer {
display_name: number, //'3003',
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),
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),
events_listener: {
events: '*',
......
/** @format */
import WidjetButton from '../components/WidjetButton';
import React, {useCallback, useEffect, useState} from 'react';
import React, { useEffect, useState } from 'react';
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 ModalPhoneNumpad from "../components/ModalPhoneNumpad"
import Modal from "../components/Modal"
const Root = ({data, onSetDnd, position}) => {
import ModalPhoneNumpad from '../components/ModalPhoneNumpad';
import Modal from '../components/Modal';
const Root = ({ data, onSetDnd, position }) => {
if (!data) {
data = {
iscloud: true,
......@@ -48,14 +41,12 @@ const Root = ({data, onSetDnd, position}) => {
}
}, []);
const hangupButton = () => {
boxDialer.hangupButtonClick();
};
console.log(phoneModal, 'phoneModal')
if (!data || !data?.number) return;
return (
<>
<DefaultWidjet
......@@ -80,14 +71,8 @@ const Root = ({data, onSetDnd, position}) => {
<Modal
className='tailwindGlobalCss'
callAnswerType={modalState.callType}
hidden={
modalState.bool
// true
}
callType={
modalState.callType
// 'outcoming'
}
hidden={modalState.bool}
callType={modalState.callType}
hangupButton={hangupButton}
phoneNumber={
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