Help with Early Media

Status
Not open for further replies.

yois

New Member
Jul 14, 2020
12
1
3
41
I want to use early media in probably the most typical fashion - I have a few parked DIDs that I'd like to play a message before hanging up the call with a 404. I have no problem accomplishing this with Asterisk but I can't seem to figure this out with FreeSWITCH/FusionPBX. Audio is not heard by the calling party. I have the identical setup using Asterisk and it works properly, so this is not a carrier issue.

Here is my code snippet:
<action application="export" data="call_direction=inbound" inline="true"/>
<action application="set" data="domain_uuid=e32236a8-6845-4d9f-a93f-e3087edea91e" inline="true"/>
<action application="set" data="domain_name=my.domain.com" inline="true"/>
<action application="set" data="bypass_media=false"/>
<action application="pre_answer" data=""/>
<action application="sleep" data="500"/>
<action application="playback" data="/var/lib/freeswitch/recordings/my.domain.com/SIT_NotInService.wav"/>
<action application="hangup" data="UNALLOCATED_NUMBER"/>


And here is the log:
[DEBUG] switch_core_state_machine.c:287 (sofia/internal/12121112222@XX.XX.XX.XX:5060) State Change CS_ROUTING -> CS_EXECUTE
[DEBUG] switch_core_state_machine.c:644 (sofia/internal/12121112222@XX.XX.XX.XX:5060) State ROUTING going to sleep
[DEBUG] switch_core_state_machine.c:585 (sofia/internal/12121112222@XX.XX.XX.XX:5060) Running State Change CS_EXECUTE (Cur 2 Tot 5901)
[DEBUG] switch_core_state_machine.c:651 (sofia/internal/12121112222@XX.XX.XX.XX:5060) State EXECUTE
[DEBUG] mod_sofia.c:209 sofia/internal/12121112222@XX.XX.XX.XX:5060 SOFIA EXECUTE
[DEBUG] switch_core_state_machine.c:329 sofia/internal/12121112222@XX.XX.XX.XX:5060 Standard EXECUTE
EXECUTE [depth=0] sofia/internal/12121112222@XX.XX.XX.XX:5060 set(caller_id_number=12121112222)
[DEBUG] mod_dptools.c:1672 SET sofia/internal/12121112222@XX.XX.XX.XX:5060 [caller_id_number]=[12121112222]
EXECUTE [depth=0] sofia/internal/12121112222@XX.XX.XX.XX:5060 set(effective_caller_id_number=12121112222)
[DEBUG] mod_dptools.c:1672 SET sofia/internal/12121112222@XX.XX.XX.XX:5060 [effective_caller_id_number]=[12121112222]
EXECUTE [depth=0] sofia/internal/12121112222@XX.XX.XX.XX:5060 set(bypass_media_after_bridge=true)
[DEBUG] mod_dptools.c:1672 SET sofia/internal/12121112222@XX.XX.XX.XX:5060 [bypass_media_after_bridge]=[true]
EXECUTE [depth=0] sofia/internal/12121112222@XX.XX.XX.XX:5060 pre_answer()
[INFO] mod_dptools.c:1477 Sending early media
[NOTICE] mod_sofia.c:2596 Pre-Answer sofia/internal/12121112222@XX.XX.XX.XX:5060!
[DEBUG] switch_channel.c:3565 (sofia/internal/12121112222@XX.XX.XX.XX:5060) Callstate Change RINGING -> EARLY
EXECUTE [depth=0] sofia/internal/12121112222@XX.XX.XX.XX:5060 sleep(500)
[DEBUG] sofia.c:7325 Channel sofia/internal/12121112222@XX.XX.XX.XX:5060 entering state [early][183]
[DEBUG] switch_core_media.c:5647 Audio Codec Compare [PCMU:0:8000:20:64000:1] ++++ is saved as a match
[DEBUG] switch_core_media.c:5647 Audio Codec Compare [PCMA:8:8000:20:64000:1] ++++ is saved as a match
[DEBUG] switch_core_media.c:5508 Set telephone-event payload to 101@8000
[DEBUG] switch_core_media.c:3837 Set Codec sofia/internal/12121112222@XX.XX.XX.XX:5060 PCMU/8000 20 ms 160 samples 64000 bits 1 channels
[DEBUG] switch_core_codec.c:111 sofia/internal/12121112222@XX.XX.XX.XX:5060 Original read codec set to PCMU:0
[DEBUG] switch_core_media.c:5851 Set telephone-event payload to 101@8000
[DEBUG] switch_core_media.c:5909 sofia/internal/12121112222@XX.XX.XX.XX:5060 Set 2833 dtmf send payload to 101 recv payload to 101
[DEBUG] switch_core_media.c:8661 AUDIO RTP [sofia/internal/12121112222@XX.XX.XX.XX:5060] YY.YY.YY.YY port 24586 -> ZZ.ZZ.ZZ.ZZ port 17378 codec: 0 ms: 20
[DEBUG] switch_rtp.c:4413 Starting timer [soft] 160 bytes per 20ms
[DEBUG] switch_core_media.c:8975 sofia/internal/12121112222@XX.XX.XX.XX:5060 Set 2833 dtmf send payload to 101
[DEBUG] switch_core_media.c:8982 sofia/internal/12121112222@XX.XX.XX.XX:5060 Set 2833 dtmf receive payload to 101
[DEBUG] switch_core_media.c:9005 sofia/internal/12121112222@XX.XX.XX.XX:5060 Set rtp dtmf delay to 40
[NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/12121112222@XX.XX.XX.XX:5060!
[ERR] switch_ivr.c:1778 Can't re-establsh media on sofia/internal/12121112222@XX.XX.XX.XX:5060
[DEBUG] switch_core_session.c:2718 Application playback Requires media on channel sofia/internal/12121112222@XX.XX.XX.XX:5060!

 

yois

New Member
Jul 14, 2020
12
1
3
41
If this helps at all, a SIP trace shows that no SDP info is being sent in the 183 from pre_answer. Any ideas why?
 
Status
Not open for further replies.