[ previous ] [ next ] [ threads ]
 To :  "fz@z..." <fz@z...>
 From :  Monica Tepelus <monica@v...>
 Subject :  Re: [yate] call, wait for connect, play sound file, wait for DTMF,disconnect
 Date :  Fri, 22 Mar 2013 13:47:43 +0200
Hi Felix,

I don't recommend doing call.execute to wave/play.
When you did this your dumb channel was closed.

Instead of sending chan.attach with id=sip/7, send it with id=dumb id. 
It will be sent on behalf of dumb channel because user should hear it. 
As you sent it, it was on behalf of the user and dumbchannel would hear it.

It's nice to always keep the conversion on the mailing list as well so 
other people can search the mail archive.

Regards,
Monica Tepelus

fz@z... wrote:
> hi Monica
>
> The wave files are ok with
> %%> message:% ld: 380: call.execute callto :: = wave / play / / 
> home/telealarm/sound/Quittirung_2_michi.slin: target = 101: caller = 
> 123felix: caller name = felix
> I can hear the Voice.
>
> But the commands
> 22.03.2013 09:23:17 TX %%>connect:global
> 22.03.2013 09:23:17 TX %%>install:99:chan.dtmf
> 22.03.2013 09:23:17 RX %
> 22.03.2013 09:23:17 TX %%>watch:call.answered
> 22.03.2013 09:23:17 RX %
> 22.03.2013 09:23:17 TX 
> %%>message:10:380:call.execute::callto=dumb/:target=101:caller=123felix:callername=felix 
>
> 22.03.2013 09:23:17 RX 
> %
>
> 22.03.2013 09:23:19 RX 
> %
> rue:callid=sip/272312086@1.../1698487330/469502849:sip_server=YATE/4.2.0:sip_contact=
>
> 22.03.2013 09:23:19 TX 
> %%>message:11:380:chan.masqeurade::message=chan.attach:id=sip/17:source=wave/play//home/telealarm/sound/Quittirung_2_michi.slin 
>
> 22.03.2013 09:23:20 RX 
> %
>
> will not work!
> Do you have time today to help with? Or cann i Post it to the liste agin?
>
> Sorry for my rush, I should show the customer on Monday slightly ...
>
> Regards Felix
>
>
> Am 20.03.2013 16:47, schrieb Monica Tepelus:
>> 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
>>            callto="dumb/"
>> 2) masquerade call.execute to make call to real destination on behalf 
>> on dumb channel
>> -- chan.masqeurade
>>            message="call.execute"
>>            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
>>            message="chan.attach"
>>            id=
>>            source="wave/play/path_to_file"
>>
>> wait until the called party yxz sends a DTMF code
>> 5) if received message is chan.dtmf for the dumbchanid or from your 
>> party
>>
>> disconnect
>> 6) send call.drop to either dumbchannel or real party
>> -- call.drop
>>            id=realpartyid
>>
>> 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 things.
>>
>> Regards,
>> 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
>>>
>>>
>>
>> Monica
>>
>>
>>
>