Lantiq - minimal POTS setup

@Ntalton I could only manage to place a call from outside the network, which rang the fxs-connected phone. When picking it up, the call terminated. Calls couldn't get outside.

The router is behind another router's NAT, past attempts at this with android didn't require me to open any ports to the device. SVD can work differently I guess, mind sharing details on your setup?

I'm currently unable to register to my ISP network reliably because the registrar server is overloaded and taking ungodly amounts of time to respond to requests with 80% packet loss, and svd timeouts. I managed to do it once though (got lucky somehow) and could test the thing above.

Since you are behind nat, you could try adding the local_ip option on your config main, for example:

config main
option log_level '3'
option rtp_port_first '6000'
option rtp_port_last '6100'
option sip_tos '0x10'
option rtp_tos '0x10'
option local_ip '192.168.1.254'

Where 192.168.1.254, you replace with the static ip of your local wan interface. Sometimes sofia-sip can't get the network configuration correct, especially if you have many interfaces.
Other than that, I say check your configuration again, and look what kind of errors you get on syslog from svd.
My landline is still on PSTN so I use my devices with betamax sip providers like megavoip, hotvoip and such. Outgoing calls from them work fine, but I cannot test incoming calls since they don't provide a telephone number.

Hello,
since it was a slow week, I had time to add some patches for sofia-sip from freeswitch. Cannot properly test at the moment.
If you want to try, I have created a testing branch on git.
Thanks

I managed to make it work, adding the local ip did the trick. The registrar server finally responded in time for the client not to timeout.

Thanks a lot!

I will be trying the new patched build when I get the time again - making this thing work was very, very (months) overdue.

Hi, I just wanted to report that the binaries provided by Ntalton also work on an ARV7518PW router (as expected).

I just installed them in the right order, as some of them require the others, and some also required to download some kmods from LEDE repo.

Is it posible to configure a dial plan in a similar way as other ATA adapters?

Take a look at the instructions file, there is a config dialpan section to explain its function.
Also, a word on the luci application for svd. It is missing some configuration options when used with the default bootstrap theme on luci. For full functionality you can use the old openwrt theme.

Hi folks,

I'd like to hook up with this discussion and thank you for your informations so far. Can I use the binaries provided by Ntalton on Github with my router? I get the following error in the system log:

Sun Feb 25 20:12:11 2018 local5.info svd[1135]: starting
Sun Feb 25 20:12:11 2018 local5.info svd[1135]: main(): ERROR -  binary file /lib/firmware/danube_firmware.bin open failed!
Sun Feb 25 20:12:11 2018 local5.notice svd[1135]: terminated

I have the same intention as the thread opener: I'd like to use an Arcadyan VGV7510KW22 (o2 Box 6431) running LEDE 17.01.04 as a full replacement of a Fritzbox (7430), i.e. Router, WIFI Access Point, DSL Modem and telephony port (POTS/FXS). I managed to install LEDE 17.01.04 via LAN, replaced the shipped DSL firmware with a Fritzbox 7490 version featuring vectoring support. So far so great! However, I didn't succeed in using an analogue telephone on the POTS/FXS ports.

I installed the binaries sofia-sip, its luci-plugin, svd, and libab from Ntalton's github repo in the correct order. The kernel modules kmod-ltq-ifxos kmod-ltq-tapi and kmod-ltq-vmmc were already present in my system. Following Ntalton's recommendation I replace the bootstrap LuCi Theme with luci-theme-openwrt. I added my SIP account under VOIP>ACCOUNT and saved. No beep, no LED flashing: I find the following in my system log:

Sun Feb 25 20:12:11 2018 local5.info svd[1135]: starting
Sun Feb 25 20:12:11 2018 local5.info svd[1135]: main(): ERROR -  binary file /lib/firmware/danube_firmware.bin open failed!
Sun Feb 25 20:12:11 2018 local5.notice svd[1135]: terminated

and later:

Sun Feb 25 20:14:29 2018 daemon.err uhttpd[1026]: svd_if : Unable to generate temporary file /var/svd/svd_if.XXXXXX (No such file or directory)
Sun Feb 25 20:14:29 2018 daemon.err uhttpd[1026]: 
Sun Feb 25 20:14:29 2018 daemon.err uhttpd[1026]: svd_if : Unable to generate temporary file /var/svd/svd_if.XXXXXX (No such file or directory)
Sun Feb 25 20:14:29 2018 daemon.err uhttpd[1026]: 

Actually, I don't have "danube_firmware.bin" im my /lib/firmware/ dir. I have

root@LEDE:/lib/firmware# ls
ifx_bbd_fxs.bin
ifx_firmware.bin
lantiq-vrx200-a-to-b.bspatch
lantiq-vrx200-a.bin
rt2860.bin
rt3290.bin
voice_ar9_firmware.bin
vr9_bbd.bin
vr9_bbd_fxs.bin
xcpe_581816_580B11.LICENSE
xcpe_581816_580B11.bin
xcpe_581816_580B11_to_579906_574402.bspatch

Where Do I get "danube_firmware.bin"? Or is it wrong to use the binaries from Ntalton for my device, since it was intended for another target? Do I have to compile the packages myself for my target?

Any hints are highly appreciated.

Best
So Di

Hello!
I am afraid danube-voip was really designed for devices with different (older) soc's than the one found in the VGV7510KW22, so I am afraid it probably won't work.
One thing you could try maybe, would be to do

ln -s /lib/firmware/voice_ar9_firmware.bin /lib/firmware/danube_firmware.bin

And then start svd with -d9, to see what fails.

Hi Ntalton,

Thank you for your immediate reply. Sad to hear, that your repo and sofia-sip are exclusively designed for the danube target. However:

root@LEDE:~# ln -s /lib/firmware/voice_ar9_firmware.bin /lib/firmware/danube_fir
mware.bin
root@LEDE:~# svd -d9
root@LEDE:~# main(): ERROR - Voice Coefficients Download failed!

The log upon reboot states the same:

Sun Feb 25 20:12:11 2018 local5.info svd[1133]: starting
Sun Feb 25 20:12:13 2018 local5.info svd[1133]: main(): ERROR - Voice Coefficients Download failed!
Sun Feb 25 20:12:13 2018 local5.notice svd[1133]: terminated

It's libab that's not working with ar9 targets. Maybe it could be patched to work with them, but considering that
a) Sofia-sip is basically abandoned and umantained
b) Svd has some bugs and missing features (e.g. ssl)
I think any efforts should be more concentrated on staring a new project with the same philosophy, from scratch, using a new library like pjsip and working with (hopefully) all lantiq targets with analog telephony capabilities. That's my goal going forward.
For now you should look into asterisk and chan_lantiq.

2 Likes

Hi Ntalton,

Thank you for your effort. I went down the asterisk road with chan_lantiq and everything's working fine now.

Best

So Di

Make that 6 now :wink:
It works for me and I didn't get any pull request, that's why I didn't maintain it.