Git Product home page Git Product logo

Comments (11)

cspiel1 avatar cspiel1 commented on June 12, 2024 1

I could reproduce the following issues with aufile as audio source for calls between two baresip instances:

  • (A) When ausrc is set before the call, then the audio file is played too early at the peer and most of the frames are dropped. Not sure if the problem is at sender or receiver.
  • (B) When changing/restarting the stream with invoking again /ausrc aufile,... then the playback at the peer is not clear. Sounds like that we have underruns. But also not clear if at the sender or receiver so far.

from baresip.

alfredh avatar alfredh commented on June 12, 2024 1

If audio frames are lost in the beginning, it might be possible to make some workarounds:

  1. add a small start timer (e.g. 200ms)
  2. add some silence to the beginning of the WAV file

In a call setup sequence:

-INVITE->
<-200 OK-
-ACK->

The RTP ports must be ready to receive packets before the INVITE is sent out.

Same thing with sending 200 OK.

The audio file should be started when receiving ACK.

Alfred

from baresip.

cspiel1 avatar cspiel1 commented on June 12, 2024 1

I had no time so far. Me or one of my colleagues will try to have a look on it this week. First we try to find a solution for (A). Also originally mentioned by @joaquinjsb.

from baresip.

maximilianfridrich avatar maximilianfridrich commented on June 12, 2024 1

I have a fix for part A (I believe):

from baresip.

joaquinjsb avatar joaquinjsb commented on June 12, 2024 1

I'll give a look to it, or otherwise just gonna use some long wav of 1-2 minutes.

Thanks for your valued support!

from baresip.

cspiel1 avatar cspiel1 commented on June 12, 2024

(A): The frames are dropped at the receiver because it is not enabled fast enough. This occurs only when the caller is the receiver and the callee is the sender of the audio file. The callee starts sending RTP immediately after sending the SDP answer. While the caller has to receive and process the SDP answer before it can enable the stream. That's why a few audio frames are lost.

from baresip.

cspiel1 avatar cspiel1 commented on June 12, 2024

You're right. I'll try to find a work around or the ACK solution this or next week.

from baresip.

Cherry2397184651 avatar Cherry2397184651 commented on June 12, 2024

#2874 中讨论

引用自 joaquinjsb 2024 年 1 月 12 日您好,我正在尝试制作自动呼叫系统,但是只有在建立呼叫后我才能播放音频,我按照以下步骤启动裸机:

  1. 开始 Baresip
  2. 使用 /dial 命令进行呼叫
  3. 手动建立调用后,我只需触发 /ausrc aufile,/usr/local/share/baresip/myaudio.wav

所以我的问题是,

  1. 如何循环播放音频或仅在接听电话后才开始播放?当我在拨号后使用 /ausrc 时,它只是喜欢立即播放它
  2. 如何实现自动化?我想通过 https 接口来做,但没有文档,否则,imma 将通过 shell 仿真来做,但我宁愿不这样做。

Hello, I am currently working as an intern in a company, and I am also trying to build an automatic call system. I would like to ask you how to achieve it.

from baresip.

joaquinjsb avatar joaquinjsb commented on June 12, 2024

I have a fix for part A (I believe):

Thanks man! I'll wait for it to be merged and I'll let you know if it's working properly, or if you guys want I can try to build this pr and check

from baresip.

maximilianfridrich avatar maximilianfridrich commented on June 12, 2024

From #2909:

@joaquinjsb There are multiple ways to listen to BareSIP events - D-Bus, or TCP/UDP sockets for example. I'm not an expert on these things though.

from baresip.

cspiel1 avatar cspiel1 commented on June 12, 2024

The main issue (A) is solved.
(B): Optimization should be done for audio_txmode thread. There are quite a lot TX underruns. We put this onto our TODO list for next release. I'll add this to https://github.com/baresip/baresip/wiki/Roadmap

from baresip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.