[RESOLVED]: Auto-answering calls from call files

I’m trying to have an automated call to an Aastra SIP phone and have the call auto-answeredby the phone. I know that a SIP call placed to the phone can be auto-answered if a certain SIP header is added to the call. I am able to apply the SIP headers manually and get that working (using SIPAddHeader(Alert-Info: info=alert-autoanswer) in the dialplan, but for call files, I don’t seem to be able to edit any of the sip headers - there is only basic customizations allowed to setup the calls.

Does anyone know how I could place automated outgoing calls that would have the proper sip headers added to it that would allow the call to be auto-answered?

Use local channels in your call file.

To expound a bit on the answer:

Channel: Local/foo@bar
Context: mycall
Extension: s
Priority: 1

extensions.conf:
[mycall]
exten => s,1,NoOp(whatever you want)

[bar]
exten => foo,1,NoOp(set some variables)
exten => foo,n,SIPAddHeader(X-Foo: bar)
exten => foo,n,Dial(SIP/somephone,30)

Now, when somephone answers, execution of the dialplan will start at mycall,s,1, having already executed the steps in context bar, extension foo.

Excellent, thank you both. This is exactly what I was looking for.