PJSIP Auto Answer part 2

Hey @lgaetz

Based on this thread - PJSIP Auto Answer - I’ve been using your predial hook to apply an auto answer header to all local calls using [macro-dialout-one-predial-hook] but I’ve noticed that this context is getting applied on calls that come through the IVR. So if a caller gets to the IVR and they select an option that routes directly to an extension, it will auto answer. If they direct dial an extension from the IVR, it will auto answer.

Is this predial context intended to be hit on incoming calls from an IVR? Full context below:

In /etc/asterisk/extensions_custom.conf

exten => s,1,Noop(Entering user defined context macro-dialout-one-predial-hook in extensions_custom.conf)
exten => s,n,GoSub(func-set-sipheader,s,1(Alert-Info,Auto Answer))
exten => s,n,MacroExit

That macro is called before every dial to a local extension, regardless of the source. If you want different behavior for different calls, you will have to build the IF into the macro.

Are you aware of the auto-answer for internal calls feature on the Advanced tab for extensions:

1 Like

I forgot about that setting, looks like @PitzKey pointed it out in the other ticket. After testing that setting it works as expected - thanks.


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