olivluca / danube-voip

This is a sip client using the 2 FXS ports available on routers based on the Infineon Danube and running openwrt.
16 stars 10 forks source link

svd process shuts down after ~20 minutes for no appearent reason #7

Closed ontheronix closed 4 years ago

ontheronix commented 8 years ago

Great work olivluca! :) I have it running on an Arcadyan ARV752DPW22 with Barrier Breaker. There is one problem: the svd process shuts down after a while. Running svd again works, but than after some time, the process is gone again. After the process stopped, I get 'Collecting data...' at Voip/Status in Luci, and ps confirms the process doesn't run anymore.

Do you have a clue why this could be happening?

olivluca commented 8 years ago

No, I've the same problem (not 20 minutes, it could be days) but I have no clue regarding the cause.

Python1320 commented 8 years ago

What does running logread in console say?

For me on ARV7510PW svd works for way more than 20 minutes too, except it may break when sending caller info and give a high pitch never ending beeeeep in the call. Does your thing break without calls? Could be a memory leak.

For me when the beep happens, restarting svd corrupts kernel memory and crashes the router. If I change the caller info sending method it still breaks, but I don't hear bad beeps and can continue using the phone :) This is a different bug though, but could be related.

olivluca commented 8 years ago

@Python1320 yes, that's a different bug, but AFAIK[*] it's in the driver, hence restarting svd crashes the router.

[*] I think I send the caller id to the driver in the correct way, according to the (scarce) documentation.

ontheronix commented 8 years ago

The logs don't say anything about it. The process is just gone.. suddenly. At the moment I'm trying Asterisk instead of this package, it should be possible to use the FXS ports, but again the information is scarce.

Some to start: http://foro.seguridadwireless.net/openwrt/voip-en-routers-de-yacom-arv4518-y-arv7518/ http://openwrt-devel.openwrt.narkive.com/W3HeNMbR/lantiq-voip-foo https://www.mail-archive.com/openwrt-devel@lists.openwrt.org/msg27374.html

I'll post back results tomorrow.

Styne13 commented 8 years ago

Hi, i have the same problem here using ARV752DPW22, too.

Have you proceed any further?

I wrote a script assigned to the wps button to restart svd via "exec /etc/init.d/svd restart".

My idea for a work around would be a cron-watchdog using svd_if to get the status and to restart svd if needed but using "echo 'get_regs[]' /usr/bin/svd_if" only gives me the command back.

I think i misunderstood the syntax...

Do you have any ideas?

olivluca commented 8 years ago

You should separate them with |, i.e. "echo 'get_regs[]' | /usr/bin/svd_if" but if you just want to see if svd is running ps is enough.

ontheronix commented 8 years ago

Styne13, I gave up on it since this bug makes it unusable for me. I'm running Asterisk 1.8 on Openwrt 15.05 at the moment. It works quite ok. Ask along if you need help installing or running it.

Styne13 commented 8 years ago

Thank you Luca for your quick reply! Finally i figured out the way with ps you've mentioned. That did the job :)

I will test svd in longer calls and see if it is usable for me.

@ontheronix : I will compile another version of openwrt and also give asterisk a try on my second router. What packages have you included/installed along with asterisk to get it working on our box?

olivluca commented 8 years ago

If your router is behind a nat (or have an otherwise fixed ip address), I suggest to set the option "local ip address" in the main tab. I found that the network change detection code in sofia-sip isn't very reliable and it may cause the crashes you're seeing.

ontheronix commented 8 years ago

@Styne13 These are the one's:

asterisk18 1.8.32.3-2 asterisk18-chan-lantiq 1.8.32.3-2 asterisk18-chan-local 1.8.32.3-2 asterisk18-codec-a-mu 1.8.32.3-2 asterisk18-codec-alaw 1.8.32.3-2 asterisk18-codec-g729 1.3-1 asterisk18-res-crypto 1.8.32.3-2 asterisk18-res-musiconhold 1.8.32.3-2 asterisk18-res-timing-timerfd 1.8.32.3-2 asterisk18-sounds 1.8.32.3-2

Some more info to get you started: http://openwrt-devel.openwrt.narkive.com/W3HeNMbR/lantiq-voip-foo

octomike commented 8 years ago

I am also using this package on my router. Your hint regarding the network change detection is interesting @olivluca .

Couldn't we just drop a file /etc/hotplug.d/iface/60-svd with

#!/bin/sh

if [ "$ACTION" == "ifup" ]; then
    /etc/init.d/svd restart
fi

to work around this? I always thought it was some kind of memory leak but since my IP changes every 24h this makes much more sense.

ontheronix commented 8 years ago

@Styne13: I updated my previous post with all the packages. There's one thing: I only have choppy sound with outwards calls (ordinary sip trunk, tried different providers.. :/ ). Did you manage to get it working?

Styne13 commented 8 years ago

@ontheronix: Sorry for my late reply!

Thank you for the list of packages.

Now i had the time to try openwork with asterisk again. My problem is i can't get SIP trunk working as a client on my Fritzbox. My usecase is to have a remote phone, even at another location.(Maybe with ARV752DPW22 as a wifi client.)

Do i have to assign the SIP-Account to a connector of the box?

ontheronix commented 8 years ago

@Styne13 Can you tell me something more on how everything is connected? Why are you using a Fritzbox behind the Arcadyan when you can plug your phone directly into the Arcadyan? I recently tried asterisk13 to resolve a stuttering issue I have (choppy sound when I call outward or receive a call from outside) but it seems the 'chan-lantiq' is not longer implemented here :(