Freeswitch bgapi originate command with ignore_early_media=true
Asked Answered
B

1

6

I'm trying the following scenario on freeswitch:

  • Create a call (a-leg)
  • Create another call (b-leg)
  • Bridge then together

The b-leg phone is a dial plan in other freeswitch is the following:

<extension name="EarlyMedia">
    <condition field="destination_number" expression="^[+]?[1]?<MY_NUMBER>">
        <action application="pre_answer"/>
        <action application="playback" data="/home/ubuntu/EARLY_MEDIA.wav"/>
        <action application="sleep" data="1000"/>
        <action application="answer"/>
        <action application="playback" data="/home/ubuntu/CALL_MEDIA.wav"/>
        <action application="sleep" data="1000"/>
    </condition>
</extension>

The sequence of commands that i sent to freeswitch is the following:

  • a-leg

bgapi originate {ignore_early_media=true,bridge_early_media=false,origination_caller_id_number=sofia/external/<MY_FROM_NUMBER>@<MY_IP>,origination_channel_name=<MY_CHANNEL>,ringback=\'%(2000,4000,440,480)\'}sofia/external/<A-LEG NUMBER>@<MY_IP> &park()

  • b-leg

bgapi originate {ignore_early_media=true,bridge_early_media=false,origination_caller_id_number=sofia/external/<MY_FROM_NUMBER>@<MY_IP>,origination_channel_name=<MY_CHANNEL>,ringback=\'%(2000,4000,440,480)\'}sofia/external/<B-LEG NUMBER>@<MY_IP> &park()

  • uuid_bridge

bgapi uuid_bridge <A-LEG UUID> <B-LEG UUID>

The problem is that even with ignore_early_media=true,bridge_early_media=false i hear the early media on A-LEG

Bax answered 8/10, 2015 at 13:31 Comment(0)
L
0

ignore_early_media does not mean you do not 'hear' the early media. It just means Freeswitch will not treat it as an answer.

From the docs ignore_early_media:

Controls if the call returns on early media or not. Default is false

Even with ringback=\'%(2000,4000,440,480)\ set, I have found that Freeswitch will still send a 183 SIP response. If it is your Freeswitch sending the 183 you do not want, remove ringback=\'%(2000,4000,440,480)\ and see if that works. Also, you can use ring_ready to send a 180 which should not have SDP/early media.

Laniary answered 1/4, 2019 at 3:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.