I have tried to use music on hold to implement call waiting. but it's not working. I'll be grateful if someone helps me. Here is music on hold code--
[test]
mode=files
directory=waiting
sort=random
i changed code in macro-dial-one. here is the code --
exten => s,n(godial),ExecIf($["${EXTENSION_STATE(${DEXTEN})}" = "INUSE"]?Dial(${DSTRING},,m(test)))
here is the log i found -
[2021-04-30 23:25:43] VERBOSE[54593][C-00000866] pbx.c: -- Goto (macro-dial-one,s,43)
[2021-04-30 23:25:43] VERBOSE[54593][C-00000866] pbx.c: -- Executing [s@macro-dial-one:43] ExecIf("Local/FMPR-1268@from-internal-00000126;2", "1?Dial(SIP/1268,,m(test))") in new stack
[2021-04-30 23:25:43] VERBOSE[54593][C-00000866] netsock2.c: == Using SIP RTP TOS bits 184
[2021-04-30 23:25:43] VERBOSE[54593][C-00000866] netsock2.c: == Using SIP RTP CoS mark 5
[2021-04-30 23:25:43] VERBOSE[54593][C-00000866] app_dial.c: -- Called SIP/1268
[2021-04-30 23:25:43] VERBOSE[54593][C-00000866] res_musiconhold.c: -- Started music on hold, class 'test', on Local/FMPR-1268@from-internal-00000126;2
[2021-04-30 23:25:43] VERBOSE[54589][C-00000866] app_dial.c: -- Local/FMPR-1268@from-internal-00000126;1 is making progress passing it to SIP/1268-00000e65
[2021-04-30 23:25:43] VERBOSE[54589][C-00000866] app_dial.c: -- Connected line update to SIP/1268-00000e65 prevented.
[2021-04-30 23:25:43] VERBOSE[54589][C-00000866] app_dial.c: -- Connected line update to SIP/1268-00000e65 prevented.
[2021-04-30 23:25:43] WARNING[54593][C-00000866] mp3/interface.c: Junk at the beginning of frame 49443304
[2021-04-30 23:25:43] VERBOSE[54593][C-00000866] app_dial.c: -- SIP/1268-00000e66 is ringing
[2021-04-30 23:25:44] VERBOSE[54594][C-00000866] pbx.c: -- Executing [FMGL-01777770268#@from-internal:5] GotoIf("Local/FMGL-01777770268#@from-internal-00000127;2", "1?start") in new stack
[2021-04-30 23:25:44] VERBOSE[54594][C-00000866] pbx.c: -- Goto (from-internal,FMGL-01777770268#,3)
[2021-04-30 23:25:44] VERBOSE[54594][C-00000866] pbx.c: -- Executing [FMGL-01777770268#@from-internal:3] GotoIf("Local/FMGL-01777770268#@from-internal-00000127;2", "0?dodnd") in new stack
[2021-04-30 23:25:44] VERBOSE[54594][C-00000866] pbx.c: -- Executing [FMGL-01777770268#@from-internal:4] Wait("Local/FMGL-01777770268#@from-internal-00000127;2", "1") in new stack
[2021-04-30 23:25:44] VERBOSE[54593][C-00000866] res_musiconhold.c: -- Stopped music on hold on Local/FMPR-1268@from-internal-00000126;2
[2021-04-30 23:25:44] VERBOSE[54589][C-00000866] app_macro.c: == Spawn extension (macro-dial, s, 7) exited non-zero on 'SIP/1268-00000e65' in macro 'dial'
[2021-04-30 23:25:44] VERBOSE[54589][C-00000866] pbx.c: == Spawn extension (from-internal, 1268, 22) exited non-zero on 'SIP/1268-00000e65'
[2021-04-30 23:25:44] VERBOSE[54589][C-00000866] pbx.c: -- Executing [h@from-internal:1] Hangup("SIP/1268-00000e65", "") in new stack
[2021-04-30 23:25:44] VERBOSE[54589][C-00000866] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/1268-00000e65'
[2021-04-30 23:25:44] VERBOSE[54593][C-00000866] app_macro.c: == Spawn extension (macro-dial-one, s, 43) exited non-zero on 'Local/FMPR-1268@from-internal-00000126;2' in macro 'dial-one'
[2021-04-30 23:25:44] VERBOSE[54593][C-00000866] app_macro.c: == Spawn extension (macro-simple-dial, s, 6) exited non-zero on 'Local/FMPR-1268@from-internal-00000126;2' in macro 'simple-dial'
[2021-04-30 23:25:44] VERBOSE[54593][C-00000866] pbx.c: == Spawn extension (from-internal, FMPR-1268, 5) exited non-zero on 'Local/FMPR-1268@from-internal-00000126;2'
[2021-04-30 23:25:44] VERBOSE[54593][C-00000866] pbx.c: -- Executing [h@from-internal:1] Hangup("Local/FMPR-1268@from-internal-00000126;2", "") in new stack
[2021-04-30 23:25:44] VERBOSE[54593][C-00000866] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/FMPR-1268@from-internal-00000126;2'
[2021-04-30 23:25:44] VERBOSE[54594][C-00000866] pbx.c: == Spawn extension (from-internal, FMGL-01777770268#, 4) exited non-zero on 'Local/FMGL-01777770268#@from-internal-00000127;2'
[2021-04-30 23:25:44] VERBOSE[54594][C-00000866] pbx.c: -- Executing [h@from-internal:1] Hangup("Local/FMGL-01777770268#@from-internal-00000127;2", "") in new stack
[2021-04-30 23:25:44] VERBOSE[54594][C-00000866] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'Local/FMGL-01777770268#@from-internal-00000127;2'
[2021-04-30 23:25:44] VERBOSE[54590][C-00000866] app_mixmonitor.c: == MixMonitor close filestream (mixed)
[2021-04-30 23:25:44] VERBOSE[54590][C-00000866] app_mixmonitor.c: == End MixMonitor Recording SIP/1268-00000e65
[2021-04-30 23:25:47] NOTICE[51480] res_rtp_asterisk.c: Unknown RTP codec 126 received from '202.51.183.22:29726'