AMD Answer/Up Issue

All asterisk Expert & Learner, I am stack with one issue & couldn’t solve it. I hope that you guys will able to help me to solve, below is my current dialplan


exten => _X.,1,Progress()
same => n,Dial(SIP/${EXTEN}@provider,U(checkAMD^s^1))
same => n,Hangup


exten => s,1,Answer
exten => s,n,Background(en/silence/1)
same => n,AMD
same => n,NoOP(The Answering Machine status is ${AMDSTATUS})

Dialplan is working fine but the issue is when its jump to gotosub dialplan call not answered/up, how can I force the channel to be answered. T.I.A

Which channel? The B leg must be up for the subroutine to be started. I don’t understand why the exact timing of the A leg matters, as your subroutine does not access it. However, you could look at the “a” option.

The Answer in the subroutine is pointless, as you can only use Answer on incoming channels.

Background isn’t a sensible thing to call when there is only an s extension in the current context, and one second, with no prompt, doesn’t really give enough time for the callee to key an extension number.

Than you very much David for your reply, yes you are right B leg is up, check the below

CLI> core show channels
Channel              Location             State   Application(Data)
SIP/testpin-0000003e 6322651875560@AmdSta Ring    Dial(SIP/
SIP/ s@CheckAMD:3         Up     AMD(2000,2000,1000,5000,120,50)
2 active channels
1 active call
32 calls processed

how can I force to up both channel?

I have used this dialplan from your provided link & its unfortunately its not working & giving below error.

[ default ]

exten => called_channel,1,NoOp()

same => n,Playback(hello)

same => n,Return()

exten => _X.,1,NoOp()

same => n,Dial(SIP/alice,,U( default ^called_channel^1))

same => n,Hangup()

Its giving this error

SIP/ answered SIP/testpin-00000000
    -- SIP/ Internal Gosub(default,s,1(called_channel,1)) start
[Nov  5 12:39:30] ERROR[4631][C-00000001]: app_stack.c:593 gosub_exec: Gosub attempted to reach non-existent destination 'default,s,1' from 'default,,1'

Please read what I wrote. Also the link only includes sample dialplans, but describes all the options.

Sorry for late reply… what do you mean by “a” option? I didn’t get you. I have read the link after & before you gave but I didn’t find the correct solution from there…

can you tell me if there any way to hangup ‘B’ leg & keep going on with ‘A’ leg?

as we both know in every call asterisk create 2 channel A Party Leg & B Party Leg, if anyone hangup calls are dropped.

But I want it will drop the B Party leg & Go ahead with A Party leg for further process.

is it possible to do?

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