Hi, is possible set up dialplan as follow? I have Asterisk and I need hangup call from mobile phone, and Dial or ringing to another SIP number, which mobile call was hangup?
You would need to use the Originate[1] dialplan application in an βhβ extension or hangup handler[2]. Once you do Hangup() in normal execution the subsequent steps are not executed, same if they hang up.
Neither are right. As I mentioned, once Hangup() is executed dialplan execution stops except for the βhβ extension or hangup handlers. You canβt proceed in the dialplan normally with a channel that no longer has anyone connected to it. The wiki page I posted has a few examples of using hangup handlers. If you want to use the βhβ extension you could do something like:
It is not entirely clear what you are trying to do, but the answers so far assume that when a call between A and B, or A and internal services, ends, , you want to start a call between C and D.
If you want to do that and play a tone to A, after A has been answered, you will have to explicitly play a tone, as Hangup cannot initiate tones on a channel that has already been answered.
I think, though, that you need to provide a detailed specification of how you want the system to behave, and also the higher level requirement that results in your wanting that behaviour.
For example, if want to a sequence in which A calls to B, and when B hangups, A is connected to C, that is completely different from the above.