Author Topic: iphone (SIAX client) and asterisk  (Read 11306 times)

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
iphone (SIAX client) and asterisk
« on: August 27, 2009, 05:00:14 am »
I'm using SIAX on my iphone as an extension in linuxmce and am experiencing a strange situation.

When using the iphone over wifi (connected to internal linuxmce network) I must use 192.168.80.1 as the host name to register. If I use the internet IP address of my core, i get no registration (asterisk CLI shows nada in the way of connection attempts).

When using the iphone on 3G, using the internet IP address of my core works. Since obviously using 192.168.80.1 when connected via 3G won't work, this means I have to switch the server name each time I go on and off wifi.

Any ideas why I can't use the internet IP when inside the linuxmce network?

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #1 on: August 27, 2009, 08:24:26 pm »
hmm possibly because the LMCE firewall is NAT'ing any traffic coming out of the internal network. You could try temporarily turning off the LMCE firewall and seeing if that changes the behaviour (because this will turn off the NATing as well). Is your external IP address of your core still a private address or is your core getting a public address from your ISP? Do ifconfig -a

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #2 on: August 27, 2009, 09:24:32 pm »
Thanks Colin, I'll try this tonight when I'm home. The external IP is a public internet address.

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #3 on: August 28, 2009, 12:01:39 am »
Tried your suggestion of disabling the firewall - doesn't work. Any other ideas?

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #4 on: August 28, 2009, 01:40:08 am »
For a start of, as your core is exposed to the Internet, re-enable the firewall!

I'm not familiar with the IAX protocol so I'm flapping around in the dark!

Can you start by checking what IP address, net mask and default gateway the phone gets whilst it is on the Internal network? Do you have any network tools for the iPhone? (such as ping, traceroute, telnet, arp, etc)

dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #5 on: August 28, 2009, 01:54:04 am »
make sure you have asterisk in verbose mode to see the full output.

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #6 on: August 28, 2009, 04:39:03 am »
IAX uses port 4569 (udp)... that's about all I can tell you about it.

iPhone It's set up to use DHCP (I've tested static settings as well). Here's the info it gives:

IP - 192.168.80.144
Subnet Mask - 255.255.255.0
Router - 192.168.80.1
DNS - 192.168.80.1
Search Domains - (blank)
Client ID - (blank)

As for tools I have on the iphone, I have an SSH terminal app, a tracert and a ping app.

I've been using verbosity = 9 in the asterisk CLI, I hope this is sufficient.

Thanks for the help,

Dave


dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #7 on: August 28, 2009, 04:43:41 am »
pastebin your cli output...

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #8 on: August 28, 2009, 03:53:48 pm »
That's just it... There isn't any CLI output, unless of course I use the settings that work mentioned in the original post at which point it mentions successful registration etc. 

This suggests the packets sent when the phone tries to register aren't even making it to Asterisk. Is there a way to trace the packets through the various stages of routing that occurs within the core, to see where they are getting stopped? I suppose it's possible they're not even leaving the iPhone (if apple's draconian firmware is meddling with things) This is beyond my level of troubleshooting... Appreciate your help.

dlewis

  • Guru
  • ****
  • Posts: 401
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #9 on: August 28, 2009, 04:07:34 pm »
well, there is a bigger issue if the CLI doesn't have any output. At a minimum, it should show some attempt to connect or something.

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #10 on: August 28, 2009, 07:32:34 pm »
Well the issue is NOT specifically with the iphone. I installed an IAX softphone on one of my PCs on the linuxmce internal network, and the same thing happens.
   ie. can connect no problem to 192.168.80.1, but not to <MY INET IP>.

Here is a 30s log of IAX traffic when the client attempts (and succeeds) to register using 192.168.80.1, on both eth0 and eth1 interfaces:

http://pastebin.com/m2efb08bf

Here is a 30s log of IAX traffic when the client attempts (and fails) to register using <MY INET IP>, on both eth0 and eth1 interfaces:

http://pastebin.com/m7dbfc87f

I have no idea what 24.114.232.35 is. It's not my IP, nor does it belong to my VOIP provider (iax04.unlimitel.ca)


colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #11 on: August 28, 2009, 10:58:39 pm »
Well the issue is NOT specifically with the iphone. I installed an IAX softphone on one of my PCs on the linuxmce internal network, and the same thing happens.
   ie. can connect no problem to 192.168.80.1, but not to <MY INET IP>.

Here is a 30s log of IAX traffic when the client attempts (and succeeds) to register using 192.168.80.1, on both eth0 and eth1 interfaces:

http://pastebin.com/m2efb08bf

Here is a 30s log of IAX traffic when the client attempts (and fails) to register using <MY INET IP>, on both eth0 and eth1 interfaces:

http://pastebin.com/m7dbfc87f

I have no idea what 24.114.232.35 is. It's not my IP, nor does it belong to my VOIP provider (iax04.unlimitel.ca)



hmmm... strange.... the 24.114.232.x addresses are Rogers Cable ... are you perhaps using Rogers for your iPhone telco? If so, then it looks like your phone is still attempting to connect externally at that point as well as internally.... realistically the only traffic on that interface you should see (when connecting internally) is your VSP, and probably only SIP traffic even then. Theres a stray 209.217.98.134 address to which is Magma Communications (part of Primus Canada).....

The second capture looks much the same.... still seeing traffic on both sides when really you shouldn't.... stronly suspect that the 24.114.232.x addresses are your iPhone's IP address through your telco..

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #12 on: August 29, 2009, 03:38:50 pm »
Quote
hmmm... strange.... the 24.114.232.x addresses are Rogers Cable ... are you perhaps using Rogers for your iPhone telco? If so, then it looks like your phone is still attempting to connect externally at that point as well as internally.... realistically the only traffic on that interface you should see (when connecting internally) is your VSP, and probably only SIP traffic even then. Theres a stray 209.217.98.134 address to which is Magma Communications (part of Primus Canada).....

The second capture looks much the same.... still seeing traffic on both sides when really you shouldn't.... stronly suspect that the 24.114.232.x addresses are your iPhone's IP address through

Rogers is my ISP, but the test below was done with a softphone client installed on a windows PC inside the lmce internal network, not the iPhone. The iPhone was off. It's all very puzzling  ???


colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #13 on: August 29, 2009, 03:47:34 pm »
Don't suppose your VSP is using IAX to connect to your core is it?

davegravy

  • Addicted
  • *
  • Posts: 551
    • View Profile
Re: iphone (SIAX client) and asterisk
« Reply #14 on: August 29, 2009, 03:58:13 pm »
By VSP I assume you mean Voip Service Provider. My VSP is iax04.unlimitel.ca (209.217.98.134) and is most definitely connecting to my core via IAX. Why Rogers and Magma Communications IPs are involved is beyond me.