Asterisk : automatically answer call after originate

Mykeul

I have an asterisk 1.8.13 running quite well, and thanks to stackoverflow's questions, I am now able to originate a call via AMI. When the call is originated, the SIP phone is ringing, and when I manually answer, it calls the extension.

I REALLY would like to do the same thing but without the need to answer myself on the SIP phone. (Not only a 'Async: yes' that would call the extension at the same time)

The goal is that when I send a command to AMI, my SIP phone is automatically answered and the extension called, no need to touch the phone physically.

I already checked :

Originate a call with Asterisk - without the originating extension ringing

Asterisk AMI - pickup call

But both do not work on my configuration (maybe due to me obviously).

Here my extensions.conf :

(...)
[globalcontext](!)
include => parkedcalls
exten => _X.,1,AGI(agi:async)

exten => _1XX,1,Dial(SIP/${EXTEN},20,tT)
exten => _1XX,2,VoiceMail(${EXTEN}@test)

[nol](globalcontext)
exten => _0XXXXXXXXX,1,Dial(SIP/to-ovh/${EXTEN})
(...)

Here is my sip.conf :

[template](!)
type=friend
host=dynamic
dtmfmode=rfc2833
disallow=all
allow=ulaw

[102](template)
fullname = John Doe
defaultuser = john
secret = sippass
context = nol

Here is my working AMI session for originating call from SIP phone 102 to ext 0101010101:

Action: Login
Username: admin
Secret: mypassword

Action: Originate
Channel: SIP/102
Context: nol
Exten: 0101010101
Priority: 1
Callerid: 0101010101
Timeout: 15000
ActionID: b4646a6465e546f

I hope it will be clear enough.

Regards

Mykeul

Thanks to arheops' answers, I finally found the solution for my Cisco SPA525G2 & 504G SIP phones, via AMI telnet connection. I just had to add the header via a variable to tell the phones to auto-answer :

Action: Originate
Channel: SIP/102
Context: nol
Exten: 0101010101
Priority: 1
Variable: __SIPADDHEADER51=Call-Info: <sip:192.168.0.10>\;answer-after=0
Callerid: 0101010101
Timeout: 15000
ActionID: b4646a6465e546f

Where 192.168.0.10 is the IP of my asterisk server.

References are :

Thank you !

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Asterisk- creating a call with originate command and pass parameter and set callerid

From Dev

asterisk originate an automated call outside playing a sound file when answered

From Dev

asterisk cli command "channel originate" with call duration or length

From Dev

asterisk originate an automated call outside playing a sound file when answered

From Dev

asterisk cli command "channel originate" with call duration or length

From Dev

Asterisk ami/agi - not able to answer call

From Dev

Asterisk ami/agi - not able to answer call

From Dev

Asterisk Originate Some noooob Questions ^_^'

From Dev

Asterisk and AMI Originate extension is not busy

From Dev

How can I originate a call and read DTMF value using asterisk-java?

From Dev

Asterisk call drop after 30 seconds

From Dev

Asterisk change callerid after consultation call

From Dev

Asterisk ringgroup get call after registration

From Dev

how to originate a call with freeswitch esl?

From Dev

What directory does an AJAX call originate?

From Dev

Asterisk / Freepbx / Call doesn't disconnects after hangup

From Dev

Adhearsion Park Asterisk call

From Dev

Asterisk call through browser

From Dev

How to Originate Call from Polycom Intercom via Dialplan

From Dev

Asterisk playback after hangup

From Dev

how to repopulate /etc/asterisk/ after purging asterisk?

From Dev

Call recordings in Asterisk using MixMonitor

From Dev

Linux Asterisk script for test call

From Dev

Playback file in Call Waiting on Asterisk

From Dev

Asterisk Event to listen to for Transferred call

From Dev

Answer phone call

From Dev

android answer incoming call

From Dev

inputAccessoryView doesn't appear automatically after call "reloadInputViews"

From Dev

How to show appended checkbox and automatically checked after ajax call

Related Related

  1. 1

    Asterisk- creating a call with originate command and pass parameter and set callerid

  2. 2

    asterisk originate an automated call outside playing a sound file when answered

  3. 3

    asterisk cli command "channel originate" with call duration or length

  4. 4

    asterisk originate an automated call outside playing a sound file when answered

  5. 5

    asterisk cli command "channel originate" with call duration or length

  6. 6

    Asterisk ami/agi - not able to answer call

  7. 7

    Asterisk ami/agi - not able to answer call

  8. 8

    Asterisk Originate Some noooob Questions ^_^'

  9. 9

    Asterisk and AMI Originate extension is not busy

  10. 10

    How can I originate a call and read DTMF value using asterisk-java?

  11. 11

    Asterisk call drop after 30 seconds

  12. 12

    Asterisk change callerid after consultation call

  13. 13

    Asterisk ringgroup get call after registration

  14. 14

    how to originate a call with freeswitch esl?

  15. 15

    What directory does an AJAX call originate?

  16. 16

    Asterisk / Freepbx / Call doesn't disconnects after hangup

  17. 17

    Adhearsion Park Asterisk call

  18. 18

    Asterisk call through browser

  19. 19

    How to Originate Call from Polycom Intercom via Dialplan

  20. 20

    Asterisk playback after hangup

  21. 21

    how to repopulate /etc/asterisk/ after purging asterisk?

  22. 22

    Call recordings in Asterisk using MixMonitor

  23. 23

    Linux Asterisk script for test call

  24. 24

    Playback file in Call Waiting on Asterisk

  25. 25

    Asterisk Event to listen to for Transferred call

  26. 26

    Answer phone call

  27. 27

    android answer incoming call

  28. 28

    inputAccessoryView doesn't appear automatically after call "reloadInputViews"

  29. 29

    How to show appended checkbox and automatically checked after ajax call

HotTag

Archive