traud / asterisk-codec2

Asterisk 13 transcoding module: Codec 2
1 stars 3 forks source link

Support for the Channel Driver IAX2 #1

Open evgenyh opened 7 years ago

evgenyh commented 7 years ago

Hi there, compiled and patched according to the info provided at first page and got codec2 recognized by asterisk. it also shows correctly in core show translation recalc 10 image

but when I try to use it for calling in iax2 trunk it saying "chan_iax2.c:5858 ast_iax2_new: No formats specified for call to"

asterisk 13.13 centos7

thanks

P.S> further checks shows that patches not fully compatible with asterisk 13.13

evgenyh commented 7 years ago

[root@centos-clean asterisk-13.13.1]# patch --dry-run -p0 <./codec2.patch checking file include/asterisk/format_cache.h Hunk #1 succeeded at 234 (offset 8 lines). checking file main/codec_builtin.c Hunk #1 succeeded at 855 (offset 81 lines). Hunk #2 succeeded at 911 (offset 81 lines). checking file main/format_cache.c Hunk #2 succeeded at 307 (offset 8 lines). Hunk #3 succeeded at 369 (offset 12 lines). checking file main/rtp_engine.c Hunk #1 succeeded at 2264 (offset 63 lines). Hunk #2 succeeded at 2309 (offset 63 lines).

evgenyh commented 7 years ago

this additional patch solves the rest of issues to make codec2 recognized by chan_iax2 compatibility.patch.txt

traud commented 7 years ago

patches not fully compatible with asterisk 13.13

Please, explain in more detail – or do you just mean the offsets?

additional patch makes codec2 recognized by chan_iax2

I have no experience about the channel driver IAX2 because have not used it, yet. Here, this transcoding module was tested with chan_sip and res_pjsip only. Codec 2 is part of the upcoming Asterisk 15. Therefore, please, let us continue there…

evgenyh commented 7 years ago

Please, explain in more detail – or do you just mean the

offsets?

correct. I can send a working patches

traud commented 7 years ago

In my projects messages about offsets are considered not as warning or error but as notice. This is because my transcoding modules support several branches of Asterisk, like 13, 13-cert, and 14. An offset is therefore expected. Furthermore, some users are subscribed here and I do not want to bother them with cosmetic updates. Finally, not updating the Read Me and the patches for every new Asterisk releases, saves me time. Therefore, the patches are considered fully working and compatible with the current release.

If patch warns about fuzz, this is different, because some tools thread such a warning as error. In that case, creating an issue report and/or updating the patches is welcome. Furthermore, when you face any functional issues, like not working at all or patching at the wrong position, please, say so.

evgenyh commented 7 years ago

got it. thanks

traud commented 7 years ago

OK, because I am closing that other issue, I am re-posting the current patch here as well: codec2_for_iax2.patch. If somebody else is interested in IAX2, he can go for that. On behalf of those: Thanks for your issue report, debugging, and code contribution!

Before a Pull request can be created here in this project, that change must be submitted to the current Asterisk master branch first, because Codec 2 is supported there for the other two channels chan_sip and res_pjsip already. We got an answer on the mailing list and the usual way of submitting of patches is sufficient: Gerrit. Are you familiar with Jira, Git, and Gerrit – Asterisk calls this the ‘entire patch process’?

Two approaches exist: You go for it or I do it on behalf of you. What do you prefer?

When you submit it yourself, you learn a lot of open-source participation and your Git account is linked/mentioned as Asterisk contributor. Furthermore, you have the motivation, to get this going – and not to patch Asterisk with every new release. Of course, the drawback is the amount of time spent. Furthermore, some puzzle pieces needed cannot be re-used in other projects – essentially, you loose time.

evgenyh commented 7 years ago

this time pls do it on behalf of me :) thanks!

traud commented 6 years ago

My resources are limited and I had no time to go for this, yet. Instead of waiting for me:

Nowadays, SILK and Codec 2 are part of Asterisk 15. Because of that and because you are about a feature request, please, continue in this Asterisk Wiki article…

lachesis commented 1 year ago

Do I understand correctly that I should be able to use Codec 2 in Asterisk 15 or later without patches? What is necessary to do so? I cannot find any documentation on Asterisk about Codec 2 at all.

evgenyh commented 1 year ago

Oh, all this was done for asterisk 13 and since then many years passed so I can't really answer your question, but patches attached in this thread worked for asterisk 13 iax2 driver. Best Regards

traud commented 1 year ago

I should be able to use Codec 2 in Asterisk 15 or later without patches?

Depends on the channel driver you are using. Many people used the driver chan_sip for SIP. Nowadays, for SIP, you use res_pjsip via chan_pjsip. However, this thread is about the driver for IAX2. In that case, today, with Asterisk 20, you need still the patch codec2_for_iax2.patch. However, just that patch, nothing else, nothing from this project (as that was just required in Asterisk 13).

What is necessary to [use Codec 2 in Asterisk]?

Which version of Asterisk and which channel driver do you use?