[ previous ] [ next ] [ threads ]
 To :  Yate mailing list <yate@v...>
 From :  Monica Tepelus <monica@v...>
 Subject :  Re: [yate] call, wait for connect, play sound file, wait for DTMF,disconnect
 Date :  Wed, 20 Mar 2013 17:50:51 +0200
Hi Felix,

Then you need to use dumbchannel. Some examples for how the messages 
should be sent in this case are similar to those in yaypm.

0) Install handler for chan.dtmf

call partyyxz
1) call execute to dumnchannel and remember the id of you channel
-- call.execute
2) masquerade call.execute to make call to real destination on behalf on 
dumb channel
-- chan.masqeurade
           id="id of the above created dumb channel"
           callto="real destination"  (this is the result of call.route 
message. Ex: sip/sip:nr@gw:port)
           .. other param
wait until connected
3) catch call.answered  message for appropriate id/targetid

play sound file
4)  masquerade  chan.attach on behalf on dumbchannel
-- chan.masquerade

wait until the called party yxz sends a DTMF code
5) if received message is chan.dtmf for the dumbchanid or from your party

6) send call.drop to either dumbchannel or real party
-- call.drop

When debugging don't forget to use message sniffer to check what id you 
need to use : id/targetid/peerid and see the order on the message.
Also, check the mail list because some other people tried to do similar 

Monica Tepelus

fz@z... wrote:
> Hi Monica
> Thanks  for your answer.
> I have to do the job form our Application (write in C++). The 
> application is running on a other Computer then the Yate-Server.
> So i tray to  connect to  a TCP/IP listener, that works and the syntax 
> is described in External modules protocol.
> Is it possible to use the C-API if the application do not run on the 
> Same server then the Yate-Engine?
> Regards Felix
> Am 20.03.2013 09:29, schrieb Monica Tepelus:
>> Hi Felix,
>> You can use yaypm library and work with dumbchannel but the 
>> documentation for this is not that good, or you can use php and build 
>> a channel script (ivr).
>> If you choose to work with php you can use libyate.php directly or 
>> libyateivr.php (that has an additional layer for building ivrs). If 
>> you intend to build a big ivr, use libyateivr.php. For learning to 
>> use yate, libyate.php is easier to understand at the beginning.
>> For a php  example that uses libyate.php, take a look at 
>> voicemail.php/leavemail.php/playprompt.php from share/scripts 
>> directory from yate's sources.
>> For example with libyateivr.php look at ivrsample.php from the same 
>> directory.
>> Regards,
>> Monica Tepelus
>> fz@z... wrote:
>>> Hello
>>> I want to implement the following function from an external module:
>>> call partyyxz
>>> wait until connected
>>> play sound file
>>> wait until the called party yxz sends a DTMF code
>>> disconnect
>>> Has anybodyrealizedsome thin like this and can help my with the 
>>> necessary Steps (command and parameters)?
>>> call.execute :: caller = dump /: callto = 101:
>>> call.route?
>>> ..
>>> ..
>>> ?
>>> Thanks for your help!
>>> regards Felix
>> Monica