# Manage incoming call by php web interface

**URL:** <https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754>\
**Category:** Asterisk APIs\
**Created:** [April 24, 2020, 6:13am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754 "2020-04-24T06:13:52Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 6:13am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/1 "2020-04-24T06:13:52Z")

</div>

Hi all. I want to manage incoming call activities (like hold, un hold, hangup etc… ) using ARI API.  
but only I could manage calls which generate by ARI API. so is there any way to manage incoming calls?

---

<div class="post-metadata">

**Author:** ![satish4asterisk](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@satish4asterisk](https://community.asterisk.org/u/satish4asterisk)\
**Post date:** [April 24, 2020, 8:08am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/2 "2020-04-24T08:08:39Z")

</div>

> [@vinod\_rock](#):
>
> Hi all. I want to manage incoming call activities (like hold, un hold, hangup etc… ) using ARI API.

Do you mean the channels which don’t enter Statis application?  
If you are not sending calls to Statis then you can use [AMI](https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=4817239) to manage those call operations. If you do then I think you should be able to control the incoming calls using ARI.

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 8:35am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/3 "2020-04-24T08:35:45Z")

</div>

@satish4asterisk thx for reply.i am using AMI but AMI has not a hold action.it’s It only has the park action .when I parked the call other channels will disconnect.

---

<div class="post-metadata">

**Author:** ![satish4asterisk](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@satish4asterisk](https://community.asterisk.org/u/satish4asterisk)\
**Post date:** [April 24, 2020, 9:21am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/4 "2020-04-24T09:21:20Z")

</div>

I haven’t done myself but try using [Redirect action](https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Redirect) which allows you to play with 2 channels.

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 11:25am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/5 "2020-04-24T11:25:27Z")

</div>

> [@satish4asterisk](#):
>
> [Redirect action](https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+ManagerAction_Redirect)

thanks for your advice.but i doesn’t full fill my requirement.  
when i use statis app to incoming call land.i can’t dial the extension to ring a call.

My dial plan look like below

[aritest]  
exten =\> \_x.,1,Noop()  
same =\> n,Stasis(hello)  
same =\> n,Dial(PJSIP/${EXTEN})  
same =\> n,Hangup()

thanks for helping me!!!

what would be the possible solution for my case?

---

<div class="post-metadata">

**Author:** ![satish4asterisk](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@satish4asterisk](https://community.asterisk.org/u/satish4asterisk)\
**Post date:** [April 24, 2020, 11:49am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/6 "2020-04-24T11:49:56Z")

</div>

> [@vinod\_rock](#):
>
> when i use statis app to incoming call land.i can’t dial the extension to ring a call.

Purpose of Stasis application is to hand over control of the call/channel from Asterisk to the ARI client. You should be doing Dial and Hangup operations in app itself and not in the dialplan.

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 11:55am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/7 "2020-04-24T11:55:44Z")

</div>

yeah.is there some way to identify incoming call through ARI client to dial extension from ARI client.  
thanks for replying!!!

---

<div class="post-metadata">

**Author:** ![satish4asterisk](https://avatars.discourse-cdn.com/v4/letter/s/5f9b8f/32.png) [@satish4asterisk](https://community.asterisk.org/u/satish4asterisk)\
**Post date:** [April 24, 2020, 11:56am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/8 "2020-04-24T11:56:00Z")

</div>

To me it looks like you don’t need ARI here. Explain your end goal of using ARI so that people here can help you better.  
If you just want to dial the Endpoint and control the call using AMI, you don’t need ARI.

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 11:59am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/9 "2020-04-24T11:59:53Z")

</div>

![demo screen](https://global.discourse-cdn.com/asterisk/original/2X/b/b3f40b3250d3a1815be7ca7acd797d1bec1ba07f.png)  
I am developing calls management application.so I need to manage incoming calls and out going call through this web interface.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [April 24, 2020, 12:03pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/10 "2020-04-24T12:03:09Z")

</div>

ARI is not for third party call management or call control, it’s for writing applications[1]. The best example is a call queue - instead of using app\_queue you would instead write a queue application as an ARI application. If you really wanted to use it for control, then you’d need to write applications yourselves. AMI is really the interface for what you’d want.

[1] [https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=29395573](https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=29395573)

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 12:08pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/11 "2020-04-24T12:08:08Z")

</div>

thank you for helping me!!!  
yes. but in AMI dosen’t have a action for hold a channel.is there some solution for hold a channel.?

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [April 24, 2020, 12:10pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/12 "2020-04-24T12:10:03Z")

</div>

There may not be functionality to do as you wish, or it has to be done in a different way with AMI. I haven’t written such a thing so I can’t comment on that specific part.

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 12:14pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/13 "2020-04-24T12:14:51Z")

</div>

thank for your advice !!!. I will try as you recommended.

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 1:32pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/14 "2020-04-24T13:32:57Z")

</div>

hi.can we track hold and unhold event in some where in database. CEL table doesn’t save any event about hold and unhold of a call.

---

<div class="post-metadata">

**Author:** ![jcolp](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/jcolp/32/8848_2.png) [@jcolp](https://community.asterisk.org/u/jcolp)\
**Post date:** [April 24, 2020, 1:35pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/15 "2020-04-24T13:35:01Z")

</div>

I do not have experience in that area and do not know. Someone else may have done something similar or have information.

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 24, 2020, 1:40pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/16 "2020-04-24T13:40:00Z")

</div>

thank you for your help!!!

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [April 24, 2020, 3:45pm UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/17 "2020-04-24T15:45:51Z")

</div>

Use AMI events to save those events on a custom DB, that’s the way to track it

---

<div class="post-metadata">

**Author:** ![vinod\_rock](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/vinod_rock/32/4390_2.png) [@vinod\_rock](https://community.asterisk.org/u/vinod_rock)\
**Post date:** [April 25, 2020, 4:21am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/18 "2020-04-25T04:21:58Z")

</div>

thank you for helping me!!!.

---

<div class="post-metadata">

**Author:** ![ambiorixg12](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/ambiorixg12/32/1887_2.png) [@ambiorixg12](https://community.asterisk.org/u/ambiorixg12)\
**Post date:** [April 25, 2020, 4:22am UTC](https://community.asterisk.org/t/manage-incoming-call-by-php-web-interface/83754/19 "2020-04-25T04:22:09Z")

</div>


