tomek-o / tSIP

SIP softphone
149 stars 32 forks source link

G.729 compiling instructions need to be updated #19

Closed mlsomers closed 3 years ago

mlsomers commented 3 years ago

The instructions here no longer seem to work. I could not find any folder with the name g729a_v11.

I did find the module here and a different version here, so I tried to rename the folder from mod_g729 to g729a_v11 and use that instead, but the build fails with failing to find typedef.h

I'm not sure if this is going to help me though, can someone tell me what exactly determines witch codec is used? When I use my cellphone I see in the logs that it picks PCMA 8000Hz 1ch, but when I use a FritzFon it will pick G722 16000Hz 1ch which sounds allot better. Is it the device I am calling with or is it the telephone provider that determines the mutual codec? I tried forcing the better codec by removing 8000 codecs, but I got my voicemail and the logs showed there was no mutual codec available (when using my mobile phone). I was hoping that G.729 would sound better than PCMA (hopefully it is supported by my device or provider).

tomek-o commented 3 years ago

The instructions here no longer seem to work. I could not find any folder with the name g729a_v11.

Here is some mirror: https://github.com/guyt101z/fs_itu_g729

I'm not sure if this is going to help me though, can someone tell me what exactly determines witch codec is used? When I use my cellphone I see in the logs that it picks PCMA 8000Hz 1ch, but when I use a FritzFon it will pick G722 16000Hz 1ch which sounds allot better. Is it the device I am calling with or is it the telephone provider that determines the mutual codec? I tried forcing the better codec by removing 8000 codecs, but I got my voicemail and the logs showed there was no mutual codec available (when using my mobile phone).

It is negotiated by softphone and operator (or e.g. softphone and softphone if this is p2p call), but operator may also prefer/enable/disable some of the codecs depending on what is on second call leg. If there is POTS-like service on the other side then no codec would be able to provide better quality than PCMU/PCMA and operator (SIP PABX) may not want to do transcoding as it adds cost to him (some operators never do transcoding).

I was hoping that G.729 would sound better than PCMA (hopefully it is supported by my device or provider).

G.729 would probably sound slightly worse (it has lower MOS, same 8000 Hz sampling and it is specialized voice codec), unless you have packet loss due to limited bandwidth (less than ~100 kbps), but this is rather unlikely.

mlsomers commented 3 years ago

Thank you, I'm able to build the DLL now. I could not get it to load though.

The log says: open: D:[lst_of_dirs]\tSIP_0_1_75_bin\modules\g729.dll LoadLibraryA() failed module g729.dll: No such file or directory (code 2)

Not sure what went wrong, but it all doesn't really matter because I will not be using it any way thanks to your explanation.

I really appreciate all the time and effort you put into this! have been evaluating many soft-phones (more than 20) over the last week but I think I'm sticking with this one. It's small, fast, open, configurable, scriptable and has a helpful log that shows exactly what's going on under the hood. Thanks again and keep up the great work!

tomek-o commented 3 years ago

open: D:[lst_of_dirs]\tSIP_0_1_75_bin\modules\g729.dll LoadLibraryA() failed

I'm not sure what would be the reason. Common problems when loading DLLs are dependencies from other DLLs not being met - "Dependency Walker" x86 might show this, but this shouldn't be the case. Spaces and non-US-ASCII (at least from ANSI codepage) in path also do not cause issue. Were you using Code::Blocks 16 or something newer? I've noticed lately that latest Code::Blocks comes with 64-bit MinGW (at least it wasn't able to link 32-bit application for me due to some libraries being missing). G.729 seems to be little obsolete (due to RTP, UDP and IP overhead this isn't 8x compression in real life), but just for testing there is compiled DLL at http://tomeko.net/tmp/g729.dll.

Fun fact: G.722 is presented in SDP (and more-or-less consequently in GUI here) as 8000 Hz instead of 16000 Hz sampling codec because of historical error in RFC and compatibility baggage.