Adding a SIP header when originating a call using AMI

I swear I’ve done this before, but just can’t remember how. Problem is, a script is using the AMI to originate calls to specific extensions, however since the call has already been placed by the time it reaches the specified context, I can’t append any SIPHeader data. I need to do this to use the auto-answer feature for the Grandstream GXP-2000 series.

Thanks.

Well, I think I solved it. I forgot about the Application and Data notation when originating.

So I should be able to do this:

Action: Originate
Channel: SIP/250
Callerid: someone
Context: default
Application: SIPAddHeader
Data: Call-Info: answer-after=0

Haven’t gotten a chance to try it, but I assume it’ll work.

Follow up… the previous didn’t work.

After hunting around for a bit, this is what works:

Variable: SIPADDHEADER=“Call-Info: Answer-After=0”