PJSIP Auto Answer

Hi,

I installed the latest version of PJSIP recently

I’m trying to auto answer my yealink phones.

So i make that :

exten => 102,1,Set(PJSIP_HEADER(add,Alert-info)=“answer-after = 0”)
same => n,Set(PJSIP_HEADER(add,Alert-info)=“info = alert-autoanswer”)
same => n,Set(PJSIP_HEADER(add,Alert-info)=“Auto Answer”)
same => n,Page(PJSIP/102)

I try without the “” it’s the same result, the phone doesn’t answer

Did you have an idea ?

Thank you

As noted on the wiki page[1] PJSIP_HEADER is for use on the channel it should be used on, in your dialplan you’re using it on the calling channel which won’t work. The b option on Page[2] can be used to execute a subroutine to place it on the outgoing channel, much like is given in the example on the PJSIP_HEADER wiki page.

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_PJSIP_HEADER
[2] https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Application_Page

I’m not sure that you can add the same header multiple times (check the protocol log), and if you do manage it, I’m not sure that the phone will process all of them. If the headers are being sent, this is not an Asterisk problem.

Have you enabled auto answer on the phones. This will be disabled by default, as it presents a security risk, as it can be used to bug the room with the phone.

http://support.yealink.com/faq/faqInfo?id=537 suggests that the various headers you have used are alternatives. There is no official standard for requesting auto-answer,

Thanks its work with the b options :

exten => 100,1,Set(PJSIP_HEADER(add,Alert-info)=answer-after = 0)

exten => 102,1,Page(PJSIP/102,b(testing^100^1))

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