freeswitch
freeswitch copied to clipboard
Unable to hear MOH, after uuid_hold
Describe the bug A call from 1000 to 1001, when execute uuid_hold on bleg, unable hear MOH on aleg, but when uuid_hold is executed on aleg, MOH can be hear on bleg.
To Reproduce Steps to reproduce the behavior:
- Using default configurations
- Dial from 1000 to 1001
- Execute uuid_hold <bleg uuid>
- Should be hear MOH on phone 1000
Expected behavior Hold on either legs can be heard MOH.
Package version or git hash
- FreeSWITCH version: 1.10.8-dev+git~20211205T095551Z~e632759ae8~64bit (git e632759 2021-12-05 09:55:51Z 64bit)
Trace logs
2021-12-06 17:10:36.921187 99.03% [NOTICE] switch_channel.c:1123 New Channel sofia/internal/[email protected] [9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b]
2021-12-06 17:10:36.921187 99.03% [INFO] sofia.c:10462 sofia/internal/[email protected] receiving invite from 192.168.56.1:56474 version: 1.10.8-dev git e632759 2021-12-05 09:55:51Z 64bit call-id: 17f998546b414470bf8ac785dcca759c
2021-12-06 17:10:36.939192 99.03% [INFO] sofia.c:10462 sofia/internal/[email protected] receiving invite from 192.168.56.1:56474 version: 1.10.8-dev git e632759 2021-12-05 09:55:51Z 64bit call-id: 17f998546b414470bf8ac785dcca759c
2021-12-06 17:10:36.958862 99.03% [INFO] mod_dialplan_xml.c:639 Processing 1000 <1000>->1001 in context default
EXECUTE [depth=0] sofia/internal/[email protected] set(open=true)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-spymap/1000/9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-last_dial/1000/1001)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-last_dial/global/9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b)
EXECUTE [depth=0] sofia/internal/[email protected] export(RFC2822_DATE=Mon, 06 Dec 2021 17:10:36 +0800)
EXECUTE [depth=0] sofia/internal/[email protected] export(dialed_extension=1001)
EXECUTE [depth=0] sofia/internal/[email protected] bind_meta_app(1 b s execute_extension::dx XML features)
2021-12-06 17:10:36.958862 99.03% [INFO] switch_ivr_async.c:4774 Bound B-Leg: *1 execute_extension::dx XML features
EXECUTE [depth=0] sofia/internal/[email protected] bind_meta_app(2 b s record_session::/usr/local/freeswitch/recordings/1000.2021-12-06-17-10-36.wav)
2021-12-06 17:10:36.958862 99.03% [INFO] switch_ivr_async.c:4774 Bound B-Leg: *2 record_session::/usr/local/freeswitch/recordings/1000.2021-12-06-17-10-36.wav
EXECUTE [depth=0] sofia/internal/[email protected] bind_meta_app(3 b s execute_extension::cf XML features)
2021-12-06 17:10:36.958862 99.03% [INFO] switch_ivr_async.c:4774 Bound B-Leg: *3 execute_extension::cf XML features
EXECUTE [depth=0] sofia/internal/[email protected] bind_meta_app(4 b s execute_extension::att_xfer XML features)
2021-12-06 17:10:36.958862 99.03% [INFO] switch_ivr_async.c:4774 Bound B-Leg: *4 execute_extension::att_xfer XML features
EXECUTE [depth=0] sofia/internal/[email protected] set(ringback=%(2000,4000,440,480))
EXECUTE [depth=0] sofia/internal/[email protected] set(transfer_ringback=local_stream://moh)
EXECUTE [depth=0] sofia/internal/[email protected] set(call_timeout=30)
EXECUTE [depth=0] sofia/internal/[email protected] set(hangup_after_bridge=true)
EXECUTE [depth=0] sofia/internal/[email protected] set(continue_on_fail=true)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-call_return/1001/1000)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-last_dial_ext/1001/9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b)
EXECUTE [depth=0] sofia/internal/[email protected] set(called_party_callgroup=techsupport)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-last_dial_ext/techsupport/9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-last_dial_ext/global/9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b)
EXECUTE [depth=0] sofia/internal/[email protected] hash(insert/192.168.56.21-last_dial/techsupport/9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b)
EXECUTE [depth=0] sofia/internal/[email protected] bridge(user/[email protected])
2021-12-06 17:10:36.958862 99.03% [NOTICE] switch_channel.c:1123 New Channel sofia/internal/[email protected]:52101 [1dd41954-ec48-4ef4-89db-8246057674db]
2021-12-06 17:10:36.958862 99.03% [INFO] sofia_glue.c:1651 sofia/internal/[email protected]:52101 sending invite call-id: (null)
2021-12-06 17:10:36.958862 99.03% [NOTICE] sofia.c:7610 Ring-Ready sofia/internal/[email protected]:52101!
2021-12-06 17:10:37.018641 99.03% [INFO] switch_ivr_originate.c:1295 Sending early media
2021-12-06 17:10:37.018641 99.03% [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/[email protected]!
2021-12-06 17:10:38.039236 99.00% [NOTICE] sofia.c:8683 Channel [sofia/internal/[email protected]:52101] has been answered
2021-12-06 17:10:38.058936 99.00% [NOTICE] switch_ivr_originate.c:3834 Channel [sofia/internal/[email protected]] has been answered
freeswitch@fs21>
freeswitch@fs21> show channels
uuid,direction,created,created_epoch,name,state,cid_name,cid_num,ip_addr,dest,application,application_data,dialplan,context,read_codec,read_rate,read_bit_rate,write_codec,write_rate,write_bit_rate,secure,hostname,presence_id,presence_data,accountcode,callstate,callee_name,callee_num,callee_direction,call_uuid,sent_callee_name,sent_callee_num,initial_cid_name,initial_cid_num,initial_ip_addr,initial_dest,initial_dialplan,initial_context
9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b,inbound,2021-12-06 17:10:36,1638781836,sofia/internal/[email protected],CS_EXECUTE,1000,1000,192.168.56.1,1001,bridge,user/[email protected],XML,default,PCMA,8000,64000,PCMA,8000,64000,,fs21,[email protected],,1000,ACTIVE,Outbound Call,1001,SEND,9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b,Outbound Call,1001,1000,1000,192.168.56.1,1001,XML,default
1dd41954-ec48-4ef4-89db-8246057674db,outbound,2021-12-06 17:10:36,1638781836,sofia/internal/[email protected]:52101,CS_EXCHANGE_MEDIA,Extension 1000,1000,192.168.56.1,1001,,,XML,default,PCMA,8000,64000,PCMA,8000,64000,,fs21,[email protected],,,ACTIVE,Outbound Call,1001,SEND,9995f03c-5fb1-4ac1-8ff5-ba9a48ab377b,Extension 1000,1000,Extension 1000,1000,192.168.56.1,1001,XML,default
2 total.
freeswitch@fs21> uuid_hold 1dd41954-ec48-4ef4-89db-8246057674db
+OK Success
2021-12-06 17:11:03.739848 98.03% [INFO] sofia_glue.c:1651 sofia/internal/[email protected]:52101 sending invite call-id: (null)
EXECUTE [depth=0] sofia/internal/[email protected] playback(local_stream://moh)
freeswitch@fs21>
freeswitch@fs21> uuid_hold toggle 1dd41954-ec48-4ef4-89db-8246057674db
+OK Success
2021-12-06 17:11:15.920479 98.30% [INFO] sofia_glue.c:1651 sofia/internal/[email protected]:52101 sending invite call-id: (null)
freeswitch@fs21> freeswitch@fs21> 4-89db-8246057674db
2021-12-06 17:11:22.099426 98.33% [NOTICE] sofia.c:1065 Hangup sofia/internal/[email protected] [CS_EXECUTE] [NORMAL_CLEARING]
2021-12-06 17:11:22.099426 98.33% [NOTICE] switch_ivr_bridge.c:1029 Hangup sofia/internal/[email protected]:52101 [CS_EXCHANGE_MEDIA] [NORMAL_CLEARING]
2021-12-06 17:11:22.099426 98.33% [NOTICE] switch_core_session.c:1771 Session 8 (sofia/internal/[email protected]:52101) Ended
2021-12-06 17:11:22.099426 98.33% [NOTICE] switch_core_session.c:1775 Close Channel sofia/internal/[email protected]:52101 [CS_DESTROY]
2021-12-06 17:11:22.120103 98.33% [NOTICE] switch_core_session.c:1771 Session 7 (sofia/internal/[email protected]) Ended
2021-12-06 17:11:22.120103 98.33% [NOTICE] switch_core_session.c:1775 Close Channel sofia/internal/[email protected] [CS_DESTROY]
freeswitch@fs21>
Hint May be cause by commit https://github.com/signalwire/freeswitch/commit/badd59d609b5d5583c01d543e0d6b3a9cb365df1#diff-aac8e4e42b896ccba047371b04651af489ab16ee133cdc27b38959f3b78ccea4L3459. If comments the if block at line https://github.com/signalwire/freeswitch/blob/master/src/switch_core_media.c#L3467, MOH can be heard, see blow code.
diff --git a/src/switch_core_media.c b/src/switch_core_media.c
index 0b337082b8..210f0b3d4d 100644
--- a/src/switch_core_media.c
+++ b/src/switch_core_media.c
@@ -3461,14 +3461,6 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_write_frame(switch_core_sessio
}
}
- if (type == SWITCH_MEDIA_TYPE_AUDIO) {
- switch_media_flow_t audio_flow = switch_core_session_media_flow(session, SWITCH_MEDIA_TYPE_AUDIO);
-
- if (audio_flow != SWITCH_MEDIA_FLOW_SENDRECV && audio_flow != SWITCH_MEDIA_FLOW_SENDONLY) {
- return SWITCH_STATUS_SUCCESS;
- }
- }
-
if (type != SWITCH_MEDIA_TYPE_TEXT) {
while (!(engine->read_codec.implementation && switch_rtp_ready(engine->rtp_session))) {
i have same issue, comments the if block can solve the issue.
Same issue here with 1.10.7 v1.10.6 does not have this issue.
If A calls B and B puts the caller on hold, no MOH is heard by A All other hold/MOH scenarios work here apart from the above.
Both internal and external calls have this issue.
i have same issue.May be can add a flag to avoid this.
This isn't a bug, its behaving as designed, see my comment on the PR, I need more details on what you want to accomplish.
Base on https://github.com/signalwire/freeswitch/blob/master/src/switch_ivr.c#L1554, when we hold a channel, fs will playback MOH on partner channel, I think it is correct. When we uuid_hold B, means B busy to other things, and A should be hear a MOH music. And fs send SIP to B's phone, so B's phone known that hold.
@briankwest
This isn't a bug, its behaving as designed, see my comment on the PR, I need more details on what you want to accomplish.
It seems that we're hitting the same problem in our tests of freeswitch 1.10.7 Could you please point to which PR & Comment you are referring to?
Answering to myself for future reference : https://github.com/signalwire/freeswitch/pull/1861
@all @briankwest As I said before, we are experiencing the same regression mentioned here since freeswitch 1.10.7. I would like to explain our use case:
In our call center we have systematically 2 legs : legA="incoming call" and legB="outgoing call" (to an agent)
Here is the code we execute:
legA_session:execute("export", "hold_music=/tmp/sounds/waiting.wav")
legA_session:execute("bridge_export", "hold_music=/tmp/sounds/waiting.wav")
freeswitch.bridge(legA_session, legB_session)
In fs_cli, if we do :
uuid_on_hold legA_session.uuid
The channel of legA_session.uuid changes to state=hold The caller on legA does not hear the music anymore since 1.10.7
On the other hand, if we do :
uuid_on_hold legB_session.uuid
The channel of legB_session.uuid changes to state=hold The agent on legB hears the music.
Please advise, as this severe regression prevents us from upgrading to any freeswitch > 1.10.6
Could anyone from SignalWire have a look?
@briankwest has requested to detail use cases. I provided my company's use of this functionality above,
as did @GangZhuo here, and @eighty-zou in the pr : https://github.com/signalwire/freeswitch/pull/1861#issuecomment-1330240217
Could anyone look at this issue again?
As requested, uses cases have been reported by three different people but we haven't heard back from Signal Wire since.
It's unclear as why these use cases would be invalid and why the functional regression since 1.10.7 shouldn't be treated as a bug.