Softphone, webphone and VoIP server Forum

HomeHomeDiscussionsDiscussionsMizu WebphoneMizu WebphoneHELP ME! Java SIP, not working playSoundHELP ME! Java SIP, not working playSound
Previous
 
Next
New Post
7/29/2019 3:15 PM
 
Hello, just apologize for my English, I'm just Russian, so the thing is, does not work audio.. My code: https://pastebin.com/HagtEwQs
 
New Post
7/29/2019 7:12 PM
 
You can't call these functions one after another in a row.
Each API call is executed asynchronously which means that your call will disconnect immediately before to connect.
You should call the API_PlaySound only after the call is connected (“CallConnect” STATUS received) and you should call API_Hangup only after the playback is ready.
 
New Post
7/30/2019 12:32 PM
 
SuperUser Account wrote:
You can't call these functions one after another in a row.
Each API call is executed asynchronously which means that your call will disconnect immediately before to connect.
You should call the API_PlaySound only after the call is connected (“CallConnect” STATUS received) and you should call API_Hangup only after the playback is ready.

 

How can I tell when the audio is playing?
 
New Post
7/30/2019 1:21 PM
 
You should receive a PLAYREADY notification.

From the doc:
PLAYREADY,line,callid
Audio streaming finished (initiated by API_PlaySound to remote peer).
Note: this notification is not sent with call disconnect (call disconnect will always terminate the audio streaming).
 
New Post
7/30/2019 1:35 PM
 
SuperUser Account wrote:
You should receive a PLAYREADY notification.

From the doc:
PLAYREADY,line,callid
Audio streaming finished (initiated by API_PlaySound to remote peer).
Note: this notification is not sent with call disconnect (call disconnect will always terminate the audio streaming).

 

I'm a little confused, could you set an example, please?
 
New Post
7/30/2019 2:04 PM
 
Please have a look at the "Notifications" chapter in the documentation.
If you follow the example code then you can catch these notification strings in the ProcessNotifications function (SIPNotifications.java file) and parse them accordingly.
 
New Post
7/30/2019 2:05 PM
 
What exactly are you using? The webphone from javascript or JVoIP from java?
 
New Post
7/30/2019 3:15 PM
 
SuperUser Account wrote:
Please have a look at the "Notifications" chapter in the documentation.
If you follow the example code then you can catch these notification strings in the ProcessNotifications function (SIPNotifications.java file) and parse them accordingly.

 Ok, not working.. All done, but the audio does not play!

 this.webphoneobj.API_PlaySound(1, "Доставка пиццы.wav", 0, false, false,false, -1); break;

 
New Post
7/30/2019 3:16 PM
 
SuperUser Account wrote:
What exactly are you using? The webphone from javascript or JVoIP from java?

 

JVoIP from JAVA
 
New Post
7/30/2019 3:28 PM
 
SuperUser Account wrote:
Please have a look at the "Notifications" chapter in the documentation.
If you follow the example code then you can catch these notification strings in the ProcessNotifications function (SIPNotifications.java file) and parse them accordingly.

 

I have connected the class that was specified in the documentation
 
Previous
 
Next
HomeHomeDiscussionsDiscussionsMizu WebphoneMizu WebphoneHELP ME! Java SIP, not working playSoundHELP ME! Java SIP, not working playSound


You need to register / login to be able to post in the forum