Asterisk with flashphoner simultaneous extention call not working and outbound call ring tone not playing

phonedev

New Member
Hello,

We are using flashphoner with asterisk freepbx. We have two majer problem:
1. When extentions try to call eachother over flashphoner 2 or more simultaneous connection can't establish. Just one call can establish and others get not extention avaliable response. We tried similar scenario with using softphone and it is working while softphone more than one simultaneous connection.
2. While making outbound call the ring tone is not working. We also tried this with useing softphone outgoing ring voice working.

We guess the problem is in flashphoner side. We tried to change flashphoner.properties like below but nothing changed in these two problem.
codecs_exclude_sip=mpeg4-generic,flv,mpv,opus,ulaw,h264,g722,g729
allow_outside_codecs=false
 

Max

Administrator
Staff member
Hello

Please describe how to reproduce issue step-by-step.

Example:

1. Scheme

Browser1 <> WCS <> Asterisk <> WCS <> Browser1

Asterisk extensions:
2001
2002
2003
2004

2. Calls using Phone Min.

1) Call from 2001 to 2002. Call ESTABLISHED. Two way voice.
2) Call from 2003 to 2004. Call FAILED.

Expected behavior:
2) Call from 2003 to 2004. Call ESTABLISHED. Two way voice.

Please attach testing screenshots.
 

Max

Administrator
Staff member
If you don't receive REGISTERED, it seems your PBX works over SIP/TCP. WCS works over SIP/UDP by default.

1. Add this line into /usr/local/FlashphonerWebCallServer/conf/flashphoner.properties

sip_force_tcp=true

2. Restart process.

service webcallserver restart

Therefore you can force SIP over TCP for WCS server.

UPD

From your screenshot we can see that you are using our demo server.
We have configured the demo server for SIP over TCP. Please try again.
REGISTERED should be displayed.
 

phonedev

New Member
It is registers to our server if I enter as its wcs url. It is not register on your demo wcs url. Also sip_force_tcp not entered in our flashphoner.properties and registration is successfull. I drop screenshot with our wcs url.

Whit our wcs we tested like that:
1- ext 1009 to ext 1010 call made and 1010 answers the call
2- while this call is on going ext 1008 to 1011 call made, but from pbx a voice returns that 1011 is not avaliable.

If we reproduce same call progress with soft phone pbx not is return as not avaliable

also the ring tone not ringinig to caller headset from flashphoner, however with softphone it can head until callee answers

1648645231544.png
 

Max

Administrator
Staff member
Hello

We will try to reproduce issue on our Asterisk server.
You can also provide 4 (four) SIP extensions for our tests with your Asterisk.
Private form for SIP accounts.
 

Max

Administrator
Staff member
We cannot reproduce the issue with latest WCS build 5.2.1154 on our Asterisk server.
Your Asterisk server seems to be unavailable (no response from SIP port both by TCP and UDP). Please check your Asterisk server, it must be available 24/7 for tests. Also, please provide accees to your WCS instance using this private form.
 

phonedev

New Member
It is interesting, our server avaliable 24/7. We are using for inbound and outbound calls in production. I shared details
 

Max

Administrator
Staff member
We tried to make test calls between two browsers via your server. they all fails with the following message in WCS logs:
Code:
09:12:53,230 ERROR bstractDTLSTransport - Stun-Clbk-thread udp//95.179.156.48:31414 Close socket after 10 tries
09:12:53,231 ERROR              SipCall - Stun-Clbk-thread udp//95.179.156.48:31414 DTLS alert (AlertLevel.2, AlertDescription.80)
In traffic dump collected on server side we see ICMP response Destination unreachable (Port unreachable) to DTLS requests from our browser.
Also, we cannot connect a softphone to port 5060 on your server.
This looks like a firewall configuration issues for UDP. Please review your firewall configuration. Switching to TCP transport for WebRTC may also help:
Code:
ice_tcp_transport=true
 

phonedev

New Member
Hello Max,

thank you for suggestion. We forgot to allow port 5060 on our firewall. Now simultaneous extention calls working.

However, the ringer is not ring while calling outbound. We couldn't figure out that one still. Do you have any suggestion avout that. Becouse the ringer working with softphone. the ringer is nat phone ring it is headset ring while we are calling opposite side.
 

Max

Administrator
Staff member
Hello

Please make a dump on WCS end:

tcpdump upd -s 4096 -w log.pcap

This log.pcap file should contain SIP call as listed here

Generally the ring tone is an RTP stream. And we have to check what codec and payload used.
Send log.pcap via the same private form or create download link using a cloud storage.
 

Max

Administrator
Staff member
Please also clarify: don't you hear a ringtone when Phone Min example shows RING status?
1648776561470.png

If yes, this is normal behaviour: there is no media traffic yet until call is accepted. So if you need a ringtone, you should customize the example code by adding a ringtone playback start on CALL_STATUS.RING event and playback stop by CALL_STATUS.ESTABLISHED event:
Code:
    }).on(SESSION_STATUS.INCOMING_CALL, function(call){
        call.on(CALL_STATUS.RING, function(){
            setStatus("#callStatus", CALL_STATUS.RING);
            // Add here the code to play a ringtone
        }).on(CALL_STATUS.ESTABLISHED, function(){
            setStatus("#callStatus", CALL_STATUS.ESTABLISHED);
            $("#holdBtn").prop('disabled',false);
            enableMuteToggle(true);
            // Add here the code to stop playing the ringtone
            ...
        });
        onIncomingCall(call);
    });
 

phonedev

New Member
Hello,
the situation is not for incoming call ring tone. It is outgoing ring tone which in headset like beeps to know phone is calling opposite side.
I shared the log.pcap file with latest private form you shared with me.
 

Max

Administrator
Staff member
We checked the dump and tested calls via your Asterisk using SIP accounts provided.
Some calls in the dump contains 183 Session Progress SDP packet sent from Asterisk to caller (but not all the calls):
1649211122559.png

In our test with SIP accounts provided, there is no such packet, both in calls from WCS to softphone
1649211262066.png

and from softphone to WCS
1649211320294.png

We receive only 180 Ringing, which only instructs the caller to play a ringtone locally. Seems like you should configure the test SIP accounts to send 183 Session Progress and then check again. If no media is playing in this case, please provide us the sip accounts with this feature enabled, we'll repeat the test.
 

phonedev

New Member
Hello Max,

I am not sure to that I explain our problem clearly. Let me explain what is the problem and be sure are we on the same point.
We are not hearing dial tone which should play in caller ear while calling other side, not the callee phone ring or not the callee headset dial tone.
Is this last post according to fix this issue?
 

Max

Administrator
Staff member
Is this last post according to fix this issue?
Yes, 183 Session Progress SDP message instructs the caller side to play a media stream according to SDP. So Asterisk should send this message and then RTP media data to the caller. Please check the Asterisk configuration.
 

phonedev

New Member
Hello Max,

We couldn't find any solution on Asterisk side about that situation. Do you have any other suggestion?
 

Max

Administrator
Staff member
We couldn't find any solution on Asterisk side about that situation. Do you have any other suggestion?
If you cannot provide Session Progress to be sent to all the callers, use the CALL_STATUS.RING to play a ringtone locally on client:
Code:
    var outCall = session.createCall({
        callee: $("#callee").val(),
        visibleName: $("#sipLogin").val(),
        ...
    }).on(CALL_STATUS.RING, function(){
        setStatus("#callStatus", CALL_STATUS.RING);
        // Add here the code to play a ringtone
    }).on(CALL_STATUS.ESTABLISHED, function(){
        setStatus("#callStatus", CALL_STATUS.ESTABLISHED);
        $("#holdBtn").prop('disabled',false);
        onAnswerOutgoing();
        // Add here the code to stop playing the ringtone
    }).on(CALL_STATUS.HOLD, function() {
        ...
    }).on(CALL_STATUS.FINISH, function(){
        setStatus("#callStatus", CALL_STATUS.FINISH);
        onHangupOutgoing();
        currentCall = null;
        // Add here the code to stop playing the ringtone if playing
    }).on(CALL_STATUS.FAILED, function(){
        setStatus("#callStatus", CALL_STATUS.FAILED);
        onHangupIncoming();
        currentCall = null;
        // Add here the code to stop playing the ringtone if playing
    });
The RING status is received by client when server receives 180 Ringing from Asterisk. So browser should use this status to play beeps to the caller like softphones do.
 
Top