AMI / AJAM

Originate

Connect to the PBX via ssh. Run the command to connect to the AMI:

busybox telnet 127.0.0.1 5038 

Perform authorization:

Action: Login
Username: phpagi
Secret: phpagi
Events: off

Perform Originate to call from 201 to 203:

Action: Originate
Channel: Local/201@internal-originate
Context: all_peers
Exten: 203
Priority: 1
Callerid: 201
Variable: SIPADDHEADER="Call-Info:\;answer-after=0",pt1c_cid=203,ALLOW_MULTY_ANSWER=1
  • SIPADDHEADER - The header will be added to the INVITE for the internal number 201

  • pt1c_cid - destination number

  • ALLOW_MULTY_ANSWER - If there are multiple registrations on account 201, SIPADDHEADER will be sent to all contacts

Redirect

Forwarding without consultation

Action: Redirect
Channel: PJSIP/201-000001
Context: internal-transfer
Exten: 203
Priority: 1
  • "PJSIP/201-000001" - Channel for forwarding

  • "internal-transfer" - For all redirects, use only this context

  • "203" - destination number

  • The channel that was in bridge with PJSIP/201-000001 will be completed

Attended transfer

Call forwarding with consultation

Action: Atxfer
Channel: PJSIP/201-000001
Context: internal-transfer
Exten: 203
Priority: 1
  • "PJSIP/201-000001" - The channel that transfers the call it will be connected to the number 203 for consultation

  • "internal-transfer" - For all redirects, use only this context

  • "203" - destination number

  • When the PJSIP/201-000001 channel is completed, the bridge channel will be connected to 203

Last updated