Jump to content
PortSIP PBX for Unified Communications
FenilS14

Not able to play an audio file

Recommended Posts

Hi I want to implement a IVRS like feature where in after the call is attended, I want to play a wav file.

The call is successfully getting placed, but the audio file is not played.

The application calls the method PortSIP_playAudioFileToRemote but the audio file is not being heard when the user recieves the call.

 

Any help would be appreciated.

Share this post


Link to post
Share on other sites
2 hours ago, FenilS14 said:

Hi I want to implement a IVRS like feature where in after the call is attended, I want to play a wav file.

The call is successfully getting placed, but the audio file is not played.

The application calls the method PortSIP_playAudioFileToRemote but the audio file is not being heard when the user recieves the call.

 

Any help would be appreciated.

Please ensure the audio file format is correct, you can read the user manual there.

Share this post


Link to post
Share on other sites
13 hours ago, admin said:

Please ensure the audio file format is correct, you can read the user manual there.

Hi Admin,

Thanks for the reply.

The audio file which I'm using is the Wave file(.wav) which plays perfectly fine when played on Multimedia apps . Also the program call goes to the PortSIP_playAudioFileToRemote method.

I'm unable to attach the wave file here.

Share this post


Link to post
Share on other sites
1 hour ago, FenilS14 said:

Hi Admin,

Thanks for the reply.

The audio file which I'm using is the Wave file(.wav) which plays perfectly fine when played on Multimedia apps . Also the program call goes to the PortSIP_playAudioFileToRemote method.

I'm unable to attach the wave file here.

Also I get the error -70001 (EAudioChannelNotFound) from the PortSIP_playAudioFileToRemote method.

Please help me out....

 

Share this post


Link to post
Share on other sites
On 5/1/2020 at 10:34 AM, FenilS14 said:

Also I get the error -70001 (EAudioChannelNotFound) from the PortSIP_playAudioFileToRemote method.

Please help me out....

 

Hi Admin,

Could you please help me out here?

Thanks,

Fenil

Share this post


Link to post
Share on other sites
On 4/30/2020 at 7:22 PM, admin said:

Please ensure the audio file format is correct, you can read the user manual there.

Hi Admin,

I checked the format of my audio file.

It's a Wave file. It plays perfectly when played with  the Window Media Player.

Also, when I call the method PlayAudioFileToRemote() it executes successfully as it returns 0.

But, still the wave file is not heard over the call.

Could you please suggest any workaround?

Share this post


Link to post
Share on other sites

Hi,

1. Also I get the error -70001 (EAudioChannelNotFound) from the PortSIP_playAudioFileToRemote method.

Please check the sessionId is correct.

2. Please check the wav file format is :

8000/16000 /32000/48000Hz, 16 bit , pcm ,mono

 

 

Share this post


Link to post
Share on other sites
On 5/12/2020 at 2:48 PM, FenilS14 said:

Hi Joe,

I tried with the audio file format you suggested 8000/16000 /32000/48000Hz, 16 bit , pcm ,mono

the file I used: https://www.dropbox.com/s/etxzed3e2c2j62i/sppech (1)_updated.wav?dl=0

Thanks,

Fenil

This file format is correct, i can use our Sample play this file to remote side.

Can you send a code segment or a sample project to me?

Share this post


Link to post
Share on other sites
13 hours ago, Joe Lepple said:

This file format is correct, i can use our Sample play this file to remote side.

Can you send a code segment or a sample project to me?

Hi Joe,

I've used the sample code provided at the given link

 http://www.portsip.com/portsip-voip-sdk.

I just get the code and execute with the configurations and stun server created on my end with the modem configurations.

Please suggesst if I require to do anything else. or you can share me the sample code which you are using or any such sort of.

Thanks,

Fenil

Share this post


Link to post
Share on other sites
Posted (edited)

Our SDK Sample is included play file function. e.g this is CSharpSample_WPF\SIPSample UI.

When the call is connected, choose the audio file , and click "Start Play", remote side will hear it.

Your file is correct, i can play it to remote side on this Sample.

image.thumb.png.b705906cb7997956ee7cb625885828ca.png

This is the demo code, you can found it at SIPSample.

            _sdkLib.playAudioFileToRemote(_CallSessions[_CurrentlyLine].getSessionId(), waveFile, 16000, false);

 

 

Edited by Joe Lepple

Share this post


Link to post
Share on other sites
11 hours ago, Joe Lepple said:

Our SDK Sample is included play file function. e.g this is CSharpSample_WPF\SIPSample UI.

When the call is connected, choose the audio file , and click "Start Play", remote side will hear it.

Your file is correct, i can play it to remote side on this Sample.

image.thumb.png.b705906cb7997956ee7cb625885828ca.png

This is the demo code, you can found it at SIPSample.

            _sdkLib.playAudioFileToRemote(_CallSessions[_CurrentlyLine].getSessionId(), waveFile, 16000, false);

 

 

Hi Joe,

Thanks a Lot for the consistent help.

I noticed that I'm able to play the waiting music(already uploaded to my modem configuration) while I try to hold the call.

But when I choose the wav file and click the start button, the function call goes to  _sdkLib.playAudioFileToRemote(_CallSessions[_CurrentlyLine].getSessionId(), waveFile, 16000, false);

and it returns the code 0 (which means successful). But not able to hear the sound on remote.

Is there any possibility that I might me using the older version of the DLL.

So, could you please share me the DLL that you used  and Also, another query that do I need to upload the wav file to my modem configuration or any such thing....?

 

Thanks,

Fenil

Share this post


Link to post
Share on other sites

I use the version download from our website.

If you not play wave file, both side can hear other side voice?

Are you both side use our SIPSample?

 

Share this post


Link to post
Share on other sites
On 5/16/2020 at 2:31 PM, Joe Lepple said:

I use the version download from our website.

If you not play wave file, both side can hear other side voice?

Are you both side use our SIPSample?

 

Hi Joe,

When I place the call through modem, I can hear the receiver's voice but the other person can't hear my voice.

Moreover, When I run the sample code, it detects the speaker as "Remote Audio" but for Microphone it's blank.

I even tried adjusting the volume for the microphone, but still the other person(called person) isn't able to hear my voice.

 

Tha nks,

Fenil

Share this post


Link to post
Share on other sites

Hi  Fenil,

Are SIPSamples used on both sides?
I think this problem is related to your server.
Can You test with our SIP account:
SIP Domain: portsip.net
UDP Transport: 5060

Account 1:
username: 701
Password: Test123

Account 2:
username: 702
Password: Test123

Best regards,

Share this post


Link to post
Share on other sites
On 5/22/2020 at 1:45 PM, Joe Lepple said:

Hi  Fenil,

Are SIPSamples used on both sides?
I think this problem is related to your server.
Can You test with our SIP account:
SIP Domain: portsip.net
UDP Transport: 5060

Account 1:
username: 701
Password: Test123

Account 2:
username: 702
Password: Test123

Best regards,

Hi Joe,

I'm not using the SIP sample on both the sides.

I'm trying to make the call from a server which I've created on my end & using this SIP I 'm calling a cell no. (Any Mobile Carrier) & not on SIP.

When the other user(cell number) receives my call, I'm trying to play a .wav file.

It is necessary to use the SIP on both sides in order to play the audio file ...?

Thanks & Regards,

Fenil

Share this post


Link to post
Share on other sites

Hi Fenil,

Moreover, When I run the sample code, it detects the speaker as "Remote Audio" but for Microphone it's blank.

It's look like you use RDC, and the PC haven't audio device?

image.png.d4fa32903598f620678725ebed58ffe9.png  

If you need run our SDK on a PC without audio device, you can set audioDeviceLayer = 1 in initial API to use virtual audio device.

image.thumb.png.69026010da30b0eabe198fd5bb3108c5.png

 

Best regards,

Share this post


Link to post
Share on other sites
12 hours ago, Joe Lepple said:

Hi Fenil,

Moreover, When I run the sample code, it detects the speaker as "Remote Audio" but for Microphone it's blank.

It's look like you use RDC, and the PC haven't audio device?

image.png.d4fa32903598f620678725ebed58ffe9.png  

If you need run our SDK on a PC without audio device, you can set audioDeviceLayer = 1 in initial API to use virtual audio device.

image.thumb.png.69026010da30b0eabe198fd5bb3108c5.png

 

Best regards,

Hi Joe,

Oohh God !! This was the mistake I've been doing since long.

Thanks a lot Joe. Appreciated!!

Now, I'm able to play the audio file on the remote device. Thanks for your consistent support.

But, I would like to ask for your little help again.

I'm able to play the audio file on remote device , but the issue is I can play the audio file even when the remote user hasn't picked up the call.

And when the user picks up , half of the audio file has been played.

I've implemented the event onInviteAnswered() but I can observe that the program call goes to this method even when the user hasn't picked up and the audio file starts playing.

Could you please suggest some work around here ?

Thanks & Best Regards,

Fenil Shah 

Share this post


Link to post
Share on other sites

When you start PortSIP_playAudioFileToRemote?

Please start playAudioFileToRemote after onInviteAnswered or onInviteConnected

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...