only i dont receive any other information on this socket and there is not option to send anything over this
so i recommend that can it be possible to send the externalmedia channelid which is already created when we do createExternalMedia can we send that id on this so that we can have the reference of which channel is this socket channel
and if not this can any way we can send custom variables to this on somehow
let externalMediaId = randomString();
await channel.externalMedia(
{
channelId : externalMediaId,
app : `${constants.CALL_TYPE},chanType:streaming`,
external_host : 'media_ws',
format : "slin16",
transport : "websocket",
encapsulation : "none",
connection_type: "client",
direction : "both",
});
Yes @jcolp , i have checked this but i believe this is the same thing i mentioned in the previous issue also i am using asterisk ari client library where when i pass like
channel.externalMedia(
{
channelId : externalMediaId,
app : `${constants.CALL_TYPE},chanType:streaming`,
external_host : 'ace_media_ws',
format : "slin16",
transport : "websocket",
encapsulation : "none",
connection_type: "client",
direction : "both",
variables: {
"name":"gaurav"
}
});
i donot received that variable in asterisk -rvv it shows
the same thing happen in codec side but gtjoseph has done some changes in code and then it works using ari client also
I did not mention channel variables going over the websocket. What I posted was the ability to put query parameters in the URL that the websocket uses for establishing the outgoing connection, which can then be used by the receiver of the HTTP request.
same => n,Dial(Websocket/connection1/c(slin16)v(variable=${CHANNEL},variable2=${EXTEN}))
MEDIA_START connection_id:e226e283-c90a-4ea9-9e37-389000b9ef47
channel:WebSocket/connectionid format:ulaw optimal_frame_size:160
variable:PJSIP/aslice-00000000 variable2:1000
it is mentioned and this is using Dial applicaiton of asterisk and then passing v and then variables i am saying i am using asterisk ari-client node js library i am not using the dial application for dialing this channel
i am using
library to create the external media channel and it automatically create the channel internall how to i pass the variables in this
You can use the normal Originate route[1] like other channels and like Dial, but passing in a full Dial string including v arguments with the contents as you like. Because itās not dialplan, though, you canāt pass in dialplan variables. You pass in a complete string.
Agreed @jcolp , but then the usecase of using this Asteirsk ari library will not be used because in this library it do accepts the variables key and can we use the variables key as create the string as v
because this library also fixes the codec supports in previous issue
gtjoseph has done changes but then also i want not able to use the c in asterisk ari library then
gtjoseph done some changes again then it automatically get added in the string the same way i believe this can be resolved
i request you please take a look into this if this is possible then complete node ari client library will be perfect
@gauravs456 I think what youāre saying is that in the MEDIA_START message you get the channel name (WebSocket/media_ws/0x77049c004260) but you donāt get the channel id (1760736676.24) which is what you need to make other ARI calls for that channel. Is that right?
Hi @gjoseph, yes you are right channelId of this external media channel is not there which i think is necessary and also there is a closed issue you mentioned to pass custom variables
but i tried to pass the variable like the above code snippet but on asterisk rvvv loga its not coming
i guess it has to come like in V () parameter right how can i do that
and also i there is a leverage of sending custom parameter in external media the it would be the best solution
then i can send whatever i want
which i believe you have done that but this is not working using asterisk ari client library
Sure @gjoseph I am creating That but can you please confirm the issue that mentioned above that is passing custom uri parameters that you have done, how can i see if it is working and which part are you talking about for creating the issue
there are 2 things
having the channelId in the MediaConnected message
i can pass custom variables that can self resolve the 1st point
which point you are referring to ? and can you please check it this points are working at your end
because i checked at my end its not working i checked 2nd point
Hi @gjoseph , I just wanted to tell that i have done these changes and its my first time to work on open source project, can you please guide me how can i push my branch so that you can review my code if possible