Dial extension or code, multicast a recording, hangup

This should be simple enough… I just want a speed dial button that will start multicast, play a recorded message, and hang up.

I’m trying this:

exten => 9901,1,Answer()
exten => 9901,n,Wait(1)
exten => 9901,n,Dial(MulticastRTP/basic/224.5.6.20:10011,,A(MailIsReceived))
exten => 9901,n,Wait(5)
exten => 9901,n,hangup()

… should be easey peasey, right? Well, it works, it answers, multi-cast pages and plays the recording… and… doesn’t hang up. It leaves the calling extension connected to multicast page (which I do not want). I want it to terminate the call… drop the multicast, and drop the call from the originating extension. Why isn’t hangup doing that?

Any help greatly appreciated.

I have only cloud systems so can’t test this, but I’m guessing that either the Dial command is overall ‘answered’ and so doesn’t return, or it isn’t answered and so hangs.

If the former, then:

exten => 9901,1,Answer()
exten => 9901,n,Wait(1)
exten => 9901,n,Dial(MulticastRTP/basic/224.5.6.20:10011,,gA(MailIsReceived))
exten => 9901,n,Wait(5)
exten => 9901,n,hangup()

might work. If the latter, try:

exten => 9901,1,Answer()
exten => 9901,n,Wait(1)
exten => 9901,n,Dial(MulticastRTP/basic/224.5.6.20:10011,5,A(MailIsReceived))
exten => 9901,n,hangup()

If neither helps, post the log of a failing attempt.

I think that it is executing the hangup, it’s just not hanging up the extension that dialed it.

In this case, the extension I was dialing FROM is 4050 (DECT Handset)
It pages the phone and plays the message… but eventhough it sent a hangup at 13:44:13, it didn’t hang up until I hung up the physical extension. I think perhaps in my dialplan I need to say “Hang up on the CALLER, not just hang up.”

Look at the SIP trace. Did a BYE get sent to the extension? Was it acknowledged by the device?

Thank you for your reply, @Stewart1 I’m not sure exactly where/how to do a sip trace, but I will explore further.

I think that since it is opening a multicast stream, I am missing a command (either something to close the stream and hang up, or to tell the system to disconnect the originating caller to hang up)

Is this what I’m looking for?

<--- Transmitting (no NAT) to 172.16.222.81:5060 --->
SIP/2.0 200 OK
Via: SIP/2.0/UDP 
172.16.222.81:5060;branch=z9hG4bK689590848;received=172.16.222.81
From: "Greg Portable" <sip:[email protected]:5060>;tag=2739476933
To: <sip:[email protected]:5060>;tag=as7eb347da
Call-ID: [email protected]
CSeq: 3 BYE
Server: GHJ-2.11.0(11.25.1)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
PUBLISH, MESSAGE
Supported: replaces, timer
Content-Length: 0

… if so, then yes, I believe it got sent to the handset.

So, I took out the portion that does the dialing of the multicast stream.

I dialed the extension (9901), it waited exactly 4 seconds, then hung up (as I would expect it to do).

SO… something with the dial string is causing it to not execute any more steps. I wonder if there’s a way to set a timeout on the Dial(MulticastRTP/… portion? So it “times out” after the announcement is played?

SOLVED IT!

exten => 9901,1,Answer()
exten => 9901,n,Set(TIMEOUT(absolute)=2)
exten => 9901,n,Dial(MulticastRTP/basic/224.5.6.20:10011,,gA(MailIsReady))
exten => 9901,n,Hangup()
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.