Author Topic: Kppi (sip Phone) Audio Fixed! - Cacko 1.23  (Read 3978 times)

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« on: March 03, 2006, 06:27:27 pm »
OS: cacko 1.23 full
kphone/kppi: 1.0.0 - from the cacko 1.23 feed.

I've got siproxd running on my linux firewall/nat box, and the Zaurus kppi application registers OK with fwd.pulver.com:5060 via it. This avoids all sorts of NAT problems.

When I make a call, e.g. to the echo test or speaking clock, and snoop for packets, I see the RTP packets get streamed to the Z, but the Z's audio is silent.

When I make the call, I hear a click in the headphones, but that's all.

I have tried both audio modes, mixed R/W and separate R/W, no luck.

I can test /dev/dsp by cat'ting a .wav file into it and it works!

Anyone got any ideas?
« Last Edit: March 04, 2006, 03:18:02 pm by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

Meanie

  • Hero Member
  • *****
  • Posts: 2803
    • View Profile
    • http://www.users.on.net/~hluc/myZaurus/
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #1 on: March 04, 2006, 12:48:36 am »
Quote
OS: cacko 1.23 full
kphone/kppi: 1.0.0 - from the cacko 1.23 feed.

I've got siproxd running on my linux firewall/nat box, and the Zaurus kppi application registers OK with fwd.pulver.com:5060 via it. This avoids all sorts of NAT problems.

When I make a call, e.g. to the echo test or speaking clock, and snoop for packets, I see the RTP packets get streamed to the Z, but the Z's audio is silent.

When I make the call, I hear a click in the headphones, but that's all.

I have tried both audio modes, mixed R/W and separate R/W, no luck.

I can test /dev/dsp by cat'ting a .wav file into it and it works!

Anyone got any ideas?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=116896\"][{POST_SNAPBACK}][/a][/div]

try linking /dev/dsp to /dev/dsp1
some apps use dsp1 instead of dsp
SL-C3000 - pdaXii13 build5.4.9 (based on pdaXrom beta3) / SL-C3100 - Sharp ROM 1.02 JP (heavily customised)
Netgear MA701 CF, SanDisk ConnectPlus CF, Socket Bluetooth CF, 4GB Kingston CF,  4GB pqi SD, 4GB ChoiceOnly SD, 2GB SanDisk SD USB Plus, 1GB SanDisk USB Plus, 1GB Transcend SD, 2GB SanDisk MicroSD with SD adaptor, Piel Frama Leather Case, GoldX 5-in-1 USB cable, USB hub, USB mouse, USB keyboard, USB ethernet, USB HDD, many other USB accessories...
(Zaurus SL-C3000 owner since March 14. 2005, Zaurus SL-C3100 owner since September 21. 2005)
http://members.iinet.net.au/~wyso/myZaurus - zBook3K

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #2 on: March 04, 2006, 03:25:40 am »
thanks for the idea

the audio prefs allow you to set the audio device, which is /dev/dsp

now, interestingly, I discovered a few things. I HAD kphone running perfectly on my laptop (suse 9.3), using siproxd on the firewall, able to make calls to speaking clock at FWD, echo test. NOW it's broken.

In siproxd's config, running on the linux firewall, you specify the "inside" and "outside" interface, and for my wired network, eth0 is inside, but eth1 is wireless (zaurus). It replies to the client using the "inside" interface, so I had to change it to eth1 otherwise the Z wouldn't register - because the siproxd's replies came from the WRONG address. Now, the laptop isn't getting audio any more!

I've switched siproxd back to eth0, for wired lan and laptop, but still no audio.

The good news is that I can ring my Z from the laptop, and the Z makes a ringing sound, and vice versa! Oddly, kphone didn't care too much that siproxd was replying from the wrong interface. hmmm. more tcpdumping required.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #3 on: March 04, 2006, 03:41:08 am »
ahah! when I now tcpdump on laptop, I am getting udp port unreachable back from firewall.

switched back to siproxd on wifi and same issue, firewall reporting port 7070 unreachable.

hmmm.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #4 on: March 04, 2006, 03:54:55 am »
woohoo!  working!

the problem was that the firewall was blocking inbound port range udp 7070 to 7080. you see, I share my broadband with neighbour, and therefore wireless is on separate interface on firewall so that they cannot access my home network (and also I don't let them do anything other than web and pop3 :-)

once I permitted this port range inbound on wired network to firewall, I got audio.

using a universal headset (2.5mm jack) and homebrew adaptor to 3.5mm jack, I got nice clear audio and not too much lag from the echo test.

however, switching back siproxd to eth0 (wired), still no audio from the laptop.

it's a PITA that siproxd won't bind to a specific interface as far as I can tell.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #5 on: March 04, 2006, 05:01:31 am »
Woohoo!!! Even better... courtesy of http://fwd.calluk.com I now have a UK 0870 number which routes to my freeworlddialup number.

and http://www.ipkall.com/ gives you a free USA number into FWD network.

anyone know any other good/free PSTN to VOIP gateways?

BTW, in case anyone is wondering... this is because I am going to USA in a few weeks time and want my wife to be able to call me without running up HUGE mobile phone roaming charges.

PM me off-list if you want my FWD number to try ringing my Z. It won't be on all the time of course, it needs to have a sleep and recharge its batteries from time to time.
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #6 on: March 04, 2006, 05:47:09 am »
I had a play with linphone on the laptop, and you can control the port settings much better than kphone, so it's possible to use DNAT and SNAT to map the RTP port (7078 by default on linphone) to the external IP of the firewall.

here's my script:
Code: [Select]
#!/bin/sh

# IP of the sip phone on local LAN
INTIP=192.168.1.1
# IP of the firewall external interface
EXTIP=195.196.197.198

echo "this will map $INTIP:7078 to a static external port on the firewall also at port 7078"

#turn map internal 7078 to external 7078 for outbound traffic:
iptables -t nat -I POSTROUTING -o eth2 -s $INTIP -p udp --sport 7078 -j SNAT --to-source $EXTIP:7078

#map the external 7078 to internal host 7078 for incoming traffic:
iptables -t nat -I PREROUTING -i eth2  -p udp --dport 7078 -j DNAT --to-destination $INTIP:7078

#allow outbound forwarding of 7078:
iptables -I FORWARD -i eth1 -p udp --sport 7070:7080 -j ACCEPT

#allow inbound forwarding of 7078:
iptables -I FORWARD -i eth2 -p udp --dport 7070:7080 -j ACCEPT
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #7 on: March 05, 2006, 05:29:05 pm »
Having mooched around a few websites, I discovered www.sipgate.co.uk, which is an excellent service. Unlike the others, you can get a "real" phone number for free, so noone has to pay a premium to call you (and in fact, some people will be able to call for free), and you can make outbound calls for a reasonable price, and can call many freephone numbers too!

Sipgate can also proxy dial into FWD, which is neat. So, calluk is officially dumped!
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.

speculatrix

  • Administrator
  • Hero Member
  • *****
  • Posts: 3708
    • View Profile
Kppi (sip Phone) Audio Fixed! - Cacko 1.23
« Reply #8 on: March 06, 2006, 06:56:26 pm »
I hacked a cheapo mono headset by cutting off the plugs and soldering on a stereo 3.5mm jack - sleeve is ground, middle ring is speaker/headphone and tip is microphone. Works a treat! I get very good latency with sipgate, much better than with FWD.

The sound recorder is a great way of testing headsets on the Z, to verify volume levels are good.
« Last Edit: March 07, 2006, 02:13:42 am by speculatrix »
Gemini 4G/Wi-Fi owner, formerly zaurus C3100 and 860 owner; also owner of an HTC Doubleshot, a Zaurus-like phone.