[help] manager originate/redirect auto-answer

I am looking for a way to “auto-answer” using the originate function of the manager api. My linksys spa-941 does not have an easy way to autoanswer. I can’t see an function like ‘answer’ in the manager api, so doing it upon events is not possible. Is there some way to fill in the application part or something like that?

I have read that the

exten => 100,1,SIPAddHeader(Call-Info:;answer-after=0)

could be used, however I have no idea how to implement this in a manager.api originate function. Has anybody any idea?


Describe what you are trying to do more. What you are saying is a little confusing.

What are you trying to make answer?
What is your setup like?
What devices do you have connected to Asterisk?


I have a linksys spa-941 connected to asterisk,
I am setting up an outbound call through the manager api, using originate,
The linksys starts ringing, and after I have answered the linksys the outbound call will be made.

This is the default behaviour of the originate command.

Now I want the linksys to autoanswer, so the outbound call is made directly. Is there a way to do this. According to the wiki there is a way using the SIPAddHeader(Call-Info:;answer-after=0), but this must be placed in the extensions.conf, and I don’t think the originate command looks at this.

I’ve not seen an option in sip.conf for this. Perhaps there should be, I know there is one for zapata.conf.

Anyway, my suggestion would be to use originate to call a local extension, set you sip options, and then use the DIAL command to actually send the call. It adds an extra layer, but should accomplish what you are trying to do.

This post while not totally related, has an example of how to do this.

forums.digium.com/viewtopic.php? … highlight=



I don’t think this will work. The problem is that I want the internal phone to autoanswer. So if you use the originate function it will call this phone, wait for it to answer, and then you have the possiblities of the sip options and dial command.

I need this earlier, to answer the internal phone.


I don’t understand what you mean by ‘internal phone’. Are you referring to your SIP phone or your Asterisk Extension?

You can make the Asterisk Extension answer with the ‘Answer()’ dial plan command.

exten => 1,1,Answer()
exten => 1,n,Dial(…)


According to what you posted earlier, you can make the SIP phone answer with

exten => 1,1,SIPAddHeader(Call-Info:;answer-after=0)
exten => 1,n,Dial(…)


In your originate command you need to call a local channel.


;–originate command–;
Channel: Local/s@linksys
exten => s,1,SIPAddHeader(Call-Info:;answer-after=0)
exten => s,2,Dial(SIP/linksys)