Viciphone V3

Discussions about development of VICIDIAL and astGUIclient

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

Viciphone V3

Postby mcargile » Thu Oct 13, 2022 10:57 am

I have begun work on Viciphone Version 3.0.0 with support for SIP.js v0.20.1. Due to changes in SIP.js it is a nearly complete rewrite of the core code. I wanted to asked the community for feedback on features you would like to see added to Viciphone. Perhaps some of them will make it into this version.

Here are some of the features I am currently working on:

  • SIP.js v0.20.1 support (95% complete)
    • This has required a near complete rewrite of the core.
    • It is currently functional, but not every button / feature has been completely tested.
  • Support for passing a settings container from Vicidial to Viciphone to allow additional settings to be added in the future without Vicidial changes (100% complete)
    • Added and tested
  • Add ability to enable/disable various browser audio processing like Echo Cancellation and Automatic Gain Control (100% complete)
    • Added and values are being passed to the browser. I dont notice a difference.
  • Auto call agent conference on successful registration. This is similar to a feature that was added to some forks of Viciphone but it will work even if Viciphone and Vicidial are hosted on different domains. (90% complete)
    • Viciphone is calling into the conference on registration
    • Vicidial is still showing the "No one is in your session" message even though the call connected. Need to get Matt to take a look.
  • Dynamic translation support. This is a frequent request that has been implemented in several of the forks of Viciphone. (90% complete)
    • Added needs testing
    • Needs translations (see below)
  • Play progress audio instead of ringing when placing a call ( 80% complete )
    • I have audio files for North America, Europe, and the UK (others are welcome)
    • The progress audio SHOULD be playing when placing a call
    • Need to make sure it starts and stops when appropriate

If you are interested in testing Version 3 you can find it here:

https://dev.viciphone.com/v3.0.0/viciphone.php

Keep in mind that this is VERY ALPHA! I am actively making code changes to the above version. Don't be shocked if it stops working for a few minutes, hours, or even days as I make changes.


Also I would like to give a big thank you to ccabrerar and all the other people who have forked Viciphone and shared their code back to the community. Your work has inspired me on what to bring back into Viciphone.

If you would like to contribute a translation, please translate everything inside the quotes below:
Code: Select all
langAttempting:"Attempting"
langConnected:"WS Connected"
langDisconnected:"WS Disconnected"
langExten:"Extension"
langIncall:"Incall"
langInit:"Initializing..."
langRedirect:"Redirect"
langRegFailed:"Reg. Failed"
langRegistering:"Registering"
langRegistered:"Registered"
langReject:"Rejected"
langRinging:"Ringing"
langSend:"Send"
langTrying:"Trying"
langUnregFailed:"Unreg. Failed"
langUnregistered:"Unregistered"
langUnregistering:"Unregistering"
langWebrtcError:"Something went wrong with WebRTC. Either your browser does not support the necessary WebRTC functions, you did not allow your browser to access the microphone, or there is a configuration issue. Please check your browsers error console for more details. For a list of compatible browsers please visit http://webrtc.org/"

and then email them to support@vicidial.com and reference this thread.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Sun Oct 16, 2022 9:44 am

One feature that would be nice is that early media/ringback is played instead of the bell ring tone (be good for managers who use the phone from realtime rather than agent interface.
Another is Audio Device selection.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Mon Oct 17, 2022 10:05 am

I have previously looked into both of these feature. This is the issue with Early Media according to SIP.js:

How can I play early media (with an invite with SDP)?
With the release of 0.16 you can now play early media on an invite with SDP and 100 rel enabled. This requires that InviterOptions.earlyMedia is set to true. At the moment, SIP.js only supports early media on an invite with SDP if the call does not fork. If your call does fork SIP.js will throw an error and the call will not connect (regardless of who answers the call). If you want to do early media with a call that forks, please use InviterOptions.inviteWithoutSdp.


So basically if I try to access early media and the call forks, the call will fail no matter what. I am not sure how often that would come up, but it is something to consider.

As for Audio Device selection that gets complicated.

https://developer.mozilla.org/en-US/doc ... DeviceInfo

The browsers are very restrictive on what hardware information is provided to websites. This is to reduce the chance of your browser being finger printed and tracked. Chrome and Firefox also behave differently on the information they provide. Chrome will give the unique device ID and the label. Firefox will only give you the device ID. This means I would not be able to list the actual name of the audio device you are selecting. Chrome also gives access to the input and output device info. Firefox by default only gives you access to the input device info. I know there must be a way to get this to behave consistently, but so far my tinkering has not found it.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby mcargile » Mon Oct 17, 2022 12:20 pm

Well after a bit more tinkering I figured out how to get the device labels every time. I have to call getUserMedia and attach it to a dummy stream when Viciphone first loads. This will prompt the user for audio permissions right away rather than when a call begins. Then I can call the enumerateDevices function. In Chrome I get back all audio input and output devices including the labels. In Firefox I get back all the audio input devices including the label but only get the audio output devices if media.setsinkid.enabled is set to True in about:config which is dumb. I think ill add microphone selection as a feature for v3.1 of viciphone. I might also add the speaker selection when audio output devices are returned. This might not be compatible with other features in Viciphone though like Auto Answer.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Mon Oct 17, 2022 12:27 pm

To address the compatibility, most of the time I would say agents are already aware that they must have their headset connected before logging in, it's more the managers that would benefit from the audio device selection and early media so perhaps if the page is loaded with vicidial.php and the auto-answer feature is on you leave as is, but if auto-answer is off and the page that loads viciphone is realtime or phone only, then offer the extra features?
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Mon Oct 17, 2022 1:41 pm

I do not think I will be able to handle early media in Viciphone. Enabling it makes sense when you know ahead of time what the extension someone is calling is going to do. With Viciphone connected to Asterisk though there is no way to know if the extension will fork or not. Forking as I understand it being the process of calling multiple phones at the same time. The graceful way to handle early media in this case would be to just use the media stream from the first phone to respond with early media and ignore the second. Instead SIP.js will throw an error when the second stream connects to early media and end the call. This would be a support nightmare for a free product potentially being used by people who do not understand what any of this even means.

As for the compatibility issue with audio device selection and features, that was my general plan. Its just a matter of thinking through all the combinations which is why this will probably be a v3.1 feature.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Mon Oct 17, 2022 6:00 pm

I understand, so how about then just a different sound file to play during 180/183 like the ringback heard normally when making an outgoing call instead of the bell ring sound? That would at least make the experience a bit more normal for users using Viciphone like a traditional extension without risking the error being thrown by any calls that fork?
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Mon Oct 17, 2022 8:48 pm

Problem there is the ringback tone for a 180/183 is different depending on where you are calling. If I just emulate the ringback tone from North America for instance it could confuse people in Europe. It would need to be configurable and I would need to find a good source for the various audio files.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Tue Oct 18, 2022 5:48 am

Even in europe we are used to the north american ring tone when using VoIP or a pbx system in general as it tends to be the default on most systems and very few people change it, also a lot of the popular messaging apps when calling each other via them use the north american trill or something very similar to indicate ringing, even when I call from my spanish cell to another spanish number, I get the north american trill at times instead of the beep sound we traditionally have so I think confusion wouldn't really be an issue as far as we're concerned over here. I think there is more confusion that the phone "rings" when you dial out, this causes the user if they haven't come across this before to think they have an incoming call and click the phone to "answer" it but instead are hanging up on their call attempt.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Wed Oct 19, 2022 8:48 am

Well I was able to to find a good recording for the North American progress audio and switching to this recording should not be difficult so I will add that. If you can find me a royalty free version of the European progress tone I can probably make an option in the settings container to switch this.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Thu Oct 20, 2022 4:32 am

I've got both the European and UK tones, created by me, no royalty/copyright.
How do you want them? Email, Mantis?
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Thu Oct 20, 2022 9:49 am

email support@vicidial.com and link to this thread
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Thu Oct 20, 2022 1:39 pm

Just sent them.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Thu Oct 20, 2022 2:46 pm

Cool. I have added it to the list and have started putting it in the code.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby mcargile » Fri Oct 21, 2022 9:59 am

Translations have been added. See my original post for details about how to contribute a translation.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Mon Oct 24, 2022 6:31 am

Just started testing it out this morning.

Progress doesn't work at all, seems like a typo and a variable not being filled, file looked for is progress-na.mp3 but file on server is progress-us.mp3.
Code: Select all
GET https://dev.viciphone.com/v3.0.0/sounds/progress-us.mp3 404 (Not Found)

Changing to uk or eu doesn't work, the file looked for switches to progress-.mp3 rather than progress-uk.mp3 or progress-eu.mp3
Code: Select all
GET https://dev.viciphone.com/v3.0.0/sounds/progress-.mp3 404 (Not Found)


Will report back any other findings as I come across them.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Mon Oct 24, 2022 8:12 am

Thank you. Ill look into that after AsteriskDevCon.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Mon Oct 24, 2022 8:34 am

Cool, if you get a chance, feel free to stick it on GitHub and we can create pull requests to speed up the process :)
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Mon Oct 24, 2022 3:35 pm

I think I fixed it. Give it a test.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby mcargile » Tue Oct 25, 2022 2:30 pm

Well I tested the progress audio and that is working in the different region settings. The UI however is not working properly. I recommend updating Vicidial though so the settings_container code works.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby mcargile » Fri Oct 28, 2022 8:35 am

And of course SIP.js released 0.21.1 which requires more code changes....
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Mon Oct 31, 2022 6:10 am

Settings container now working and progress tones fine, although the code was missed from realtime_report.php, I provided a patch for it http://www.vicidial.org/VICIDIALmantis/view.php?id=1385.

One thing I notice though is if hangup is done during ringing, the call does not end, progress keeps playing and the remote endpoint keeps ringing.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Mon Oct 31, 2022 8:02 am

Okay that should be fixed now.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Mon Oct 31, 2022 8:37 am

Still getting it happening.
This is what shows up in console.

Code: Select all
sip.js:9481 Mon Oct 31 2022 09:36:10 GMT-0400 (hora de verano oriental) | sip.Inviter | Session.bye() may only be called if established session. However a dialog does not yet exist. Perhaps you should have called Inviter.cancel()?
print @ sip.js:9481
genericLog @ sip.js:9461
genericLog @ sip.js:9556
error @ sip.js:9544
bye @ sip.js:1497
hangupCall @ vici_phone.js:1047
dialButton @ vici_phone.js:899
(anonymous) @ vici_phone.js:1174
sip.js:1498 Uncaught (in promise) Error: Invalid session state Establishing
    at Inviter.bye (sip.js:1498:31)
    at hangupCall (vici_phone.js:1047:13)
    at dialButton (vici_phone.js:899:3)
    at HTMLButtonElement.<anonymous> (vici_phone.js:1174:57)
bye @ sip.js:1498
hangupCall @ vici_phone.js:1047
dialButton @ vici_phone.js:899
(anonymous) @ vici_phone.js:1174
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Tue Nov 01, 2022 8:52 am

Can you run me through the specific steps to replicate this? I think I am doing something different.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Tue Nov 01, 2022 9:12 am

Place a call to a phone (one that rings, not one that auto-answers) (I called my cell) and wait for it to start ringing.
Once it's ringing, hangup on viciphone. That error appears in the console, the cell keeps ringing and the progress tone can still be heard from viciphone.
If the cell is answered after the hangup on viciphone, the call drops immediately on the cell but the progress tone continues on viciphone.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Tue Nov 01, 2022 10:46 am

Well looks like I need to put a more advanced state machine into the code as they now require me to call the cancel() method to end a ringing call and bye() to end an answered call. I used to be able to just call terminate() to end either situation.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby mcargile » Tue Nov 01, 2022 3:54 pm

After some research it looks like the session object has a state variable I can check. Please give it a try now.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Tue Nov 01, 2022 4:28 pm

Hangup is broken completely now. Can't hangup on ringing or live calls.
vici_phone.js:1047 Uncaught ReferenceError: mySesssion is not defined
at hangupCall (vici_phone.js:1047:3)
at dialButton (vici_phone.js:899:3)
at HTMLButtonElement.<anonymous> (vici_phone.js:1182:57)
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Tue Nov 01, 2022 8:00 pm

Looks like I typed an extra S in mySession when I was trying to save the file. Sorry about that. Give it another try.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Tue Nov 01, 2022 8:25 pm

Yep, working now although what might be a bit confusing for some users not familiar with SIP response codes is it says on the display "Rejected 487 Request Terminated" when hanging up during progress, perhaps that could be changed to something like "Call Ended".
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Wed Nov 02, 2022 9:01 am

When you hang up it is saying Rejected?
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Wed Nov 02, 2022 11:58 am

Yeah, it's as if it just displaying the last SIP response received.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby mcargile » Wed Nov 02, 2022 1:05 pm

Can you enable Webphone Debug and send me the output?

EDIT: Never mind. I was able to replicate it. Give it a try now.
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby mcargile » Thu Dec 01, 2022 3:38 pm

@jamiemurray
Did you get a chance test this?
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby jamiemurray » Fri Dec 02, 2022 6:51 pm

Yes actually, it no longer shows rejected when hanging up prior to 200 OK message, just flips back to Registered.
jamiemurray
 
Posts: 118
Joined: Fri Jan 11, 2013 4:12 pm
Location: Tenerife, Canary Islands

Re: Viciphone V3

Postby bbakirtas » Thu Dec 08, 2022 5:50 am

I sent the Turkish translation
Vicibox 9.0.1
VERSION: 2.14-738a
BUILD: 200210-1628
Intel Xeon X5650 12 Core HT 24 Core 2.90 Ghz
64 GB ECC Registered Memory
bbakirtas
 
Posts: 88
Joined: Thu Dec 06, 2012 3:35 am
Location: Turkey

Re: Viciphone V3

Postby glen20web » Mon Dec 19, 2022 3:02 am

mcargile wrote:@jamiemurray
Did you get a chance test this?


@mcargile

We tried to test it on Chromebook or chrome OS the previous v1 and v2 of viciphone. Unfortunately, it does not have audio in either chrome or firefox browser.
It does work on Windows, Mac OS and android.

Is there a way we can have it compatible as well for Chromebook?
Let me know the details that you need. Thanks
Opensuse leap 15.4 | Vicidial 2.14-869a Build 221021-1038| Asterisk 16.29.0-vici | svn version: 3658 | 1 DB, 1 Web, 4 Dialers| No Digium/Sangoma Hardware | No Extra Software After Installation | Intel xeon x5650 @4.8GHz
glen20web
 
Posts: 14
Joined: Tue Jul 25, 2017 5:02 pm

Re: Viciphone V3

Postby mcargile » Thu Dec 22, 2022 6:21 pm

What model Chromebook did you try? As far as I can tell it should just work. Have you confirmed that your setup is working properly on a Windows system?

Please set WebRTC Debug to Y on your phone in Vicidial and send the debug output along with your JavaScript error console on the Chromebook?
Michael Cargile | Director of Consulting | ViciDialGroup | www.vicidial.com

The official source for VICIDIAL services and support. 1-888-894-VICI (8424)
mcargile
Site Admin
 
Posts: 605
Joined: Tue Jan 16, 2007 9:38 am

Re: Viciphone V3

Postby dreedy » Tue Jan 10, 2023 9:31 am

is version 3 ready for production ? I don't see any updates since dec and i am just curious.
2-Web Server (ViciBox 8.1.2) Dell R620
4-Dialer (ViciBox 8.1.2) Dell R620
1-MySql Database (ViciBox-7.0.3.iso) Dell R620 128G
1-Archive Server Drobo 810n

Asterisk Version 13.34.0-vici |BUILD: 210712-1733 | VERSION: 2.14-821a | svn 3481|dbschema 1638
dreedy
 
Posts: 105
Joined: Tue Nov 24, 2015 10:16 pm


Return to Development

Who is online

Users browsing this forum: No registered users and 13 guests