Very interesting.
Running this:
[macro-dialout-trunk-predial-hook]
exten => s,1,NoOp(accountcode is ${CHANNEL(accountcode)})
Shows this when called via Sangoma Talk (mobile app):
841 [2024-05-28 11:02:15] VERBOSE[13277][C-00000002] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] NoOp("PJSIP/200-00000002", "accountcode is TEST") in new stack
But shows this when called via Sangoma Desktop:
1014 [2024-05-28 11:03:07] VERBOSE[13556][C-00000003] pbx.c: Executing [s@macro-dialout-trunk-predial-hook:1] NoOp("PJSIP/98200-00000004", "accountcode is ") in new stack
So it appears that the issues has to be redefined as: when calling from Sangoma Desktop, accountcode does not seem to populate as variable in dialplan. Any idea why?
For my user case having a desktop app is a must have, so I really need to make this work.