2010-06-22

Sky box is happy

Well, having fixed a few bugs, and then spent ages arguing with linux library calls this evening, we have all working well with VoIP.

The sky box was fun - or rather the supura not the sky box was the issue. Simple missing check in my code.

What is interesting is that modems and faxes over SIP are apparently bad. Well, so they say.

But SIP is providing full a-law 8,000 samples per second the same as ISDN. So, well, it should just work. But the world of SIP users and carriers have it drummed in to their head that fax and modems do not work.

Well, now we have our own call sever and no asterisk, we have SIP working better.. My Sky box will go on line and access my sky account... over SIP... woohoo.

All good fun.

31 comments:

  1. What about implementing T.38 on SIP - most UK providers seem to shy away for supporting this for some reason, however when T.38 is implemented, it does work well.

    ReplyDelete
  2. Also meant to include link: http://tools.ietf.org/id/draft-ietf-sipping-realtimefax-01.txt

    ReplyDelete
  3. My point is that if you have clean a-law, then it is the same as ISDN, so why would you even need T.38

    ReplyDelete
  4. Whilst you can probably have the same data rate as an ISDN line, there are other issues to be considered such as jitter, echo, silence suppression, etc. I've tried running fax machines over SIP (a-law) on ADSL, Telewest Internet (before it was Virgin (10Mbps service)) and even over a 10Mbps leased line, and had some success, but also more than a significan number of failures; rather random failures. When we eventually found a provider that did do T.38, all our issues disappeared.
    There's a bit of a write up on another website about give a bit more detail that I can about the pitfalls of FoIP - http://www.soft-switch.org/foip.html

    ReplyDelete
  5. Arrrg - that is my point. Everyone has an excuse but no real explanation.

    If we get a-law to/from the PSTN the same as an ISDN line, then echo/silence suppression are irrelevant - they are the same issues an ISDN line sees. Fax works perfectly on an ISDN line and nobody thinks that is at all odd or difficult. All SIP means is that the stream of a-law bytes happens to have gone over IP from the PSTN/ISDN network to our equipment. Nothing on the way should touch a single bit in that stream. Imagine SIP as a "remote ISDN card".

    That only leaves jitter which is solved with a jitter buffer. A jitter buffer just means adding some latency. Fax works over old satellite linked voice calls with huge latency, so no reason a small amount of extra latency for jitter buffer should be any issue. The timeouts in fax protocols are huge (seconds).

    It really should just work and nobody has ever given me any proper explanation as to why it does not seem to a lot of the time.

    ReplyDelete
  6. Now you've lost me, you seem to be arguing against T.38, then the last line says '....as to why it does not seem to a lot of the time'. If there is a standard (albeit the standard does seem to vary dramatically depending upon who's implemented it) to resolve the 'why it does not seem to (work)', then why not use it?

    ReplyDelete
  7. A-law SIP *should* just work. If it is not, then it is far better to understand and resolve the underlying cause of why it does not work than invent a work-around for one of the common uses that has problems.

    Solving this means everything else will "just work", not just fax and not just cases where T.38 is available and works.

    I am assuming T.38 was invented, not to solve why A-law SIP seems to have issues, but solve the problem of people that don't have the bandwidth to do a-law in the first place. We know fax/modem will not work over voice codecs (for obvious reasons).

    The fact that the sipura and sky box seem to work now suggests the problem we had was down to asterisk. It clearly buggers about with the audio in some way. Our new call server is not only transparent to the audio but actually has to end to end linked from carrier to sipura for RTP. This may have solved the problem.

    I may knock up a fax2email module to work on a-law SIP some time...

    ReplyDelete
  8. Silly question time...

    If Asterisk is messing with the audio (and as long as it's G.711a in and G.711a out, it should just be doing passthrough), then why not take Asterisk out of the loop in the same way that you have done with your new call server?

    We have several customers with fax machines connected to PAP2T boxes quite happily doing FoIP through Asterisk without T.38. But only when the fax machine is locked down to 9600baud - try 14.4 and it fails miserably.

    On the other hand, we have several customers for whom FoIP completely failed to work (even when using T.38). I suspect the fax machine itself, but finding time to prove it......

    ReplyDelete
  9. Well, yes, we have taken * out of the loop - that is the idea of the new call server. So we need to do fax testing now... I am just amazed the sky box is working as that is modem at higher speeds and used to fail something like 9 times out of 10.

    ReplyDelete
  10. In theory, with good enough SIP/TA, you should be able to do V.90, 56K even.

    ReplyDelete
  11. The main problem is that it isn't reliable, especially if a link is fully utilised at any given point during receipt or transmission of a fax. A fixed jitterbuffer is a good way around this, however this has to be supported on both ends, even then if a brief peak in latency is high enough, this will result in the fax failing.

    Whereas a human is quite forgiving to a brief bit of jitter (click sound), the fax machine is not quite so forgiving.

    My source of information is trial and error on my part and:
    http://www.soft-switch.org/foip.html

    ReplyDelete
  12. Jitter on rx you control. Jitter on tx just needs a few 100ms of silence stuffed on the front...

    ReplyDelete
  13. Sky don't want people to realize you can do callbacks over SIP as their multiroom enforcement is totally reliant on the idea that callerid is 100% reliable and tells Sky that the boxes are in the same house.

    So they say Sky boxes don't work over VOIP, wireless phone sockets, etc. if you ask to keep the myth up.

    ReplyDelete
  14. Of course - but some normal BT PSTN lines are using VoIP now, even if only as a trial, and the plan it to make the whole country VoIP back-haul if BT ever get it all sorted.

    In this instance A&A provide an analogue NTE for the phone service and it is connected to that - the fact A&A happen to have a sipura and a fibre carrying IP to back-haul it, is not sky's concern :-)

    ReplyDelete
  15. Hi,
    I have a Sipura 2002 that I'm trying to configure to work with my Skybox. I also use Asterisk. The Skybox simply doesn't recognise that it's connected to a phone line.
    I can easily take Asterisk out of the loop, if that is causing an issue, but is there any chance you could share your settings for the Sipura?

    ReplyDelete
  16. * will not help, I am sure. It is just about possible using * but fails way more often than it works. That wast he main just of the posting.

    The sipura should appear as a phone line. Check you do have a correct cable. RJ11's are sometimes centre pair and sometimes outer pair. It is easy to have the wrong cable.

    The settings I would have to dig out. The sipura does allow the right UK line impedance (google for it). I also turned off pretty much all audio settings (echo cancellation, etc) and set a-law as the only codec available. No DTMF detect, etc. As raw alaw audio as possible.

    ReplyDelete
  17. Thanks for the pointers. That's very useful.

    ReplyDelete
  18. Well, I consider this tremendous luck, but I have just had a successful callback between the Skybox and the Sipura 2002.
    As you suggested, I swapped cables, and the Skybox no longer complained about the missing phone line. Then I set G711a as the only allowable codec on the Sipura, removed all echo settings, set the impedance, etc, and hey presto. I didn't even have to remove asterisk from the chain.
    Thank you once again. If you would like a copy of my Sipura and Asterisk SIP settings for reference, please just email me.

    ReplyDelete
  19. Hello Roger, any chance you can publish your Sipura and SIP settings used to make the callback on the Skybox. I couldn't manage to email you from this page. Thanks, duffer.

    ReplyDelete
  20. Hey Roger, theduff.
    I was wondering if you wouldn't mind sending me the Sipura/Sip settings also?
    Many Thanks!
    Jay

    ReplyDelete
  21. It is in the loft, not even sure which IP it is on or what password I set, so may be tricky.

    ReplyDelete
  22. Hi RevK!
    Many thanks for your reply.
    Is it still working away with your sky box?
    Can I just confirm, your setup is: Sky Digibox>Sipura 2002>Asterisk(FXO Card)>PSTN?

    Many thanks again, if you do manage to get access to your device that'd be much appreciated.
    Jay

    ReplyDelete
  23. Seems to be working fine, hence not had to touch it.
    Sky to sipura and then through to VoIP provider. We have removed the asterisk box now, and we are not using any PSTN or ISDN lines any more!

    ReplyDelete
  24. Nice work, that is very cool indeed.
    Definitely agree, if it aint broke don't touch it!
    Do you have a geographic voip number? i.e. 01/02xxxxxxxxx ?
    Do you have to update this with sky or anything when you changed to voip?
    Do you use a Sipura 2002? I wonder is the SPA-2102 "as compatible"?
    Thanks for your replies.

    ReplyDelete
  25. Sky won't process the call unless it has an 01 or 02 number. We tried :-) We did not have to tell sky - they just want to ensure the boxes in the house all come from the same number. I am not sure exactly which model it is.

    ReplyDelete
  26. Ok cool,I forgot to ask which VOIP provider your using? Is it A&A?
    Many thanks again.

    ReplyDelete
  27. Haha, Just realised!
    2+2 and all that!
    Sorry, stupid me!
    So I take it you support T.38, do you support V.150.1 too?
    cheers.

    ReplyDelete
  28. No, that is the whole point. There is nothing inherently wrong with VoIP that should stop modems and faxes working. Using a-law on it's own should be the same as a normal PSTN or ISDN line as that is what the telephone network uses. As long as latency is consistent by correct use of jitter buffers it is the same as a real phone line...

    ReplyDelete
  29. Hey, So I had great success with a SPA2102 and an AA Voip line both with faxes and modem connections.
    However when I link together an SPA2102 and SPA3102 back to back (testing on a lan) I only manage to send faxes and no modem connections make it through.
    Technically using another SPA3102 as FXO gateway should operate as well as a AA Voip line or do you think i'm asking too much?

    ReplyDelete
  30. SPA2102 + AAISP/VOIP + a-law = perfect every time, even with *cough* Modem type connections, Many Thanks!

    ReplyDelete

Comments are moderated purely to filter out obvious spam, but it means they may not show immediately.

Missing unix/linux/posix file open option

What I would like is a file open option for "create replacement file". The idea is that this makes a new inode in the same mount p...