Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - jamie

Pages: [1] 2 3
1
Yate users hangout place / MRCP Module
« on: November 23, 2019, 12:31:50 PM »
Hi,

Does anyone know if this module is implemented?

I've seen POST on the mailing list archive that mentioned that it wasn't finished.

If anyone has any detail it would be greatly received!

Thank you
Regards
Jamie
 

2
Hi,

Is there any reason why audio format when using, for example:

external/record//var/digit/ivr/src/yate/scripts/stream.php

could vary from slin little endian to big endian ?

My code:

Code: [Select]
    $m = new Yate("chan.masquerade");

    $m->params["message"] = "call.execute";
    $m->params["id"] = $channel_id;
    $m->params["callto"] = 'conf/' . $stream_id;
    $m->params["notify"] = $channel_id;
    $m->params["lonely"] = true;
    $m->params["maxusers"] = 1;
    $m->params["smart"] = true;

    $m->params["utility"] = false;

    $m->params["record"] = 'external/record//var/digit/ivr/src/yate/scripts/stream.php';

    // set this so that script can play warnings in conference
    $m->params["recordwarn"] = "-";
    $m->params["speakers"] = true;


    $m->params["interval"] = 3000;
    $m->params["waitlock"] = -200;
    $m->Dispatch();

Always within the same call, but the above conference could be destroyed and restarted.

Thank you,
Regards
Jamie

3


To remove a channel from a conference it is a simple as issuing the following:

$chan_id = sip/123456

$m = new Yate('chan.masquerade');
$m->SetParam('message','call.execute');
$m->SetParam('callto', 'wave/play/-');
$m->SetParam('id', $chan_id   );
$m->Dispatch();


This is a PHP implementation, but the theory is the same as the important parts are the messages.

4
Hi,

I think there might be a mistake on one of the pages of the online documents.

It's on this page:

https://docs.yate.ro/wiki/External_module_command_flow

Towards the bottom at the section "Keyword: %%>connect"

It says:

<role> - role of this connection: global, channel, play, record, playrec

but if I try setting the role to anything other than 'global' or 'channel' it throws an error.

EG: "Unknown role 'record' received"

Here's an example of the command string i've been using :

%%>connect:record:sip/12\n

and my extmodule.conf file uses:

[listener DigitAudioStream]
type=tcp
addr=0.0.0.0
port=5042
priority=100


I've also checked the source of extmodule.cpp   (  http://yate.null.ro/svn/yate/trunk/modules/extmodule.cpp )

And it to seems to indicate that only 'global' and 'channel' settings are acceptable as a role.
 

Please could you let me know what I should be using instead ?

I'm looking to gain access to the audio directly, as per :

3 (optional) - Transports audio data from the engine to the application
4 (optional) - Transports audio data from the application to the engine

I was assuming that upon successful connection i'd be able to start reading the audio-stream from the socket.

Thank you and much appreciated
Regards
Jamie







Copied from page:
Keyword: %%>connect
%%>connect:<role>[:<id>][:<type>]
Direction: Application to engine
The "connect" keyword is used only by external modules that attach to the socket interface. As the conection is initiated from the external module the engine must be informed on the role of the connection.
This must be the first request sent over a newly established socket connection. The role and direction of the connection is established and then this keyword cannot be used again on the same connection.
There is no answer to this request - if it fails the engine will slam the connection shut.
Connections with a role of play, record or playrec are data connections and must be attached to a valid control channel. Any existing data endpoint with the same type and direction is closed.
<role> - role of this connection: global, channel, play, record, playrec
<id> - channel id to connect this socket to
<type> - type of data channel, assuming audio if missing

5
Yate users hangout place / How to Install lazyrec.cpp module / patch
« on: November 04, 2018, 09:50:01 PM »
Hi,

Please could I ask for a little help ?

Is it possible or feasible to install lazyrec.cpp ?

I found it here : http://yate.null.ro/mantis/view.php?id=68

but unfortunately I've not be able to find any instructions.

If possible, please could you point me in the right direction?

Thank you!

Jamie

OS Dist: debian
Ver: http://yate.null.ro/svn/yate/trunk/


6
Hi Ganapathi,

To indefinitely repeat an audio file you can include the parameter autorepeat = true :

but I've only used this in PHP



7

Hi Marian

Thank you, For others to view, I'll update the post shortly with what I've done.

Occasionally I get the following message:

"Overflow reading in buffer of length 8192"

Is this because I'm passing too much 'data' into the listening external module ?

Thanks

 




8
Hi Marian,

Thanks very much for your help, much apprecited.

I think I've managed to implement this !

One quick questions .... is it best to issue the masquerade call.execute immediately after the call.drop channel, or
to listen for the disconnected message and do it then?


9
Hi,

Please could you help me ?

I need to be able to remove a caller from a conference and not hang-up.

I've been using the following to create a conference (PHP):

Code: [Select]
$m = new Yate("chan.masquerade");
 $m->id = "";
 $m->params["message"] = "call.execute";
 $m->params["id"] = $partycallid;
 $m->params["callto"] = "conf/cs-$conference_id";
 $m->params["notify"] = "conf-monitor/cs-$conference_id";
 $m->params["billing"] = "true";
 $m->params["lonely"] = "true";
 $m->params["maxusers"] = $maxusers;
 $m->params["smart"] = "t";

 //$m->params["record"] = "external/nodata/conference.php";
 // set this so that script can play warnings in conference
 //$m->params["recordwarn"] = "-";
 $m->params["speakers"] = $speakers;
 $m->params["interval"] = $interval_notifications;
 $m->params["waitlock"] = -200;  // ( ** Not sure what this does ** )

 $m->Dispatch();


This work fine.

However, after a period of time, I need to be able to remove the caller from the conference (or destroy it) but without dropping the call.

I've checked for capability in the source ( conference.cpp ) and see that it seems to have class methods that might do it, but I can't see how I would do it.

Your help would be very much appreciated.

Thank you, Regards
Jamie

 





10
Yate users hangout place / Detecting Speech - Lex VoiceBot
« on: September 14, 2018, 06:32:18 PM »
Hi,

Please could I ask for some help ?

Does YATE currently have a method of detecting if a caller is talking ?

I was wondering if it would be practical to use the conference 'speaking' notify event? However this would me invoking a conference each time we want to listen for a caller 'speaking' or not.

If it doesn't, any thoughts as to where I might begin would be much appreciated.

Thank you!

Regards

Jamie

11
Hi Monica,

Forking in the external module is very flexible, here's what I've worked out this evening that solves my original routing requirement. I hope it helps others one day!

I have tested the following, but please let me know if you see any problems ?!


*Simple Example - Fork to 2 Registered SIP users*

Code: [Select]

// Start the fork
$ev->retval = "fork";
// Add the first target
$ev->params["callto.1"] = 'sip/sip:test_user_1@192.168.0.101:5060';
// Add the second target
$ev->params["callto.3"] =  'sip/sip:test_user_2@192.168.0.102:5060';
// Mark handled
$ev->handled = true;





*More Complex Example - Fork to 2 Registered SIP users and then a 3rd Target over a line*

Code: [Select]

// Start the fork
$ev->retval = "fork";

// Add the first target (registered sip user)
$ev->params["callto.1"] = 'sip/sip:test_user_1@192.168.0.101:5060';
// Add a Max Call duration for target 1
$ev->params["callto.1.timeout"]  = "30000";

// To start calling the next target after 3 seconds add a callto param of |next=3000  ( call 1 will not hangup )
$ev->params["callto.2"]  = "|next=3000";

// Add the next Target
$ev->params["callto.3"] =  'sip/sip:test_user_2@192.168.0.102:5060';
// Add it's Max Call duration
$ev->params["callto.3.timeout"]  = "30000";

// To start calling the next target after 3 seconds add a callto param of |drop=3000  ( calls 1 and 2 will both hangup )
$ev->params["callto.4"]  = "|drop=3000";

// Add the final Target
$ev->params["callto.5"] =  'line/sip:449066631234';
// Tell YATE that this is to be routed over line 'test_gateway_1'
$ev->params["callto.5.line"]  = "test_gateway_1";
// Add it's Max Call duration
$ev->params["callto.5.timeout"]  = "60000";

// Mark handled
$ev->handled = true;




For testing purposes, I wrapped the above in the following and listened for the call.route event message.

Code: [Select]

if ( $ev->name==='call.route' && $ev->getValue("called") == "1001") {

     .....

}




Just the authentication mystery to solve now !

Thank you, regards
Jamie


12

I've just been looking at an external script as an alternative option.

I remember now why I went the database route and doing it all in register.conf and the pg function!

Setting up an external script is straightforward.

I can also make it listen for the the call.route message event and point it at something eg tone/busy or moh/default to test.

But my problem has always been authentication.

The auth process it's self is ok,

My problem is when i come to route the call in the .php script, how do I check the user is authenticated before routing ?

There's no username parameter in my call.route, so I've installed user.auth as  well.

But, if i try to listen for the the user.auth event, i can quite often get the call.route event before seeing an auth event, defeating the purpose.

I must be looking at this in the wrong way. I suspect priorities !

Sorry to leave you with two questions, but any pointers would be really helpful !

Thank you!

Jamie

PS I'm still using register.conf for it's other features, eg auth, cdr, line status etc





13
Hi Monica,

Thanks for your reply.

This is actually one of the pages I've been trying to use.

From your notes are you saying we'd need to return 'column' as follows:

( column name = value )

location = fork
param1 = abc
param2  = xyz

If so, I'm unsure how to translate that to the various fork targets. Where would I put the index for example and what format is ?

Just a quick example would be great !

Thank you

Jamie

14
Hi!

Please could I ask for a little help?


My Objective:

To route an incoming call using a database with a fork to two or more different registered 'lines' (accounts) and/or Registered SIP users
Everything is done from a database utilising register.conf
 

I've created a PostgreSQL prepared statement to return a single row with any columns we require. Eg location, line, callername etc etc


Routing to say a registered SIP user or an account (line) individually works fine, as follows:


forking the incoming call to two registered sip users, i return:

Code: [Select]
location = fork sip/sip:testuser1@1.2.3.4 sip/sip:testuser2@1.2.3.4
line = <NULL>

Or ...

two or more endpoints on the same line, we return fields as:

Code: [Select]
location = fork sip/01234567890 sip/01234567891
line = my_gateway

Both of the above methods work fine,

but I'm a bit flummoxed how to do the same with a mixture of registered users and lines.

I had hoped something like this would work, but alas it didn't :

Code: [Select]
location = fork sip/sip:test1@1.2.3.4 sip/01234567891;line=my_gateway
line = <NULL>

Is what I'm trying to achieve possible from register.conf ?

If it is, please could you point me in the right direction ?

Thank you!
Regards
Jamie

15
Yate users hangout place / Re: How to Generate a series of DTMF tones
« on: March 07, 2016, 09:36:04 AM »

Thanks Marian,

I'll stick with 'chan.dtmf ', it seems the better solution all round !

Thanks again for your help !

Regards
Jamie


Pages: [1] 2 3