Author Topic: Possible mistake in Documentation- External module : %%>connect  (Read 6452 times)

jamie

  • Newbie
  • *
  • Posts: 38
    • View Profile
Possible mistake in Documentation- External module : %%>connect
« on: November 06, 2018, 09:37:40 PM »
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
« Last Edit: November 06, 2018, 09:43:15 PM by jamie »