Let me start with the scenario I want to achieve:
-> Local SIP account (party A) calls number 1111
-> 1111,1, Dial(Mobile/device/number)
the mobile device calls the number and someone (party B) picks up
-> party A puts the call on HOLD
-> asterisk puts the intermediate Mobile device on hold
(and plays hold announcement <- my goal)
I have been struggling with that for quite a while, so I went through the chan_mobile code and saw that there is no AT+CHLD implementation.
So I dug a bit more and realized I can send CLI command ‘mobile rfcomm device AT+CHLD=2’. And it works… I then wrapped it in AMI command and everything is accomplished.
But… I wanted to achieve this using SIP only. So I have two questions:
Should putting on hold a local call, that was mixed with an external channel (chan_mobile or SIP), should put the external channel on hold as well?
I tried Dial(chan/dev/no,30,U(sub-announcement)) and adding some code to react to DTMF sent from party A, to invoke the CLI command, within the subroutine, but this is before the call is actually established and doesn’t suit my needs. Is there a way to actually invoke this during an established call in this scenario?? Or maybe tell Asterisk somehow to react to the local hold and enter some subroutine during the call?
Thanks in advance!