At my system the MoH behaviour is not what I wanted to achieve. I understand it is the default behaviour.
Here is what happens:
Call comes in and is picked up at a phone.
Call should be transferred to another phone.
Press “hold” on the phone (Unify Openstage 60) and call is put in hold - caller hears moh
You dial the extension where the call should be transferred to and hang up.
Transfer phone rings until someone picks up - caller hears ringing during that time
I would like to have moh played all time.
What i know is, that when you dial the extension, the dialplan of the calling phone is used. After hangup the caller is being put in that position and hears the ringing.
I played with variables and inheritance with no success. As I understand the logic, when the call is put into hold, it is still existing. When you then call the number of the transfer extension this starts a new call - no inheritance works.
Is there any way do detect that this extension has a call in hold and therefore uses a different context for the second call?
The initial context is not easy to determine. I would like to know that a specific extension has a call in hold. And that call in hold should be after hangup of the transferring extension be put in a specific dialplan.
Actually I debuged all contexts while transferring the call.
Call comes in and is handled in [incoming] context. Fine.
Now I take i.e. phone 1234 and answer the call. When I put that call on hold and call extension 5678 the context [dp1234] is used! Now I place the receiver of phone 1234 and the waiting caller is transferred to context [dp1234] and gets to hear the ringing.
My idea was that the waiting call gets transferred to some [transfer] context when I place down receiver of 1234. Basically the global variable TRANSFER_CONTEXT offers some sort of that function but only works if the transfer is done with #1 and not by the method described above. Unfortunately there this variable is simply ignored.
With a SIP attended transfer, the call looks like a call on the phone’s second line until you the REFER is sent. Asterisk has no idea it is a transfer when it starts the dialplan for it.
Yep, that logical. But the moment the REFER is sent, everything is defined again. Now that IS a transfer. I’d expect Asterisk to transfer the whole stuff that moment to some [transfer] context if advised so, maybe via variable, config etc.
The transfer command exactly does that … why not the attended transfer ?
Ok after a while I hat some more time to investigate this matter.
Debug reveals, that actually the phone (OpenStage 60) sends a REFER message to asterisk.
Asterisk then transfers the called extension (in the upper example 5678) to the ${TRANSFER_CONTEXT}. Excellent.
But then nothing happens. As the extension is already dialled there is a ringtone on this SIP channel. When the extension is transferred to the new context it gets the channel audio. Or in short, everything was established in the old context, then transferred to the ${TRANSFER_CONTEXT} which only changes the actual context but nothing else.
What I am missing is sort of an option to define, if the transferee is being put onto the channel audio or onto MOH.
The call waiting is generally put onto MOH audiostream. Now we could define a Dial-Option ( E is not used yet ) that does following:
If a parked call for this extension exists and is transferred it will be put on MOH instead on channel audio while the call is not answered.
BTW, is there any possibilty to check if I have a parked call for my extension?
Were you able to resolve this issue? i have a similar issue were i would like to play the MOH, once the transfer button is pressed. but for only transferred / or transferring calls
The TRANSFER_EXTEN variable now can be set on the
transferer’s channel in order to allow the transfer
function to automatically attempt to go to the extension
contained in this variable, if it exists. The transfer
context behavior is not changed (TRANSFER_CONTEXT is used
if it exists; otherwise the default context is used).