After hangup with external line, prompt internal

Here’s the logic.

After a normal call into a specific DID, I want the user to be prompted to enter the # they would like to call (This is for our agents so they can call into the orginization with their analog cell phones when they are not around a internet connection for voip, then dial a number as if they were in the office).

I want all calls on a specific DID to
Prompt user for external # to dial
At the end of the call (after a eternal hangup) I want to prompt the person who initiated the call with a simple choice of
Press 1 if issue is resolved
Press 2 if Requires another callback at a later time
Press 3 if other (This option just refers them to an internal operator that will note the account in our CRM software)

Each one those options just runs an AGI script.

Any help on this dialplan would be GREATLY appriciated. Thanks!

OK I have everything working except for the last part of after a hangup I would like to prompt the call initiator with options. I am stuck


–At this part after the call is dialed I want the agent(CALL INITIATOR) to be able to to talk to the called party as normal, until the called party hangs up or a dtmf key is pressed or something, where I can the redirect the agent to some spot… Any ideas how I can have it wait for a dtmf tone or something, then when pressed the called party gets hung up on, or if the called party hangs up on their own, the agent gets redirected…


I will test tomorrow, but this seems like where to start


exten => s,1,NoOp()
same => n,Set(CHANNEL(hangup_handler_push)=handler,s,1)
same => n,Dial(SIP/foo&SIP/bar,10)
same => n,Hangup()


same => s,1,NoOp()
same => n,Verbose(0, Channels with hangup cause information: ${HANGUPCAUSE_STRING})
same => n,Return()

What’s wrong with the “g” option on Dial?

Also note that the DISA application may cover the first part of your requirement, and the only reason that your current dialplan works is because you are not following the security guidelines on naming SIP devices and, therefore, confusing devices with extensions.

Well you see the issue with the “g” option is … I don’t know what I am doing and I am just learning asterisk, so I was unaware of this:)

Can you post a sample of a dialplan using the “g” option?

I was also thinking of using the h extension, with a goto, as somone else said that works.

Actually I got it to work.

It took a little tweaking, but everything runs as expected using the “g” option in the DIAL application.