2
votes

My goal is to : run a background task activated by dynamic feature while in active call, that will execute dial to another EXT and send DTMF. It means, when a user is active call with someone, when the user press 5555, the door will be opened. In order to open the door today, I have to manually call EXT 6(the door) and send DTMF digits: 00* All of this has to happen automatically when the user press 5555 without interfering the active call. I tried before to do all of this with dial, but dial blocks the call or bridges with another extension and then I lose the original call. I figured out that I need to do this with ASYNC, means I can not use dialplan, I need to use CLI, and then originate some how.

Asterisk will need to create a local session / local channel and establish/connect to the door extension, then send DTMF and hangup All of this – in background.

this is somthing i managed to do so far:

features_applicationmap_custom.conf

openthedoor=> 5555,caller,macro,OpenIntercomCall

then in ->

extensions_custom.conf

[macro-OpenIntercomCall] exten => s,1,System(asterisk -rx "channel originate SIP/6 extension@yoyo")

i do not understand how do i call to SIP/6 from asterisk(using a local or random channel), and then send DTMF on answer.

the door ext is SIP/6, and 00* is the dtmf to open it.

What i am trying to do is that when a user 5555 in a call, the door will be opened. means i want asterisk to call the intercom and send dtmf

1
Please provide more context and limit the amount of text in our question to get to the point. At the moment no-one is clear what the issues are.AlBlue
Hi, i have rewrote my messasgeYair Glikman

1 Answers

1
votes

There are no any sence do exec asterisk from inside asterisk. You can do Originate command.

Originate(tech_data,type,arg1[,arg2[,arg3[,timeout]]])

For example you can do something like this

 exten => s,1,Originate(SIP/6,app,SendDTMF,ww00*)

Should be enought for your need.