![]() |
VoIP / Asterisk / rtcomm
I first tried to connect gizmo to my asterisk at home and it doesn't seem to work in any direction, "sip show peers" never shows a connection for the N800's user.
(N800 with the latest IT2007 firmware that should fix the SDHC bug) So, after that failure, I tried with osso-rtcom-beta 1.3-3 and it registers just fine (but only with secret= in sip.conf and not md5secret= mind you! That's a pitty as security on the road would be much more needed than at home!) So, now i can make phone calls but i can't receive them... it just doesn't ring my device while it does ring ekiga on another machine and my SPA2102 ATA too. Any idea why i would have this asymetrical sip connection? :-( |
Re: VoIP / Asterisk / rtcomm
If this can be of any help, my current asterisk sip.conf user for this profile is:
[n800] type=friend username=n800 secret=12345678 canreinvite=no dtmf=rfc2833 host=dynamic mailbox=2100@default context=provider And when the asterisk receives a call it says Ringing for other phones but i get this message for the n800: -- Got SIP response 405 "Method Not Allowed" back from 192.168.1.178 any ideas? :) |
Re: VoIP / Asterisk / rtcomm
It sounds like your registering via SIP just fine, but your new "n800" account isn't included in any of the incoming call rules in your extensions.conf file. I'd take a look in there first.
Don't worry about the 405 "Method Not Allowed" messages, I think those have to do with the mailbox=2100@default line. As far as I can tell the N800 Rtcom stuff doesn't support voicemail info (#messages waiting, new message, etc). |
Re: VoIP / Asterisk / rtcomm
Hahahah thanks a million man, that's what you get for fixing stuff at 4 am...
I completely forgot to add the n800 to the indial in extensions.conf ;-) Any suggestions on how to secure this now? All my other phone being at home i don't care about them but i still use md5secret instead of secret... it doesn't seem to work with the n800 though. So using this with my VoIP account from bars makes me a little nervous, maybe i'll try to see if i can make an ssh tunnel but i'm afraid of latency... |
Re: VoIP / Asterisk / rtcomm
Well, one thing to be aware of is this bug re: OpenVPN and RTcom :
https://bugs.maemo.org/show_bug.cgi?id=1860 Really I haven't messed with thing enough to give you any suggestions though. I think there are some TLS options as part of RTcom (like TCP w/ TLS), but I'm not sure Asterisk supports TLS yet. |
Re: VoIP / Asterisk / rtcomm
RTComm doesn't support TLS etc just yet and i fear this bug is with RTComm rather than OpenVPN (just guessing, i hope not)... though, in the mean time, i have found a pretty elegant solution (when i'll manage to figure out why i can't get it to work yet ;-) with OpenSSH 4.3 and later with a kernel supporting TUN/TAP devices. You can use ssh -w any:any your.host.com to generate a tunX device through which you can route traffic... no need for additional VPN softwares anymore :-D
a couple references for futur use: http://www.debian-administration.org/articles/539 https://help.ubuntu.com/community/SSH_VPN |
Re: VoIP / Asterisk / rtcomm
RTcomm (really Sofia) doesn't want to use any VPN tunnels on the N800. One HUGE bug right there, especially since their wi-fi & SIP-enabled cell phones can do it easily enough.
But Nokia's too busy trying to be iTunes at the moment to really bother trying to fix it. |
Re: VoIP / Asterisk / rtcomm
Uhm, someone on #maemo actually said they managed to have rtcomm run over the PPP/SSH VPN solution... if ppp0 works tun0 should too, but before trying this first hand, i must understand the new OpenSSH 4.3+ tunnel mode (-w any:any flags).
If i have 2 machines: 192.168.1.2 and 192.168.1.3 and i ssh -w any:any 192.168.1.2 from .3 then on .2: ifconfig tun0 10.0.0.2 pointopoint 10.0.0.3 and on .3: ifconfig tun0 10.0.0.3 pointopoint 10.0.0.2 after i can ping 10.0.0.2 from .3 but after a long time it just dies... the route or ifconfig information doesn't change or show Errors. It's very easy to trigger if you ping -f 10.0.0.2 for example... it will die within a minute. I reproduced this between other pairs of machines. Any idea anyone? I know people haven't played much with this new tunnel mode but it's so useful/promising that i can't give it up ;-) (all kernels are 2.6.22+ and ssh 4.6p1-Debian5*) |
Re: VoIP / Asterisk / rtcomm
I am the person who started the 1860 Bug. Here is the last reply I got from the developers:
Unfortunately, no fix is likely to make it to this OS2008 release. But we haven't forgotten about the problem. To solve it properly, the VPN daemon needs to talk to icd (the system connectivity service) and inform it of the new tunnel interface. This requires a supporting API from icd which was not implemented in Chinook. We may still come up with a specially hacked vpnc package (if only ifup/ifdown scripts need to be changed) that will at least tell Mission Control about the IP address obtained for the VPN. Please inform which VPN solution you use on your device, what are the packages and where they came from; in time, we may post some customized packages for testing through our garage project. So it's not likely to be an easy solve. I have my n800 working with my trixbox 1.2.4 (with g729 BTW) and have not been able to use rtcomm over openvpn (VNC and telnet work fine). So it's a matter of time, probably. Have anyone succeeded with other VPN solutions? |
Re: VoIP / Asterisk / rtcomm
er... that sounds horrible! They need to know "which VPN solution you use on your device"! That should of course be completely irrelevant, what VPNs basically do is simply to set up a virtual network interface and run the default route through there. _This_ is what should be supported. In any case there are lots and lots of VPN solutions out there, it's an impossibility to code up support for all of them in applications or the like. I guess it all boils down to the hacks made with the icd and libc to handle on-demand networking (as that hadn't been solved better before..). Such things tend to come down hard on you later..
|
Re: VoIP / Asterisk / rtcomm
Actually maximCT on #maemo did try the ssh -w i suggested with rtcomm and it seems to work too (he was also the one testing the PPPoverSSH solution).
So it seems possible, i'll tell you more when i can gather some more info ... EDIT: a little off-topic, but in the mean time, is anyone able to use the nat modules here: https://garage.maemo.org/frs/?group_...release_id=649 I can't seem to insmod them, i get: insmod: cannot insert 'iptable_nat.ko': Unknown symbol in module (-1): No such file or directory REF: https://garage.maemo.org/projects/ipt-nat/ EDIT2: forget this, in the right order it works, but it still can't accept rules such as -j MASQ or SNAT :( |
Re: VoIP / Asterisk / rtcomm
Quote:
I'm trying to see what can be done with iproute2 but no success so far, but i'm learning ;-) If we can get the source IP to the tun0's IP adress, i'm pretty sure it would work now. Any quick fix from an iproute2 guru or, if possible, a working nat module poackage? :P |
Re: VoIP / Asterisk / rtcomm
Just a guess here, but has anyone tried forcing a default route addition with openVPN ? (like the "redirect-gateway" directive) If it's just a matter of the system not "seeing" the tun interface to use, maybe this would just force it's hand. Of course I could be totally wrong :)
|
Re: VoIP / Asterisk / rtcomm
Moonshine:
I tried with the -redirect-gateway def1 option, to no avail. Seems strange that the rtcomm worked with ppp and won't work with tun. |
Re: VoIP / Asterisk / rtcomm
Uhm, i didn't play with my SIP again until recently to prepare for a BT headset i just got...
First i was playing with my OS2007 and it would randomly work or die on answer from the other end etc... So i thought why not try OS2008, maybe i had bloated everything and destroyed rtcomm's install in the process... Same thing with 2008! Asterisk version is 1.4.13. All my other phones/softphones work but the n800 doesn't, here is my sip.conf user: [n800] ; fixme type=friend username=n800 quality=yes md5secret=570fc7518b4e5c8d3faca3fcf605132c dtmf=rfc2833 host=dynamic context=home When i dial in the home context another phone which i mapped to 1234, it rings and most of the time when that phone picks up, it just dies there. Sometimes it goes through. We're talking about all local phones here which is real weird! N800 on wifi LAN -> gateway with asterisk -> phone/ATA on wired LAN... Anyone ever had this random problem happen? Example debug i get in asterisk: WHEN IT WORKS: -- Executing [1234@home:1] Dial("SIP/n800-081e68c8", "SIP/spa2102b") in new stack -- Called spa2102b -- SIP/spa2102b-081f06f8 is ringing -- SIP/spa2102b-081f06f8 answered SIP/n800-081e68c8 -- Native bridging SIP/n800-081e68c8 and SIP/spa2102b-081f06f8 == Spawn extension (home, 1234, 1) exited non-zero on 'SIP/n800-081e68c8' (LAST LINE PROBABLY THE SAME AS WHEN IT DOESN'T WORK BUT ONLY AT THE END WHEN I HANG UP BY CHOICE NOT BY FORCE ;) WHEN IT DOESN'T WORK: -- Executing [1234@home:1] Dial("SIP/n800-081e68c8", "SIP/spa2102b") in new stack -- Called spa2102b -- SIP/spa2102b-081f40a0 is ringing -- SIP/spa2102b-081f40a0 answered SIP/n800-081e68c8 -- Native bridging SIP/n800-081e68c8 and SIP/spa2102b-081f40a0 == Spawn extension (home, 1234, 1) exited non-zero on 'SIP/n800-081e68c8' (SOME DELAY) [Nov 29 01:19:08] WARNING[24565]: chan_sip.c:12038 handle_response_invite: Re-invite to non-existing call leg on other UA. SIP dialog 'a182faa7-18bb-122b-32b2-00194fd4ead7'. Giving up. (I SOMETIME SEE THIS TOO) [Nov 29 01:21:57] WARNING[24565]: chan_sip.c:1938 retrans_pkt: Maximum retries exceeded on transmission f966787f-18bb-122b-5a8f-00194fd4ead7 for seqno 103 (Critical Request) |
Re: VoIP / Asterisk / rtcomm
Quote:
|
Re: VoIP / Asterisk / rtcomm
Quote:
But even with that fixed i still have the same symptoms. in: tcpdump -i eth1 n800-IP -A, from the gateway with asterisk, i can see: 11:31:08.732719 IP 192.168.1.1.11981 > 192.168.1.178.7079: UDP, length 44 11:31:08.738876 IP 192.168.1.178 > 192.168.1.1: ICMP 192.168.1.178 udp port 7079 unreachable, length 80 I got lucky and got a call to go through and had this in asterisk -rvvvvvv just around where it got disconnected after 12 minutes: [Nov 29 11:34:43] NOTICE[28729]: chan_sip.c:15460 sip_poke_noanswer: Peer 'n800' is now UNREACHABLE! Last qualify: 6 was still working a bit after the previous warning... [Nov 29 11:35:50] NOTICE[28729]: chan_sip.c:12336 handle_response_peerpoke: Peer 'n800' is now Reachable. (1428ms / 2000ms) then it died.... "Connection to one or more account lost" in rtcomm. == Spawn extension (home, 1234, 1) exited non-zero on 'SIP/n800-081edfb8' i probably hung up my home ATA/Phone here... [Nov 29 11:36:46] WARNING[28729]: chan_sip.c:12038 handle_response_invite: Re-invite to non-existing call leg on other UA. SIP dialog '347a5eeb-1910-122b-3595-00194fd4ead7'. Giving up. And after a while i see this. Same goes with qualify=no, nat=no ... :| |
Re: VoIP / Asterisk / rtcomm
Lots of variable here, but you might want to try adding:
canreinvite=no Then Asterisk won't allow the SIP clients to issue additional invites where they will try to talk directly with each other. (Which can create issues NAT/public addresses, rport, etc) |
Re: VoIP / Asterisk / rtcomm
Quote:
I'll keep testing and come back with results if i find something more... The weird thing is, my friend is using it with an Asterisk on OpenWRT without this canreinvite=no option and it works for him... same device/OS! |
Re: VoIP / Asterisk / rtcomm
Well, following the reported 1860 bug of rtcomm gave out a "hack" that finally enabled me to log in into my Asterisk over the OpenVPN link! It's not ideal, but it works for now.
First you have to establish the VPN link and take note of your assigned IP (10.x.x.x). Then , in a terminal window, log in as as root. Set up the SIP account (sip0 in my case) parameter "local-ip-address" as follows: mc-account set sip0 string:local-ip-address=10.x.x.x And voila! You can log into the Asterisk server. I am using my N800 with OS 2008, and the latest openvpn. |
Re: VoIP / Asterisk / rtcomm
Hi,
I restart this old thread for just one small question. If I did the mc-account trick, it work all good. But, how do I restore it to the default after I close the openvpn link? Do I redo the line with my wlan0 ip? Thank you. |
Re: VoIP / Asterisk / rtcomm
Quote:
/etc/network/if-up.d/openvpn: #!/bin/sh OPENVPN=/etc/init.d/openvpn if [ ! -x $OPENVPN ]; then exit 0 fi if [ -n "$ICD_CONNECTION_ID" ]; then $OPENVPN restart $IF_OPENVPN sleep 5 VPN_INT="tun0" VPN_IP=`ifconfig $VPN_INT 2> /dev/null | sed -n 's/.*inet[adr: ]*\([0-9]*\.[0-9]*\.[0-9]*\.[0-9]*\).*/\1/p'` mc-account set sip0 string:local-ip-address=$VPN_IP fi I'm using the /etc/network/if-down.d/openvpn script from http://www.internettablettalk.com/fo...ad.php?t=18434 NOTE: I'm using "restart" instead of "start" to avoid problems caused by two openvpn instances running (one started at boot, one started when the wlan interface comes up) |
Re: VoIP / Asterisk / rtcomm
I see asterisk is installable in Debian, I wonder what it would be like to run an asterisk server on the tablet... :)
|
Re: VoIP / Asterisk / rtcomm
JimHoy:
Nice! I am thinking into something like your script but to have it run ONLY when openvpn runs... Otherwise I need the local-ip to be kept to the wlan0, since it won't work for me inside mi corporate LAN. Will see what i get.. |
Re: VoIP / Asterisk / rtcomm
up parameter in openvpn config most likely what you are looking for
|
Re: VoIP / Asterisk / rtcomm
I just used a part of the script and was able to get it working calling them with the up and down openvpn params! Now it connects to the OPenVPn server with the aid of the Openvpn Applet and assigns the tun0 ip to the sip0 account (useful since I also have yahoo, msn, etc) and when the vpn closes reverts the ip to the wlan0!
|
All times are GMT. The time now is 03:12. |
vBulletin® Version 3.8.8