GithubHelp home page GithubHelp logo

No audio on answer about tg2sip HOT 10 OPEN

multi avatar multi commented on August 26, 2024
No audio on answer

from tg2sip.

Comments (10)

French1979 avatar French1979 commented on August 26, 2024 2

Can you elaborate more on that? Where, how, any hints/tips/steps would be helpful! :)

https://github.com/TelegramMessenger/Telegram-iOS/releases/tag/build-25451

hi i see some fixes with calls here maybe ios client is fixed now

you can try test it if you want)

We tested - no voice :(

from tg2sip.

multi avatar multi commented on August 26, 2024

Also, it doesn't work with the pre-built binaries from here. Tried with universal 1.3.0

from tg2sip.

multi avatar multi commented on August 26, 2024

@oksakhartman

  • iOS (latest os and tg app version) - that's the first leg, I'm trying to telegram call it from tg2sip
  • the second leg - Linphone (macOS, latest again), running on the same local network Asterisk
  • calls are working fine on the iOS tg app - Tested by calling friends. Also few of the Linphone calls succeeds, and there was audio :)

Not sure if related, but

pjproject-git 2.13.r79.gf60d1c4-1 - built with

#define PJMEDIA_CONF_USE_SWITCH_BOARD 1
#define PJMEDIA_CONF_SWITCH_BOARD_BUF_SIZE 2000

I can paste the whole config_site.h if needed ...

Here's the configure command

./configure \
    --prefix=/usr \
    --enable-epoll \
    --with-external-speex \
    --with-external-srtp \
    --with-external-gsm \
    --disable-video \
    --disable-sound \
    --enable-shared

from tg2sip.

multi avatar multi commented on August 26, 2024

@oksakhartman I've managed to test some scenarios :)

A - tg2sip (and Asterisk)
B - iOS, latest tg
C - iOS, linphone
D - Android, latest tg
E - Android, latest tg X
F - macos, latest tg client
G - macos, chrome web z
H - macos, linphone

H -> A -> B - no audio
B -> A -> H - no audio
H -> A -> D - works
H -> A -> E - works
C -> A -> H - works
C -> A -> G - can't answer, the web client says "You need to upgrade to latest version..." From there I've downloaded F (macos tg client)
C -> A -> F - works (audio connects after 2-3 seconds delay)
D -> A -> H - works
E -> A -> H - works
C -> A -> D - works
C -> A -> E - works
E -> B - no audio (emojis match)
D -> B - works
G -> B - works
F -> B - works

Not sure, why few of the calls had audio (also, 7-8 in a row), between H -> A -> B ? I'm starting to suspect, that if the call gets "routed" through "udp reflector" that "accepts" version 2.4.4 - it works :/


Here are the changes that I've made to get branch feature/libtgvoip-update building without errors

using tdlib commit id b3ab664a18f8611f4dfcd3054717504271eeaa7a (few commits after that, the lib apis changes and doesn't work anymore with the implementation here in tg2sip)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8507dbe..9d76659 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -7,7 +7,7 @@ add_subdirectory(libtgvoip)
 
 find_package(PkgConfig REQUIRED)
 find_package(Threads REQUIRED)
-find_package(Td 1.7.10 REQUIRED)
+find_package(Td 1.8.0 REQUIRED)
 find_package(spdlog 0.17 REQUIRED)
 pkg_check_modules(PJSIP libpjproject>=2.8 REQUIRED)
 pkg_check_modules(OPUS opus REQUIRED)
@@ -57,4 +57,4 @@ target_include_directories(gen_db PRIVATE
         include)
 
 target_link_libraries(gen_db PRIVATE
-        Td::TdStatic)
\ No newline at end of file
+        Td::TdStatic)
diff --git a/tg2sip/queue.h b/tg2sip/queue.h
index bfe1fa0..fb98706 100755
--- a/tg2sip/queue.h
+++ b/tg2sip/queue.h
@@ -21,6 +21,7 @@
 #include <mutex>
 #include <queue>
 #include <condition_variable>
+#include <optional>
 
 template<typename T>
 class OptionalQueue {
diff --git a/tg2sip/sip.cpp b/tg2sip/sip.cpp
index 06672a6..8dccc9d 100755
--- a/tg2sip/sip.cpp
+++ b/tg2sip/sip.cpp
@@ -185,10 +185,10 @@ void Client::init_pj_endpoint(Settings &settings, LogWriter *sip_log_writer) {
     // and TG audio port clock rate so we MUST force
     // using 48kHz codecs for all SIP calls
     std::string codecId = settings.raw_pcm() ? "L16/48000/1" : "opus/48000/2";
-    CodecInfoVector codecVector = ep.codecEnum();
+    CodecInfoVector2 codecVector = ep.codecEnum2();
 
-    for (auto const &value : codecVector) {
-        ep.codecSetPriority(value->codecId, (pj_uint8_t) (value->codecId == codecId ? 255 : 0));
+    for (auto const value : codecVector) {
+        ep.codecSetPriority(value.codecId, (pj_uint8_t) (value.codecId == codecId ? 255 : 0));
     }
 
     TransportConfig t_cfg;
@@ -309,4 +309,4 @@ void Client::DialDtmf(pjsua_call_id call_id, const string &dtmf_digits) {
 
     auto call = it->second;
     call->dialDtmf(dtmf_digits);
-}
\ No newline at end of file
+}
diff --git a/tg2sip/utils.cpp b/tg2sip/utils.cpp
index c8da02b..60b5df9 100644
--- a/tg2sip/utils.cpp
+++ b/tg2sip/utils.cpp
@@ -15,7 +15,8 @@
  * along with this program; If not, see <https://www.gnu.org/licenses/>.
  */
 
+#include <regex>
 #include <algorithm>
 #include "utils.h"
 
-bool is_digits(const std::string &str) { return std::all_of(str.begin(), str.end(), ::isdigit); };
\ No newline at end of file
+bool is_digits(const std::string &str) { return std::regex_search(str, std::regex( "\\d+" )); };

from tg2sip.

multi avatar multi commented on August 26, 2024

@oksakhartman Yup, few calls had audio. Maybe 10 out of ~200 :) Also, one time it worked for 5-6 calls made in a row, then after restarting tg2sip doesn't worked anymore (still not worked from that time) :/

Looks like a bug, yeah ... If it was a "rejection" from deprecation, it shouldn't worked at all :)

from tg2sip.

multi avatar multi commented on August 26, 2024

@oksakhartman

I switched to a fork on webrtc

Can you elaborate more on that? Where, how, any hints/tips/steps would be helpful! :)

from tg2sip.

AlexHighTower avatar AlexHighTower commented on August 26, 2024

I switched to a fork on webrtc

I will be grateful if you provide compiled x64 binaries for tests

from tg2sip.

French1979 avatar French1979 commented on August 26, 2024

We tested - no voice :(

https://github.com/TelegramMessenger/Telegram-iOS/releases/tag/build-25780

No voice :(

from tg2sip.

French1979 avatar French1979 commented on August 26, 2024

No voice :(

вроде уже работает на айфонах

Что значит вроде, вы тестировали?

from tg2sip.

French1979 avatar French1979 commented on August 26, 2024

No voice :(

вроде уже работает на айфонах

Протестировали, голоса нету.

from tg2sip.

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.