Play caller a sound file before dialing callee. - playback

I am trying to play caller a file before dialing callee with opensips and rtpproxy. I used the makeann from rtpproxy to pre encode a wav file didyou8r1c.wav(mono, 16bit, 8k), which gave didyou8r1c.wav.0 and didyou8r1c.wav.8.
Both files are located in /opt/test/ directory. My invite block is given below.
if (has_body("application/sdp")) {
if (rtpproxy_offer())
t_on_reply("1");
xlog("Trying to Play Caller file");
rtpproxy_stream2uac("/opt/test/didyou8r1c", "-1");
}
But i see this error in rtpproxy logs.
Jan 4 04:07:08 66-226-76-150 rtpproxy[3977]: INFO:GLOBAL:handle_command: play request failed: session ZjU2NDU4Y2M1ODJlYjVmZjNmODY4MGI2MmU5ZTNkZjI., tags 253e361d;1/NONE not found
I hope someone can help me in figuring out what i am doing wrong.
Best Regards.

Related

FTP connectivity issue from Mule

I am receiving the below error while connecting the FTP path for file transfer through
Mulesoft code and it is worked for so many days, unfortunately, we received this error from a
couple of dys. So please help me to fix this.
Error
Message: An exception was found trying to obtain a connection: Found exception trying to change transfer mode to class org.mule.extension.ftp.api.ftp.FtpTransferMode. FTP reply code is: 421
Element : ac-ngwtransform-ftp-v1Flow/processors/6/processors/0/route/0/processors/1 # azx-us-int-ac-ngwtransform-ftp-v1:ac-ngwtransform-ftp-v1.xml:84 (Reading the file from FTP)
Element XML : <ftp:read doc:name="Reading the file from FTP" doc:id="da9be7af-d84b-4a78-a8ce-cd9f117aa273" config-ref="FTP_Config_NGW" path="#[attributes.fileName]" outputMimeType="text/plain"></ftp:read>
Error type : FTP:CONNECTIVITY
Payload Type : org.mule.runtime.core.internal.streaming.bytes.ManagedCursorStreamProvider
--------------------------------------------------------------------------------
Root Exception stack trace:
org.apache.commons.net.ftp.FTPConnectionClosedException: FTP response 421 received.
you can use reconnection strategy to fix this issue.
go to your ftp connector-->advance->click reconnection and make the reconnection strategy standard.

How to read grpc command line tool error messages from the responses?

I am using the grpc command line tool to test response for my grpc request. This is the official link to the grpc command line tool: https://github.com/grpc/grpc/blob/master/doc/command_line_tool.md (The usage guide is not updated. Kindly read ~/workspace/src/github.com/grpc/bins/opt/grpc_cli help)
I am running the command from the location where my protocol file resides. I am sending a request like this, (FYI: I am also sending the metadata. Irrespective of inclusion of the metadata or not I am getting the same error message) :
$ ~/my_workspace/src/github.com/grpc/bins/opt/grpc_cli call 0.0.0.0:50051 \
MyGrpcMethod <name_of_my_proto_file.proto> "abc : '12-34-56-78', xyz: '1234'" \
--metadata "auth:<auth_token>:space:xxx:org:xxx" --enable_ssl=false
In the response I am getting it says that there are some errors however, it does not show what the errors are. Here is the response I got from my client request:
connecting to 0.0.0.0:50051
Failed to read response.
Rpc failed with status code 12 error message unknown service my_agent.MyServiceAPI
Right now, I am not able to figure out from the documentation or otherwise on how to read the response. Did anyone face an issue like this?

Is this format supported: avc1.77.40,mp4a.40.34

I'm getting this error when playing an m3u8 file on the Chromecast
Uncaught NotSupportedError: Failed to execute 'addSourceBuffer' on 'MediaSource': The type provided ('video/mp2t; codecs="avc1.77.40,mp4a.40.34"') is unsupported.
I know in the past I was given a line to replace avc1.66.* with .30 codecs when processing the manifest, should I do the same for this?
Thanks.

Saving an image file with Node.js request library causes exception

This is from the request's Github repo - https://github.com/mikeal/request
You can stream any response to a file stream.
request('http://google.com/doodle.png').pipe(fs.createWriteStream('doodle.png'))
I have modified it like so, where largeImage is a absolute url path from 3rd-party website.
request(largeImage).pipe(fs.createWriteStream('./img/large/demo.jpg'));
But I get the following error (not sure why?). I have looked at the createWriteStream API and it seems to be correct. If I only include "demo.jpg" it works fine. But if I include path next to "demo.jpg" it throws an exception.
stream.js:81
throw er; // Unhandled stream error in pipe.
^
Error: ENOENT, open './img/large/demo.jpg'
10 Oct 16:51:02 - [nodemon] app crashed - waiting for file changes before starting...
UPDATE: The problem was I didn't include ./public/ folder before the /img/.
This updated code works correctly:
request(largeImage).pipe(fs.createWriteStream('./public/img/large/demo.jpg'));
It all looks OK. My guess is that the issue is related to permissions or maybe needing to create the ./img/large directory first.
Do something like this to get more info:
var ws = fs.createWriteStream('./img/large/demo.jpg');
ws.on('error', function(err) { console.log(err); });
request(largeImage).pipe(ws);

After porting some php and web app related files from my friend's windows computer to my mac I'm getting some errors

This is for a facebook app being run on heroku, but heroku is probably not the issue. The issue is either some kind of cache related thing, os porting, or I'm thinking it might be a carriage return issue.
In any case I'm getting a couple errors at the top and bottom respectively:
Warning: Unknown:
Warning: session_start(): open(C:\ProgramData\Jcx.Software\VS.Php\2.10.6970.0\temp/sess_i4ood4poc11ebsgth000g1nm74, O_RDWR) failed: No such file or directory (2) in /app/www/sdk/src/facebook.php on line 37
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /app/www/sdk/src/facebook.php:37) in /app/www/sdk/src/facebook.php on line 37
open(C:\ProgramData\Jcx.Software\VS.Php\2.10.6970.0\temp/sess_i4ood4poc11ebsgth000g1nm74, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct (C:\ProgramData\Jcx.Software\VS.Php\2.10.6970.0\temp) in Unknown on line 0
Essentially I have tried the whole "making sure session is at the top thing," but I don't have that session piece of code in any of the files. I have tried the whole making sure "?>" is on a new line as well to no effect.
update
I have discovered something called:
zend_extension_ts="C:\Program Files (x86)\Jcx.Software\VS.Php\2010\php 5.2\ext\php_xdebug.dll"
within a file called php.ini which even after I tried to get rid of didn't seem to change anything. So, I'm thinking this has something to do with some previous files that I pushed and then removed with extensions like puo, intellisense.cache, projphp, etc.
I don't know if those are auto-generated or not, but in any case according to my errors:
There is some session data in a file called temp. I have no file named temp.
zend_extension_ts supposedly gets referenced somewhere, but it isn't visible in my code.
I apparently need to resend session cache limiter again through session_start() which is not visible in my code.
Is not the session , I'm sure. But there is directory path included in your code but that directory does not exist! Just refactor that part of the code first!
As a tip you should use realpath() and check if path exist before attempting to use it.
Hope this helps!

Resources