Stream is not playing

awv

New Member
I rolled back to Asterisk 17, then 16.8, and stream is still silent. I have been running Asterisk 16 or 17 for +2 years and only tried v. 18 lately to solve issue.
I was going to ask if it is doable to roll back WCS easily? But you have replaced WCS in the flow with softphone and PBX still sends silence.
 

Max

Administrator
Staff member
Hello

We have seen DTMF error

WCS:
Code:
08:22:38,400 INFO         RestApiRouter - HTTP-pool-3-thread-193 Use controller class com.flashphoner.rest.server.rest_v2.RestCallController with path /rest-api/call/send_dtmf
08:22:38,400 INFO    RestCallController - HTTP-pool-3-thread-193 handleRequest /rest-api/call/send_dtmf params:{callId=5620-7001, dtmf=1, type=RFC2833}
Asterisk:
Code:
[2021-09-29 04:22:53] VERBOSE[4806][C-0000042c] app_read.c: User entered nothing.
It seems DTMF broken on WCS end or not recognized on Asterisk.

As an option you can try to switch DTMF to INFO mode on WCS

1. Switch WCS to DTMF INFO

flashphoner.properties

add line
Code:
dtmf=INFO
2. Restart WCS

If Asterisk supports DTMF INFO mode, it should work. We will also check DTMF sending from our end. If it is broken, we will raise a ticket.

Regarding WCS rollback. Yes you can do that easily.

1. Backup WCS folder (copy content from) /usr/local/FlashphonerWebCallServer
2. Stop WCS server
service webcallserver stop
3. Download previous stable version, unzip and run ./install.sh to downgrade.
 

awv

New Member
I have changed to DTMF Info on Asterisk but error remains. Not sure what is going on with that.
I rolled back to WCS 5.2.1015. I am now able to get audio inside Safari 15 when I change User-Agent to FireFox. No other browser or user-agent seems to get any audio. This confirms to me that Asterisk is indeed sending audio, not silence, but something must be broken in player code somewhere perhaps?
 

Max

Administrator
Staff member
I have changed to DTMF Info on Asterisk but error remains. Not sure what is going on with that.
You should change this in add_wcs_to_conference.sh script too:
Code:
curl -s -X POST -d "{ \"callId\": \"5620-$CONF_NUMBER\", \"dtmf\": \"1\", \"type\": \"INFO\" }" "$URL/send_dtmf"
We've done it, and the error gone, Asterisk displays in logs
Code:
[2021-09-29 23:13:10] VERBOSE[19955][C-00000301] app_read.c: User entered '1'
But we still do not listen anything from softphone which is calling to 7002, may be we shoud also enter a pin?
I rolled back to WCS 5.2.1015. I am now able to get audio inside Safari 15 when I change User-Agent to FireFox. No other browser or user-agent seems to get any audio. This confirms to me that Asterisk is indeed sending audio, not silence, but something must be broken in player code somewhere perhaps?
If you're using player2, you should also fix relative paths in player_audio.html and player.js. We see the errors in any browser console on player page:
1632973125190.png

This means all the paths like ../../../../flashphoner.js should be changed to absolute paths, for example https://flash.polycall.net:8444/client2/flashphoner.js and so on.
 

awv

New Member
Thanks for fixing the dtmf issue!
I am using another player, this player, I did update all the links to be sure they were absolute. I do see several errors (Edge browser developer tools lists them nicely) and wondered if this player will recieve updates to be compatible with other modern browsers. Presently we can get audio only on Firefox browsers. Can you duplicate that issue? I'm not sure when this started happening, I'm quite sure this is fairly recent, but maybe you can check which version affected player scripts?
Regarding the PIN on the softphone, I have the PBX set up to play hold music if only 1 user is present in the conference. If dialing 7002, the stream to WCS and the softphone are both active, and neither has hold music. Hang up on the softphone and the stream should play hold music.
Alternately to check through softphone, ensure stream has ended, dial 7001 through softphone and then 1 to enter the conference (muted) and as no other user is present in the conference, you will hear hold music.
Any other clues we can pursue?
 

Max

Administrator
Staff member
I am using another player, this player, I did update all the links to be sure they were absolute. I do see several errors (Edge browser developer tools lists them nicely) and wondered if this player will recieve updates to be compatible with other modern browsers. Presently we can get audio only on Firefox browsers. Can you duplicate that issue? I'm not sure when this started happening, I'm quite sure this is fairly recent, but maybe you can check which version affected player scripts?
As we see, this page uses player.js default script to play.
Code:
    <script type="text/javascript" src="https://flash.polycall.net:8444/client2/examples/demo/streaming/player/player.js"></script>
This script uses default constraints, and make a browser wait for both audio and video packets to be received. But call stream contains only audio track. So you should copy constraints declaration from player_audio2.js[ICODE] to [ICODE]player.js script:
Code:
function playStream(session) {
    var streamName = $('#streamName').val();
    var options = {
        name: streamName,
        display: remoteVideo,
        flashShowFullScreenButton: true,
        constraints: {audio: true, video: false},
        transport: "TCP"
    };
    ...
}
In this case, call stream should play in the most of browsers (we've tested this in Chrome and Edge too).
Regarding the PIN on the softphone, I have the PBX set up to play hold music if only 1 user is present in the conference. If dialing 7002, the stream to WCS and the softphone are both active, and neither has hold music. Hang up on the softphone and the stream should play hold music.
Yes, this works. We also added constraints to the script as mentioned above, and stream is playing hold music.
 
Top