Asterisk SIP One way Audio

ok, I know what your all thinking just from the title alone.
It’s SIP and One way Audio, it’s going to be a NAT and firewall issue. That was my immediate thought too, but it’s wrong.
To explain a little of the background will probably help.

I’ve been running Asterisk at home now for years, using a Digium 422. One line coming in, and a few Linksys SIP phones.
I’ve been happy with it running away for some time, adding in blacklist functions into the dial plan of incoming calls, blocking withheld numbers into entering their number and building up a list of numbers that are annoying me to reject. I’ve had a few people questioning when they’ve called about it. and even more from visitors whose witnessed the Tivo auto pausing if a call comes in as well as displaying who it is.

So after years of me singing it’s praises (as well as a linux server in general), it’s no-wonder that someone else wanted me to do a similar setup. Enter cousin 🙂

After weeks of searching on ebay, finally someone is selling a digium card. So bought it up quickly.

He’s had a Linux server running for a good few months, and I’ve got it all VPN’d together with my network.
So I installed the Digium card, installed asterisk, and went about configuring it using my config as the basis.
It all worked well, incoming and outgoing calls all fine using the card 2 phones connected and one line.
But obviously, now you’ve got a little you want more. So off he went looking at phones, I have to be fair he found a great deal of linksys phones, 4 of them with power for £40 when most are selling single units at over £20.

So I spend another few hours running network cables to 4 different locations in the house, connect up the phones and go back to configuring asterisk and the phones. Fairly straight forward, run through testing phone to phone etc, all appeared fine.

The following day I had a lovely call saying that their now getting one way audio. Straight away I thought that’s NAT, but as all the phones and asterisk box are on the inside NAT shouldn’t come into it. Still I went back through the SIP config and adjusted lots of it to completely wipe out NAT (I use NAT in my config as I have some connections from SIP providers etc).
More testing, but still the same.
So I started running SIP and RTP traces, I’ve had to read through them bother before and can just about follow what’s going on, but I mainly just look for anything obvious out of place, like IP addresses that are external etc.
Still after going through them, it all looked good in the SIP debug, but the RTP was only showing one side audio on calls that were going in / out over the Line. Calls to other phones were fine.
So I registered one of the phones onto my system and placed a call, that worked fine.
So I come home and registered one of my phones to his system. Placed the call, and again one way audio.

I’m not convinced it’s a NAT problem as my phone would now be running over the VPN to his server and it’s the same server that terminates the VPN. I now started checking out the codecs, but testing using different ones just pointed to it not being codecs. If it couldn’t find common ground the call failed from the start.

It took a few days to get back to as I was onto other stuff, but check after check just showed that everything was fine. But still the one way audio on calls.

I looked again and there was a new version of asterisk released 10.1.3, where I was using 10.1.2 on his server. The 2 fixes in the change were around SIP. So I downloaded the new version, compiled it and installed. Made sure it was all running and then got home to make some test calls.

Still one way audio. So I’m now left with one option. My own server is running an older version of asterisk, I uninstalled his asterisk completely and then downloaded the source for, compiled and then installed.
Using the same config from the 10.1.3 install threw a few warnings on loading, but it still loaded. Got him to make a test call, he called my mobile and hey presto we can hear each other.

I wanted to update my own asterisk, but after encountering this issue and especially as it’s still present in the latest I think I’ll leave updating my system for a while.

Bottom line, dont just consider One way Audio a NAT problem, and if everything looks to be working correct consider downgrading if there’s no upgrade available.

Raspberry PI

After waiting all of Feb for news of when the Raspberry PI was going to be released, We finally got told that an announcement would be made at 6am on Wednesday 29th.
As I was still awake at 3am, I thought no point in setting the alarm I’ll just stay awake. Hoping that this would indeed be the launch day.
(As it was very early in the morning and I’ve definitely slept since the following times are approx.)
Sometime after 5am was replaced with a down for maintenance page.
Then about 5:45am, seemed to disappear off the net, then come back with a nice server error. but this only lasted a few mins.
As the time got closer to 6am, I could feel the pain of the PI’s servers. As I had at least 10 mins to go, I wasn’t hitting refresh 60 times per min (I’m sure enough people were). Every now and again the server wouldn’t respond, so I’d gave it 30 secs and try again.

All of a sudden (I’d say at about 5:58am), the page loaded up and was completely different. This is it the announcement we’re all waiting for.
As I scanned through quickly, I noticed them saying about licensing 2 resellers I kept looking quickly for the ‘where to buy’, then I got it 2 links. So I quickly right clicked on each and opened in a new tab.

Both loaded fairly quickly. Once into the Farnell site I searched raspberry, as the results come back it said 2 products but didn’t show them. So I click on the words products and it reloaded and displayed. Clicking the add to cart option threw up a nice little dialogue under the cart saying adding, then that was replaced with an ‘unable to find price in database. Item not added to cart’ error.
SHIT!! was the exact thought, never mind try the 2nd obviously farnell has an issue.
As I got to the RS site again there wasn’t anything on the homepage like I’d expect for a pretty big launch. So again type raspberry into the search and hit enter. It comes straight back with a specific RaspberryPI page. I scrolled quickly down looking for the add to cart button or buy button, but nothing only a form to fill out with my details to register my interest.
‘Surely that’s not right, I’m on the wrong page.’ I thought. Again type raspberry into the search box and back I come to the same page. Bugger it, as least I found it on the farnell site so I went back to that tab. reloaded the page and searched again, expanded the products and clicked the add to cart button. Again I got the nice error!! I’m seriously not impressed now, I’ve hit both sites very early on but not getting me any closer to having a nice order number.
Back I went to the RS site and thought well I’ll fill in the details and maybe it’ll direct me then to another page. Filled them all in and submit. Great but still no page where I can order it. So decided to go back to the start page for RS and look at the categories incase it’s not coming up on a search. It was at this point that the RS site started to load slowly for me. So back I jump to farnell, and refreshed back to the homepage.
Now the fun begins, Farnell just completely stopped loading anything for me. give it a couple of secs and refresh, oh I’m pushed to a page telling me their site is overloaded but I can phone an order through.
Great stick the number into my mobile and press dial. Nope it didn’t dial, instead I’m being sent to a page. Thinking to myself wtf, as the page sprung up with a list of alternative numbers, I quickly realised I installed No to 08 app ages ago (I dont ring 08 numbers very often and forgot I did it). Never mind though it’s given me an alternative so clicked it and dial commences. Ring-Ring, and I’m answered. Oh NO it’s an IVR happily telling me their lines open at 8am but I can place and order or enquiry at their website. Not F###ing likely I thought while hanging up.
Refreshed Farnell, dead. back I go to RS. It’s loading but the search is still giving me the same register my interest page.

All this has taken place within about 5-10 mins.

So thinking quite calmly, ‘Maybe they haven’t released yet, I should really read through the raspberry announcement page’. So back to that tab and scrolled to the top. This time paying attention, I take in all the info and yep they are on sale from today.
Back to Farnell tab and refresh = nothing.
Over to the RS tab and refresh = oooohh it’s slow, and now it’s gone.
After about 5-10 mins of jumping back and forth between tabs, and I have to admit I’d also opened additional tabs since I’d been refreshing the Product Search on Farnell, I’d opened a new one for their front page. and similar on the RS.
As I’m getting nowhere fast, I went back to the RPI page. Then noticed they’re twitter link. So I opened this (in a new tab).
oh there’s lots of people shouting on here that they can’t get anywhere. All of a sudden I noticed a posting from Liz saying if your getting the register your info page on RS your on the wrong page.
‘F#ck It!!’ I thought, back to the RS tabs and refresh, luckily the one did load and did another search still it took me back to the register interest page. Another search gave no results.
Back to Twitter I go, in the 20 or so seconds I’d been away twitter was very happy to tell me 80+ new posts.
Now I have to admit, I’ve gone through product launches from a tech side and it’s always worse than what the marketing people tell ya. I knew that the R-PI was going to be big and that the first 10,000 was going to sell out fast. I’d only judged that on the number of downloads that the (pre) software image had a few weeks back and the number of people talking in the forums. Having never looked at the number of followers the R-PI had on twitter, I didn’t expect the overwhelming chatter I now threw myself into.
I’m not a big fan of twitter personally, it just doesn’t appeal or click with me. But at 6:30 in the morning I have to say I was enjoying managing to read 2/3 comments before it was popping up another 10+ new comments, clicking that reading a few and repeating.
While doing this jumping to other tabs and trying to refresh, unlike early though where the pages did load but slowly, I was now hit with no response across all the Farnell & RS refreshes.

After another 20 mins of reading tweets and trying to refresh pages, I had a call from my cousin did I want to go for coffee and he’s now on the way home.
‘Yep, fine’, not getting anywhere with this now. 2 sites down, lots of angry tweets, and my hopes of getting a R-PI early was pretty much wiped out.

After an eventful trip to the coffee place, which consisted of the coffee girl in tears because a boss she doesn’t like is coming back to the store and she now has to transfer stores.
We’re back in the car, oh the times 7:59am. Well their lines open at 8am, I doubt very much that they’ll have any left now, but don’t ask don’t get so I pressed redial on my phone. It rang and rang then an announcement ‘higher call volumes than expect, please hold’, at least their open. Then I get a nice double beep off my phone 8% battery remaining.

Now I’ve been in much worse positions with little battery life, but the timing just sucks. never mind I’ll keep on the line until the battery is dead. Now I have to say a big thumbs up to HTC, every other phone I’ve had has pretty much died within seconds of telling me it’s low when on a call, but this one managed a 10 min journey home while still on the call (in a queue I should add), and my 5 mins fumbling around single handed trying to find my keys, while not dropping either my phone or tablet.
Alas after 15 mins of holding, I decided there’s little point in holding, if they had any left at 8am, 15 mins worth of calls would definitely wiped them out. So I hung up.
Went back to my laptop and refreshed. Both pages still out, so back to twitter I go.

Plenty more chatter to catch up on, but still there’s one hell of a constant flow of new stuff coming through.
All of a sudden a refresh of Farnell kicked in. It was my search one, so I quickly clicked add to cart. oh it’s added!!!!!
Checkout!! – it’s only gone straight through and given me the checkout.
So in I filled the address info, and proceed. it’s trying to load an invoice page but nope timed out. I can see in the addressbar I have a session ID, so maybe just maybe it will remember me if I refresh and it wont kick me back to the start.
5 refreshes later and I have an invoice page loaded. Quickly filled in my details and onto the next page.
All in all it took me about 5 mins to get all the way through and a hell of a lot of refreshes along the process. but finally it’s complete my order.

I received an email confirmed my new account, a few hours later I had some mails confirming my order and giving an estimated delivery of end of march (I’d be quite happy with that I thought).

Today I received another confirmation of my order, but now pushing estimated delivery back to the end of April. I’m kind of expecting that to get further back as time progresses, but we’ll see what happens.

This evening I received a mail from RS confirming my interest and saying they will be mailing out to take orders later in the week. They also put that the orders will be sent out in a first come first served.
Now I’m not entirely sure if they mean the register your interest order, or a new order starting with another gold rush when they mail people saying you can buy them from them.
If it’s the former, I’m hopeful that my submission for interest was early enough to be amongst the first while everyone else was still looking to buy it. It was after all done while they’re site was quite alive.

Time will tell. I’m still really excited with all this, and think that the enormous following it’s gathered has to be a good thing. I’ve got so many little projects that I want to do with it, if I could get a few by the summer-time it would definitely keep me busy all summer.