# User Input - asterisk

**URL:** <https://community.asterisk.org/t/user-input-asterisk/69991>\
**Category:** Asterisk Support\
**Created:** [March 9, 2017, 11:01pm UTC](https://community.asterisk.org/t/user-input-asterisk/69991 "2017-03-09T23:01:45Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![abcdobserve](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@abcdobserve](https://community.asterisk.org/u/abcdobserve)\
**Post date:** [March 9, 2017, 11:01pm UTC](https://community.asterisk.org/t/user-input-asterisk/69991/1 "2017-03-09T23:01:45Z")

</div>

Hi,

I am working on asterisk.

I have configured my extensions.conf and sip.conf and they are working fine.

I am able to make a call and receive a call through asterisk.

However, now I want to read the input from user while phone is still on.

So scenario is,

I am calling from my asterisk phone to any number and  
after receiving call, user will enter the number which I want to read and save to the file (while phone is still on).

(note: I am doing outbound call from asterisk)

Thanks

---

<div class="post-metadata">

**Author:** ![johnkiniston](https://sea1.discourse-cdn.com/asterisk/user_avatar/community.asterisk.org/johnkiniston/32/28_2.png) [@johnkiniston](https://community.asterisk.org/u/johnkiniston)\
**Post date:** [March 9, 2017, 11:27pm UTC](https://community.asterisk.org/t/user-input-asterisk/69991/2 "2017-03-09T23:27:06Z")

</div>

You can use the READ application to read digits in your dialplan.

[https://wiki.asterisk.org/wiki/display/AST/Application\_Read](https://wiki.asterisk.org/wiki/display/AST/Application_Read)

---

<div class="post-metadata">

**Author:** ![abcdobserve](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@abcdobserve](https://community.asterisk.org/u/abcdobserve)\
**Post date:** [March 10, 2017, 12:19am UTC](https://community.asterisk.org/t/user-input-asterisk/69991/3 "2017-03-10T00:19:46Z")

</div>

[outgoing-sip]  
exten =\> \_.,1,Set(CALLERID(name)=12345678901)  
exten =\> \_.,2,Dial(SIP/000${EXTEN}@onsip)

[incoming-context]  
exten =\> s,1,NoOp()  
same =\> n,Wait(1)  
same =\> n,Answer()  
same =\> n,SendDTMF(1)  
same =\> n,Dial(dahdi/1,20)

these are my settings in extensions.conf.  
I already tried adding read in these settings but it did not work. Can you please let me know where to add read and how to add.

Thanks

---

<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:** [March 10, 2017, 12:34am UTC](https://community.asterisk.org/t/user-input-asterisk/69991/4 "2017-03-10T00:34:56Z")

</div>

> [@abcdobserve](#):
>
> So scenario is,
> 
> I am calling from my asterisk phone to any number and after receiving call, user will enter the number which I want to read and save to the file (while phone is still on).

So you are talking with a remote callee and during the call the callee will press and DTMF on his phone ?

If this is the scenaro you can use AMI DTMF events

---

<div class="post-metadata">

**Author:** ![abcdobserve](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@abcdobserve](https://community.asterisk.org/u/abcdobserve)\
**Post date:** [March 10, 2017, 12:42am UTC](https://community.asterisk.org/t/user-input-asterisk/69991/5 "2017-03-10T00:42:46Z")

</div>

Yup @ambiorixg12, I am making outbound call using asterisk and remote person will receive call from the asterisk. When remote person will pick up the call, I should be able to talk to that person and I should be able to read the number which that person entered on his/her phone.

---

<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:** [March 10, 2017, 12:45am UTC](https://community.asterisk.org/t/user-input-asterisk/69991/6 "2017-03-10T00:45:18Z")

</div>

You can use [DTMFEnd](https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerEvent_DTMFEnd)  
ttps://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerEvent\_DTMFEnd

---

<div class="post-metadata">

**Author:** ![abcdobserve](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@abcdobserve](https://community.asterisk.org/u/abcdobserve)\
**Post date:** [March 10, 2017, 12:45am UTC](https://community.asterisk.org/t/user-input-asterisk/69991/7 "2017-03-10T00:45:20Z")

</div>

@ambiorixg12,

can you give me example config line or asterisk code for AMI DTMF for my purpose?

---

<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:** [March 10, 2017, 12:46am UTC](https://community.asterisk.org/t/user-input-asterisk/69991/8 "2017-03-10T00:46:35Z")

</div>

You will need to listen to the DTMF event associated with the channel of the bridged call and save the Digit: on a DB or external file, this will require extra programming language like PHP

---

<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:** [March 10, 2017, 8:42am UTC](https://community.asterisk.org/t/user-input-asterisk/69991/9 "2017-03-10T08:42:15Z")

</div>

I suggest to study this, [https://wiki.asterisk.org/wiki/display/AST/The+Asterisk+Manager+TCP+IP+API](https://wiki.asterisk.org/wiki/display/AST/The+Asterisk+Manager+TCP+IP+API)

---

<div class="post-metadata">

**Author:** ![abcdobserve](https://avatars.discourse-cdn.com/v4/letter/a/8c91f0/32.png) [@abcdobserve](https://community.asterisk.org/u/abcdobserve)\
**Post date:** [March 21, 2017, 9:38pm UTC](https://community.asterisk.org/t/user-input-asterisk/69991/10 "2017-03-21T21:38:34Z")

</div>

Thanks guys for your support.

Created a function in the channel.c file from asterisk package and it solved the problem.
