2

Here is an interesting one, I have a SIP VoIP application which is able to register to the PBX server, and I can invite and see the user call on the callee end receiving an Invite, and on the caller end I see the Ringing response... now here is interesting part, if I close my application with out any notification to the server my router disconnects and restart, after a short while (30 - 150 sec). I could fix that if I would complete the ACK BYE process, but I'm just wondering why does my router hangs up?

any ideas?

My Router is TNN-Siemens SL2-141, thought this might matter

Update: this is what I found:

SIP ALG allows two or more simultaneous VoIP phone calls made by VoIP clients through this router.

which means that if I disable it I would not be able to do the testing I'm trying so badly to do, and since I don't have access to another router, I must handle it with the bug then...

I can say that this never happened to me with one user connecting, but then again I didn't have anyone to invite then, I received from the SIP UAS 503 when I tried to invite an imaginary user. This bug only occur after I connected the second SIP UAC and invited it and closed the application.

Adam.

TacB0sS
  • 83
  • 1
  • 6

1 Answers1

4

The only thing I can think of is if your router has a SIP ALG and is crashing because of some bug in it when it doesn't get the ACK. If your router does have a SIP ALG you should try and find a way to turn it off. It's generally accepted now that SIP ALG's are bad news and cause far more problems than they ever solve.

Update: If you're writing your own SIP application and you're behind an ALG then you will have a hard time tracking down issues as you won't ever be sure that the SIP packet you're sending is the one that's being received. Try turning off your SIP ALG and making sure the SIP devices on the iside of your network use a different port, i.e. set them up so they aren't using port 5060 as their local port. That way the router shouldn't have to get involved in any specific behaviour in order to allow the SIP traffic to work for multiple devices.

sipsorcery
  • 218
  • 1
  • 7
  • Badly-written SIP ALGs might be bad news, but the concept is sound. But I suspect you might well be right in your diagnosis here. – Frank Shearar Jun 06 '10 at 08:18
  • 1
    The general consensus on the SIP implementor's list (https://lists.cs.columbia.edu/pipermail/sip-implementors/) that I have observed and also agree with is the SIP ALGs are bad news and should be completely phased out. –  Jun 06 '10 at 09:26
  • thank you both for your responses, I think this would fix the problem but will prevent me from performing the testings I need. BTW this error didn't happened with one UAC connecting to the server, so the ALG does work when it comes to a single SIP UAC. –  Jun 06 '10 at 09:55
  • sipwiz, I've followed sip-implementors for years. (Had to, being a SIP implementor.) Complaining about ALGs is much like complaining about NATs - they're still there. But perhaps Iñaki Baz Castillo's detector might help in debugging: http://dev.sipdoc.net/wiki/sip-stuff/SIP-ALG-Detector – Frank Shearar Jun 06 '10 at 13:39
  • each use a different port and not 5060. also different ports for audio and video. –  Jun 06 '10 at 14:46
  • 1
    @Frank I take your point, no point moaning :). However the difference between NATs and ALGs is you can often turn the ALG off. As far as implementing SIP goes with NATs you know the limits of their behaviour, IP and port transaltion. With ALGs you don't, they could go screwing with every SIP header in your messages. As Iñaki himself recently said in a post "ALG's just must dissapear ASAP". –  Jun 06 '10 at 22:37
  • @TacB0sS I've used up my arsenal of ideas then. If I was you I'd definitely be trying a different router. For the sake of $50 or so dollars you could be saving yourself a lot of time and effort. –  Jun 06 '10 at 22:38
  • Sorry I didn't post here earlier Wiz, but you were on the spot my friend, ON THE SPOT. turned it off and all is good :) like a charm... many thanks my friends, I could have not finished this without you. I'm down to the final negotiation and hopefully that's it for the client for now. Thanks again. –  Jun 07 '10 at 10:36