How To Set SIP To Auto Answer In The Dial Plan .

Home » Asterisk Users » How To Set SIP To Auto Answer In The Dial Plan .
Asterisk Users 9 Comments

Hi,

I am trying to write dial plan for sip to auto answer (auto attend) the incoming call to the sip phone.

– If i call from sip1 to sip2 then sip2 should automatically answer the call and play some sound file. I am trying to do this but as new to the asterisk dial plan configuration , so not able Todo this. help me if anyone already done this setup.

Regards Upendra.

9 thoughts on - How To Set SIP To Auto Answer In The Dial Plan .

  • try with SipAddHeader(uri=aswer-after=0

    check syntax for Addheader

    Regards, Zohair Raza

  • Hi,

    its not working for me ….! let me know anyone having sample dialplan so that i can use for test 1 sip call answer.

    regards Upendra

  • I have the following in my intercom macro in extensions.ael;

    SIPAddHeader(Alert-Info: Ring Answer);
    SIPAddHeader(Call-Info:\;Answer-After=0;
    SIPAddHeader(P-Auto-Answer: normal);

    If memory serves me, respectively they are for the following vendors;

    Grandstream Linksys/Cisco SPA
    Yealink

    Larry.

  • Larry Moore wrote:

    And Polycom:

    exten => s,n,SIPAddHeader(Alert-Info: Ring Answer)

    Doug

  • upendra wrote:

    Unless I’m misunderstanding your needs, wouldn’t this do what you want?

    exten => 1234,1,Answer exten => 1234,n,Playback(soundfile)
    exten => 1234,n,Dial(SIP/1234,60,m) ; caller hears music on hold
    ; instead of ringtone

  • Thank you for not top-posting. It appears everybody forgot their netiquette last week 🙂

    Not as I understand the OP’s request.

    As I understand the request, when sip1 originates a call to sip2, sip2
    should just start playing audio from sip1 without requiring any action on sip2’s part.

    Several posters have already suggested the solution lies in having sip1
    add the appropriate sip header in the INVITE to ask sip2 to automagically answer so sip2 can play the sound file.

    Unfortunately, the OP seems to lack the ability or motivation to read the documentation to be able to take advantage of the suggestions.

    Even more unfortunately, auto-answer is device and configuration specific. My cisco 9760 just needs a SIP header added while my Polycom 501 needs a different SIP header and the correct bits twiddled in it’s humongous configuration files.