Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AmiBX
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
bitrix
AmiBX
Commits
1955c8a9
Commit
1955c8a9
authored
Apr 26, 2022
by
Kulya
😊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sip_reg_period_to_10_3
parent
2ee9c3c0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
174 deletions
+31
-174
AloVoiceConnector.php
vendor/alovoice/src/AloVoiceConnector.php
+31
-174
No files found.
vendor/alovoice/src/AloVoiceConnector.php
View file @
1955c8a9
...
@@ -1587,6 +1587,7 @@ class AloVoiceConnector
...
@@ -1587,6 +1587,7 @@ class AloVoiceConnector
public
function
getUserSoftphoneExe
(
$num
){
public
function
getUserSoftphoneExe
(
$num
){
$configs
=
self
::
getConfigs
();
$configs
=
self
::
getConfigs
();
$title
=
$configs
[
"bitrix_domain"
];
$title
=
$configs
[
"bitrix_domain"
];
$nowTime
=
time
();
$ip
=
(
!
empty
(
$configs
[
"sipaddress_local"
]))
?
$configs
[
"sipaddress_local"
]
:
'192.168.123.6'
;
$ip
=
(
!
empty
(
$configs
[
"sipaddress_local"
]))
?
$configs
[
"sipaddress_local"
]
:
'192.168.123.6'
;
$port
=
(
!
empty
(
$configs
[
"sipport_local"
]))
?
$configs
[
"sipport_local"
]
:
'5060'
;
$port
=
(
!
empty
(
$configs
[
"sipport_local"
]))
?
$configs
[
"sipport_local"
]
:
'5060'
;
...
@@ -1611,14 +1612,16 @@ class AloVoiceConnector
...
@@ -1611,14 +1612,16 @@ class AloVoiceConnector
}
}
$softfoneUserExe
=
$newUseSoftfoneDir
.
'phonerlite.exe'
;
$softfoneUserExe
=
$newUseSoftfoneDir
.
'phonerlite.exe'
;
$softfoneUserDownExe
=
$newUseSoftfoneDir
.
'phonerlite_'
.
$nowTime
.
'.exe'
;
$newUseSoftfoneLink
=
$configs
[
"alovoice_host"
]
.
'files/phonerlite_'
.
$num
.
'/phonerlite.exe'
;
$newUseSoftfoneLink
=
$configs
[
"alovoice_host"
]
.
'files/phonerlite_'
.
$num
.
'/phonerlite.exe'
;
$userSoftphoneLinkDownLink
=
$configs
[
"alovoice_host"
]
.
'files/phonerlite_'
.
$num
.
'/phonerlite_'
.
$nowTime
.
'.exe'
;
$qrPng
=
self
::
make_qraccount
(
$configs
,
$out_ip
.
":"
.
$out_port
,
$num
,
$passPeer
);
$qrPng
=
self
::
make_qraccount
(
$configs
,
$out_ip
.
":"
.
$out_port
,
$num
,
$passPeer
);
if
(
file_exists
(
$softfoneUserExe
)){
if
(
file_exists
(
$softfoneUserExe
)){
return
[
"link"
=>
$newUseSoftfoneLink
,
"qrpng"
=>
$qrPng
,
"password"
=>
$passPeer
];
$res
=
[
"link"
=>
$newUseSoftfoneLink
,
"qrpng"
=>
$qrPng
,
"password"
=>
$passPeer
];
}
}
else
{
$newUserSftSipperFile
=
$newUseSoftfoneDir
.
'sipper.ini'
;
$newUserSftSipperFile
=
$newUseSoftfoneDir
.
'sipper.ini'
;
$newUserSftProviderFile
=
$newUseSoftfoneDir
.
'provider.ini'
;
$newUserSftProviderFile
=
$newUseSoftfoneDir
.
'provider.ini'
;
...
@@ -1638,9 +1641,19 @@ class AloVoiceConnector
...
@@ -1638,9 +1641,19 @@ class AloVoiceConnector
else
{
else
{
$res
=
[
"result"
=>
"Directory Ready"
,
"dir"
=>
$sampleSoftfoneExe
,
"isSample"
=>
file_exists
(
$sampleSoftfoneExe
),
"password"
=>
$passPeer
];
$res
=
[
"result"
=>
"Directory Ready"
,
"dir"
=>
$sampleSoftfoneExe
,
"isSample"
=>
file_exists
(
$sampleSoftfoneExe
),
"password"
=>
$passPeer
];
}
}
}
if
(
!
empty
(
$res
[
"link"
])){
if
(
is_dir
(
$newUseSoftfoneDir
))
{
array_map
(
'unlink'
,
glob
(
$newUseSoftfoneDir
.
'phonerlite_*.exe'
));
}
copy
(
$softfoneUserExe
,
$softfoneUserDownExe
);
$res
[
"link"
]
=
$userSoftphoneLinkDownLink
;
}
return
$res
;
return
$res
;
// $provider_init = self::make_providerini($title,$ip,$bxaddr);
// $provider_init = self::make_providerini($title,$ip,$bxaddr);
// $sipper_init = self::make_sipperini($ip,$port,$num,$pass);
// $sipper_init = self::make_sipperini($ip,$port,$num,$pass);
}
}
...
@@ -1765,163 +1778,7 @@ CFU=';
...
@@ -1765,163 +1778,7 @@ CFU=';
return
$iniText
;
return
$iniText
;
}
}
public
function
OLD_make_sipperini
(
$addr
,
$port
=
'5060'
,
$addr_out
,
$port_out
=
'5060'
,
$num
,
$pass
){
$iniText
=
'[Profile]
Profile=Alovoice_'
.
$num
.
'
[Office_local_'
.
$num
.
']
UserName='
.
$num
.
'|'
.
$num
.
'
DisplayName=Technounit
Password='
.
$pass
.
'
LocalPort='
.
$port
.
'
Gateway='
.
$addr
.
'
STUN=
Realm='
.
$addr
.
'
Register=1
Codecs=9,-107,8,0,-2,-3,-97,-110,-111,18,-112,-113,-114,101,-11,-118
UseAppGUID=1
AppGUID=00DE6AE6-4E26-EB11-ACBB-6D762EC99F4D
Mailbox=
PhoneNumber=
MWI=1
RegisterPeriod=10
ConnectionType=0
NoFallback=0
Alias=0
SessionTimers=0
MDNS=1
MDNS_sipuri=0
UPnP=0
ResolveDefaultGateway=1
IPv6=0
DualStackIPv6=0
QoS=1
GRUU=1
CheckUsername=1
CheckFirewall=0
MirrorRTP=0
ForceOwnCodecPriority=0
ForceOldCodecPriority=0
AllowAutoAnswer=0
SendEmptyInvite=0
PEarlyMedia=0
SendRingbackTone=0
EchoTail=100
EchoOffset=60
SpeexBandwidth=15
ENUM=e164.org, e164.arpa, e164.info
SRTP=0
UNENCRYPTED_SRTCP=0
UNAUTHENTICATED_SRTP=0
MediaSec=0
ZRTP=0
ZRTP_MASQUERADE=0
SAVP=0
MOH=2
G726_AAL2=1
G722_16000=0
Silence=0
ServerCertificate=
ServerKey=
ClientCertificate=
CheckCertificate=0
LoadWindowsCA=0
AGC_in=0
AGC_out=0
Denoise_in=0
Denoise_out=1
NoiseSuppress_in=15
NoiseSuppress_out=15
DeclineNotBusy=0
RTPoverSIPFallback=5
RTP_auto_STUN=0
STUNoverSIP=0
DoOverrideIP=1
DelayedHoldRetrieve=0
IgnoreDomainForIncomingCalls=0
BNC=0
FetchBindings=0
HTTP=1
ActivationCount=28
CFU=
[Office_out_'
.
$num
.
']
UserName='
.
$num
.
'|'
.
$num
.
'
DisplayName=Technounit
Password='
.
$pass
.
'
LocalPort='
.
$port_out
.
'
Gateway='
.
$addr_out
.
'
STUN=
Realm='
.
$addr_out
.
'
Register=1
Codecs=9,-107,8,0,-2,-3,-97,-110,-111,18,-112,-113,-114,101,-11,-118
UseAppGUID=1
AppGUID=00DE6AE6-4E26-EB11-ACBB-6D762EC99F4D
Mailbox=
PhoneNumber=
MWI=1
RegisterPeriod=600
ConnectionType=0
NoFallback=0
Alias=0
SessionTimers=0
MDNS=1
MDNS_sipuri=0
UPnP=0
ResolveDefaultGateway=1
IPv6=0
DualStackIPv6=0
QoS=1
GRUU=1
CheckUsername=1
CheckFirewall=0
MirrorRTP=0
ForceOwnCodecPriority=0
ForceOldCodecPriority=0
AllowAutoAnswer=0
SendEmptyInvite=0
PEarlyMedia=0
SendRingbackTone=0
EchoTail=100
EchoOffset=60
SpeexBandwidth=15
ENUM=e164.org, e164.arpa, e164.info
SRTP=0
UNENCRYPTED_SRTCP=0
UNAUTHENTICATED_SRTP=0
MediaSec=0
ZRTP=0
ZRTP_MASQUERADE=0
SAVP=0
MOH=2
G726_AAL2=1
G722_16000=0
Silence=0
ServerCertificate=
ServerKey=
ClientCertificate=
CheckCertificate=0
LoadWindowsCA=0
AGC_in=0
AGC_out=0
Denoise_in=0
Denoise_out=1
NoiseSuppress_in=15
NoiseSuppress_out=15
DeclineNotBusy=0
RTPoverSIPFallback=5
RTP_auto_STUN=0
STUNoverSIP=0
DoOverrideIP=1
DelayedHoldRetrieve=0
IgnoreDomainForIncomingCalls=0
BNC=0
FetchBindings=0
HTTP=1
ActivationCount=28
CFU='
;
return
$iniText
;
}
public
function
recurse_copy
(
$src
,
$dst
)
{
public
function
recurse_copy
(
$src
,
$dst
)
{
$dir
=
opendir
(
$src
);
$dir
=
opendir
(
$src
);
...
...
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