[Freeswitch-users] Bridge to other FS server has no audio until DTMF

Avi Marcus avi at avimarcus.net
Thu Oct 7 16:48:40 UTC 2021


I had to do this to get it to execute on the B leg:
<action application="export" data="nolocal:execute_on_answer=playback
silence_stream://100"/>

... but it didn't help. Only DTMF worked... either manually dialed or via
queue_dtmf
Freeswitch A waited for my DTMF to actually send the silence.
Version 1.10.6 -release-18-1ff9d0a60e 64bit


 2021-10-07 16:37:10.523346 [DEBUG] switch_core_media.c:9025 Set comfort
noise payload to 13
 2021-10-07 16:37:10.523346 [NOTICE] sofia.c:8586 Channel [sofia/external/
JOIN_CLASS_7229999 at voip.bestfone.com] has been answered
 EXECUTE [depth=1] sofia/external/JOIN_CLASS_7229999 at voip.bestfone.com
playback(silence_stream://100)
 2021-10-07 16:37:10.523346 [DEBUG] switch_ivr_play_say.c:1486 Codec
Activated L16 at 8000hz 1 channels 20ms

 -- 20 seconds later when I pressed a button --

 2021-10-07 16:37:30.563357 [DEBUG] switch_ivr_play_say.c:1931 done playing
file silence_stream://100
 2021-10-07 16:37:30.563357 [DEBUG] switch_channel.c:3865 (sofia/external/
JOIN_CLASS_7229999 at voip.bestfone.com) Callstate Change DOWN -> ACTIVE
 2021-10-07 16:37:30.563357 [DEBUG] switch_ivr_bridge.c:1793
(sofia/external/JOIN_CLASS_7229999 at voip.bestfone.com) State Change
CS_CONSUME_MEDIA -> CS_EXCHANGE_MEDIA
 2021-10-07 16:37:30.563357 [DEBUG] switch_core_state_machine.c:585
(sofia/external/JOIN_CLASS_7229999 at voip.bestfone.com) Running State Change
CS_EXCHANGE_MEDIA (Cur 12 Tot 351090)
 2021-10-07 16:37:30.563357 [DEBUG] switch_core_state_machine.c:654
(sofia/external/JOIN_CLASS_7229999 at voip.bestfone.com) State EXCHANGE_MEDIA
 2021-10-07 16:37:30.563357 [DEBUG] mod_sofia.c:656 SOFIA EXCHANGE_MEDIA
 2021-10-07 16:37:30.583346 [DEBUG] switch_rtp.c:5619 Send start packet for
[5] ts=960 dur=160/160/2000 seq=26795 lw=960



This seemingly shouldn't be an issue. FS1 already has active media from the
A leg, so it should initiate to the B leg. The B leg has been instructed to
play a file, so it should initiate to the A leg...
But if this is somehow unavoidable, perhaps we need a workaround config,
where we have a simple variable in the bridge string to avoid the standoff?

-Avi Marcus



On Thu, Oct 7, 2021 at 6:01 PM Brian West <brian at freeswitch.com> wrote:

> execure_on_answer=playback::silence_stream://100 should solve it.
>
> /b
> PS, the non pc term that this has been said to be is
> https://en.wikipedia.org/wiki/Mexican_standoff
>
> On Thu, Oct 7, 2021 at 7:39 AM Avi Marcus <avi at avimarcus.net> wrote:
>
>> I meant there's audio from pstn to fs1, but indeed I'm observing no audio
>> between fs1 and fs2.
>>
>> What api should I call with api on answer..?
>>
>> On Thu, Oct 7, 2021, 3:19 PM David Villasmil <
>> david.villasmil.work at gmail.com> wrote:
>>
>>> If you see rtp glowing both ways, then this is not the stalemate I was
>>> talking about. The scenario I’m referring to is about FS not starting
>>> sending rtp waiting for the other side to start sending, and the other side
>>> doing the same thing, thus going into a stalemate. This is solved by
>>> injecting a silence (I would do api_on_answer).
>>>
>>> What you’re describing seems different to me.
>>>
>>> On Thu, 7 Oct 2021 at 12:36, Avi Marcus <avi at avimarcus.net> wrote:
>>>
>>>> I'm using dialplan bridge, so then the dialplan is over. How do I send
>>>> silence after the bridge...? An api_on_answer with a uuid_broadcast..
>>>> seems overly complicated.
>>>>
>>>> <action application="bridge" data="sofia/external/
>>>> number at yyy.bestfone.com"/>
>>>>
>>>>
>>>> (And I don't know why there isn't audio - I had to set up an audio to
>>>> get to this options in the IVR... so there's already audio. And Server B
>>>> also started a file playback so should have initiated audio.)
>>>>
>>>>
>>>> -Avi Marcus
>>>>
>>>> On Thu, Oct 7, 2021 at 1:41 PM David Villasmil <
>>>> david.villasmil.work at gmail.com> wrote:
>>>>
>>>>> I seem to remember Brian saying this was because FS is waiting for the
>>>>> remote end to send audio before starting itself. I believe he recommended
>>>>> sending an empty (silence) to force the audio stream to be sent even if fs
>>>>> hasn’t received anything.
>>>>>
>>>>> On Thu, 7 Oct 2021 at 07:50, Avi Marcus <avi at avimarcus.net> wrote:
>>>>>
>>>>>> I started a new thread in case anyone muted it... it wasn't simply a
>>>>>> network issue.
>>>>>>
>>>>>> It seems the bridging occurs and dialplan processes, but no media
>>>>>> flows - until DTMF from the A-leg.
>>>>>> Call flow: PSTN (via carrier) to freeswitch A -> media and IVR ->
>>>>>> freeswitch B.
>>>>>>
>>>>>> Calls directly from carrier to Freeswitch B are fine.
>>>>>> Calls from a different carrier to Freeswitch A -> media and IVR ->
>>>>>> Freeswitch B are also fine.
>>>>>> So it sounds like a carrier/unique SIP/RTP issue, but since FS is in
>>>>>> the media path, it's an FS issue...
>>>>>>
>>>>>>
>>>>>> I actually mcguyvered this right now with a queue_dtmf before the
>>>>>> bridge, to force the audio stream to update.
>>>>>>
>>>>>> Here's the log on freeswitch B:
>>>>>>
>>>>>> EXECUTE [depth=0] sofia/external/972581234567 at 172.123.123.123
>>>>>>  log(DEBUG class chosen: 1234567)
>>>>>> 2021-10-07 09:16:24.343175 [DEBUG
>>>>>> ] mod_dptools.c:1879 class chosen: 1234567
>>>>>> EXECUTE [depth=0] sofia/external/972581234567 at 172.123.123.123
>>>>>>  javascript(conference/lookupAndJoinConference.js 1234567)
>>>>>> EXECUTE [depth=0] sofia/external/972581234567 at 172.123.123.123
>>>>>>  playback(class/hold-wait-teacher.wav)
>>>>>> 2021-10-07 09:16:24.363379 [DEBUG
>>>>>> ] sofia.c:7406 Channel sofia/external/972581234567 at 172.123.123.123
>>>>>>  entering state [completed][200]
>>>>>> 2021-10-07 09:16:24.363379 [DEBUG
>>>>>> ] sofia.c:7406 Channel sofia/external/972581234567 at 172.123.123.123
>>>>>>  entering state [ready][200]
>>>>>> 2021-10-07 09:16:24.363379 [DEBUG
>>>>>> ] switch_ivr_play_say.c:1486 Codec Activated L16 at 8000hz
>>>>>>  1 channels 20ms
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2021-10-07 09:16:34.903283 [DEBUG
>>>>>> ] switch_rtp.c:7793 Correct audio ip/port confirmed.
>>>>>> 2021-10-07 09:16:34.923190 [DEBUG
>>>>>> ] switch_rtp.c:8038 RTP RECV DTMF 3:2080
>>>>>> 2021-10-07 09:16:34.923190 [INFO
>>>>>> ] switch_channel.c:522 RECV DTMF 3:2080
>>>>>> 2021-10-07 09:16:34.923190 [DEBUG] mod_dptools.c:2389 Digit 3
>>>>>> 2021-10-07 09:16:37.143169 [DEBUG
>>>>>> ] switch_ivr_play_say.c:1931 done playing file /usr/share/freeswitch/sounds/en/us/matthew/class/hold-wait-teacher.wav
>>>>>>
>>>>>>
>>>>>> You can see a 10 second gap between call ready 200 and correct
>>>>>> audio/ip and file done playing (it's a 2 second file), and this doesn't
>>>>>> happen automatically, only when I choose to press something.
>>>>>>
>>>>>>
>>>>>> Any ideas as to the root cause of this?
>>>>>>
>>>>>>
>>>>>> -Avi Marcus
>>>>>>
>>>>>> ---------- Forwarded message ---------
>>>>>> From: Avi Marcus <avi at avimarcus.net>
>>>>>> Date: Wed, Oct 6, 2021 at 3:32 PM
>>>>>> Subject: Bridge to other FS server has no audio ???
>>>>>> To: FreeSWITCH Users Help <FreeSWITCH-users at lists.freeswitch.org>
>>>>>>
>>>>>>
>>>>>> Any ideas on why a call doesn't have media? It used to work, but I
>>>>>> think my upstream changed his SDP again.
>>>>>>
>>>>>> - FreeSWITCH Server A - call comes in and bypass_media bridges to FS
>>>>>> server B. Media works.
>>>>>> - FreeSWITCH Server A - call comes in and bridges to FS server B (not
>>>>>> on bypass). Media works.
>>>>>> - FreeSWITCH Server A - call comes in, gets answered, then bridges to
>>>>>> FS server B. Call looks OK, but no media is flowing (I don't hear anything,
>>>>>> PCAPs just have SIP, and there isn't 80kbps network traffic). All the same
>>>>>> codecs are set in the json cdrs (PCMU).
>>>>>>
>>>>>> FS server B is to join a conference if that matters.
>>>>>>
>>>>>> I was assuming it had to do with codecs, but setting
>>>>>> absolute_codec_string to PCMU doesn't make any difference in the logs  -
>>>>>> it's already always PCMU.
>>>>>>
>>>>>> I have NO clue what further could cause this other than codecs, which
>>>>>> seem to be fine. Any ideas please?
>>>>>>
>>>>>>
>>>>>> -Avi Marcus
>>>>>>
>>>>>>
>>>>>> _________________________________________________________________________
>>>>>>
>>>>>> The FreeSWITCH project is sponsored by SignalWire
>>>>>> https://signalwire.com
>>>>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>>>>>> services.
>>>>>> Build your next product on our scalable cloud platform.
>>>>>>
>>>>>> Join our online community to chat in real time
>>>>>> https://signalwire.community
>>>>>>
>>>>>> Professional FreeSWITCH Services
>>>>>> sales at freeswitch.com
>>>>>> https://freeswitch.com
>>>>>>
>>>>>> Official FreeSWITCH Sites
>>>>>> https://freeswitch.com/oss
>>>>>> https://freeswitch.org/confluence
>>>>>> https://cluecon.com
>>>>>>
>>>>>> FreeSWITCH-users mailing list
>>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>>> UNSUBSCRIBE:
>>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>>> https://freeswitch.com
>>>>>
>>>>> --
>>>>> Regards,
>>>>>
>>>>> David Villasmil
>>>>> email: david.villasmil.work at gmail.com
>>>>> phone: +34669448337
>>>>>
>>>>> _________________________________________________________________________
>>>>>
>>>>> The FreeSWITCH project is sponsored by SignalWire
>>>>> https://signalwire.com
>>>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>>>>> services.
>>>>> Build your next product on our scalable cloud platform.
>>>>>
>>>>> Join our online community to chat in real time
>>>>> https://signalwire.community
>>>>>
>>>>> Professional FreeSWITCH Services
>>>>> sales at freeswitch.com
>>>>> https://freeswitch.com
>>>>>
>>>>> Official FreeSWITCH Sites
>>>>> https://freeswitch.com/oss
>>>>> https://freeswitch.org/confluence
>>>>> https://cluecon.com
>>>>>
>>>>> FreeSWITCH-users mailing list
>>>>> FreeSWITCH-users at lists.freeswitch.org
>>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>>> UNSUBSCRIBE:
>>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>>> https://freeswitch.com
>>>>
>>>>
>>>> _________________________________________________________________________
>>>>
>>>> The FreeSWITCH project is sponsored by SignalWire
>>>> https://signalwire.com
>>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>>>> services.
>>>> Build your next product on our scalable cloud platform.
>>>>
>>>> Join our online community to chat in real time
>>>> https://signalwire.community
>>>>
>>>> Professional FreeSWITCH Services
>>>> sales at freeswitch.com
>>>> https://freeswitch.com
>>>>
>>>> Official FreeSWITCH Sites
>>>> https://freeswitch.com/oss
>>>> https://freeswitch.org/confluence
>>>> https://cluecon.com
>>>>
>>>> FreeSWITCH-users mailing list
>>>> FreeSWITCH-users at lists.freeswitch.org
>>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>>> UNSUBSCRIBE:
>>>> http://lists.freeswitch.org/mailman/options/freeswitch-users
>>>> https://freeswitch.com
>>>
>>> --
>>> Regards,
>>>
>>> David Villasmil
>>> email: david.villasmil.work at gmail.com
>>> phone: +34669448337
>>> _________________________________________________________________________
>>>
>>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>>> services.
>>> Build your next product on our scalable cloud platform.
>>>
>>> Join our online community to chat in real time
>>> https://signalwire.community
>>>
>>> Professional FreeSWITCH Services
>>> sales at freeswitch.com
>>> https://freeswitch.com
>>>
>>> Official FreeSWITCH Sites
>>> https://freeswitch.com/oss
>>> https://freeswitch.org/confluence
>>> https://cluecon.com
>>>
>>> FreeSWITCH-users mailing list
>>> FreeSWITCH-users at lists.freeswitch.org
>>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>>> https://freeswitch.com
>>
>> _________________________________________________________________________
>>
>> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
>> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
>> services.
>> Build your next product on our scalable cloud platform.
>>
>> Join our online community to chat in real time
>> https://signalwire.community
>>
>> Professional FreeSWITCH Services
>> sales at freeswitch.com
>> https://freeswitch.com
>>
>> Official FreeSWITCH Sites
>> https://freeswitch.com/oss
>> https://freeswitch.org/confluence
>> https://cluecon.com
>>
>> FreeSWITCH-users mailing list
>> FreeSWITCH-users at lists.freeswitch.org
>> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
>> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
>> https://freeswitch.com
>
>
>
> --
>
> Brian West | Co-founder and Developer
>
> Need Commercial support? email sales at freeswitch.com
>
> FreeSWITCH Solutions | 17345 Civic Drive #2531 Brookfield, WI 53045
> <https://maps.google.com/?q=17345+Civic+Drive+%232531+Brookfield,+WI+53045&entry=gmail&source=g>
>
> Email: brian at freeswitch.com
>
> Mobile: 918-424-9378
>
> Website: https://www.FreeSWITCH.com <https://www.freeswitch.com/>
>
> [image: https://www.facebook.com/signalwireinc?src=email]
> <https://www.facebook.com/freeswitch> [image:
> https://twitter.com/freeswitch] <https://twitter.com/freeswitch>
> _________________________________________________________________________
>
> The FreeSWITCH project is sponsored by SignalWire https://signalwire.com
> Enhance your FreeSWITCH install with disruptive priced SMS and PSTN
> services.
> Build your next product on our scalable cloud platform.
>
> Join our online community to chat in real time
> https://signalwire.community
>
> Professional FreeSWITCH Services
> sales at freeswitch.com
> https://freeswitch.com
>
> Official FreeSWITCH Sites
> https://freeswitch.com/oss
> https://freeswitch.org/confluence
> https://cluecon.com
>
> FreeSWITCH-users mailing list
> FreeSWITCH-users at lists.freeswitch.org
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users
> https://freeswitch.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20211007/8ae6421f/attachment-0001.html>


More information about the FreeSWITCH-users mailing list