yashsingh1/xdaforums huggingface dataset:
[Nexus 4 General] ShinnAsuka:
So I got my bluetooth headset today (LG HBS 730). Results are the following:

Incoming and outgoing calls do work with it, but its special:

for incoming calls, you need to accept the call through the Nexus 4 first, then you can use Bluetooth headset for communication. Therefore, you can't use the button on the headset to accept calls.

for outgoing calls, even if you use the headsets ability for voice dictation to place a call, you still have to select the dialer you want to use (usually always asks which you want to dial with: csip or mobile). What also sucks is that if you have a lock on your phone, even slide, you have to unlock phone to actually place the call. If you use stock dialer, it should work, but I have a really low limit on minutes lol.

Hopefully this is clear, any questions just ask :)

Thanks.
[Nexus 4 General] ShinnAsuka:
Have any of you tried to use the native internet calling feature? I've been playing around with it and it always ends up in either number unreachable or your call can't be completed...

Mainly trying to get it to work so I can use my Bluetooth headset to it's full potential...
[Nexus 4 General] cavemandaveman:
I've been having a problem where on an incoming call, the person can't hear my voice but I can hear them just fine. With outgoing calls this isn't a problem. I've tried changing the mic sources in the csipsimple settings on my nexus 4, but still no difference. Anyone else experiencing this?
[Nexus 4 General] ShinnAsuka:
Try restarting your asterisk server through Linux CLI with the command amportal restart when you are logged in as root. Also check your codec settings in csipsimple.
[Nexus 4 General] ryuker:
edit: wronG , ignore the below....turns out I needed to add a 1 in front of my calls ,,,,

I had a sorta similar situation....calls kept ringing and the other person picks up but my phone doesn't relize it's connected. My hunch is something to do with dialer integration so I removed it and the problem went away...YMMV!
[Nexus 4 General] jmtjr278:
I found this guide very helpful but was still unable to make this work. I will stick with callcentric/csipsimple/ilbc method. Seems to work just fine for me with wifi and lte. Thanks.
[Nexus 4 General] ryuker:
Read the last 5 pages of this thread: alot of helpful advice.
[Nexus 4 General] jmtjr278:
sorry if this is a stupid question but instead of using amazon ec2 server could i just use a rasberry pi?
[Nexus 4 General] ryuker:
Yeah, I'm not sure if it had enough processing power though and there were a few other issues I read....look into it.:highfive:
[Nexus 4 General] ttabbal:
The piaf guys had a version for the rpi a while back. They seemed to think it worked well. It wouldn't handle as many simultaneous calls as a ec2 or larger machine, but most of us here will probably not hit the limit.
[Nexus 4 General] bige93:
Guys! I can't connect to my VoIP server from Nexus 4 through 3G (T-Mobile). WiFi connecting and working well. Which IP shoud I add to EC2 Security Group? Tried both external and internal (as seen in SpeedTest.net app). Help, please!
[Nexus 4 General] toadleyb:
I have a very foolish question. I have read through this thread twice now.

I have piaf green all set up and working wonderfully from home. I have set up traveling man 3 with a fqdn for both my home network and my cell phone. I have a separate fqdn for each on no-ip.com.

How in the world do I set up the security groups in the aws console with the fqdn instead of static ip? Right now I have my home network set up as a static ip and it works great until my ip changes.
[Nexus 4 General] ryuker:
Some more resources:

http://www.digitaloffensive.com/2010/05/overcoming-sip-over-nat/

Someone correct me if I'm wrong, I'm not a pro at network security!!!!

Here's my configuration on amazon Ec2; Amazon ec2 right out the box requires an encrypted key with passphrase via SSH to enter to enter into your file system(make it a long passphrase with numbers and symbols) so some security is built-in for access(I can't speak for for other cloud services and hosts). You might want to change your Amazon web profile password to something long and difficult as well since firewall rules can be changed that way!

Accessing the web accessible configuration(EC2 and Piaf/asterisk) will likely be done via a small number of PCs(if behind a VPN or router, you likely have one IP address that the computer reports to the world(your internal IP

* means my IP....I access the Piaf web interface config with my work and home PC which each have different IPs; nobody else can even attempt to access the web interface with another IP than those on those two IP addresses.

Alternatively, you could install Fail2Ban which will ban IPs who try to enter the web interface with the wrong password too many times(brute force).

Enter your server on Amazon ec2(TCP)

-----------

22 (SSH)	*	(only these IPs can tunnel into my amazon server to access/change/view configuration files or CLI interface),

22 (SSH)	*

Web interface access(TCP)

-----------

80 *(http, preferbly just use https to be extra safe, I block port 80 and just use https)

80 *

443 (HTTPS)*

443 (HTTPS)*

5038*

5038*

I opened these next SIP related ports up to the world :silly: because I use VoIP only on my cellphone. You won't have a public,static IP from a random wifi connection your using at hair salon for example. I don't think 3g/4g allows static IPs unless you pay extra for the service on T-Mo.

Basically, you can't restrict open access to these ports by IP without a static, public facing IP(not the internal one like 192.***.***.**). If your VoIP phone will only be used on a select few wifi/ethernet connections you can just do limit access to just those IPs for extra safety.

Ports used for SIP(UDP...TCP for some configurations?)

-----------

5060 UDP

10000 - 20000 UDP (post-mortem pointed out you don't need many ports open for SIP unless your a call center....you can change this to a much smaller port range like 12200-12400 via the advance SIP settings in asterisk and just open 200(even20-30!) ports on your EC2 firewall instead 10,000...less open ports are better!!! You may want to change the RTP port range start in Csipsimple)

5000-5082 UDP

a few others exists for some unique configurations.

Lastly, I posted how a few pages back....but change the default maint password for the web interface. Make it difficult(numbers, letters, at least one Capitol)...
[Nexus 4 General] post-mortem:
I read somewhere that each active phone call uses 4 ports, so allowing 10000-20000 UDP ports open allows for a max of 2,500 concurrently active calls. If you're only really using your Asterisk server for yourself, you could change that to something like 14500-15500, decreasing the # of open ports. If you make this change, you should also make the equivalent change in Asterisk's web interface (I think it's Advanced Settings).
[Nexus 4 General] ryuker:
Good point! I changed mine in advanced SIP settings for asterisk to open only 300 or so ports. Worked fine!! Going to try 100 soon....I think 20-30 should be fine depending on call volume and # of users.

---------- Post added at 11:41 PM ---------- Previous post was at 10:57 PM ----------

Your IP shouldn't be changing unless it's not static or you switched networks....I don't know much about FQDN with traveling man....try my implementation or fail2ban....I read up alittle on traveling man on ....http://nerdvittles.com/?p=815. Seems pretty complicated to set up if your new to this.:eek:
[Nexus 4 General] bige93:
These setting didn't help.

How all you guys connect from T-Mo to your EC2?
[Nexus 4 General] toadleyb:
Thanks for the tips. I am very new to piaf just found it at the beginning of this week. It is a fun project.

Traveling Man 3 seems very easy to me unless I am missing something. It blacklists everything then you just use the command add-fqdn to whitelist a fqdn that you want to allow.

I understand opening the udp ports to the world. Is this safe? If I use tcp instead of udp is it safe to open the tcp ports to the world in a similar fashion?
[Nexus 4 General] picodot:
The key to Travelin' Man 3 with dynamic IP addresses is using a DynDNS client. If your PC uses cable, your IP address will change. Your cell phone IP address will also change. In this case, you'd want ot install the DynDNS client on both your PC and cell phone. DynDNS will assign you a fully qualified domain name (FQDN) for each, then the client will automatically push any IP address changes to DynDNS's look-up servers. On your PIAF installation, use add-fqdn to add the FQDN for both your PC and your cell phone. Now only these two devices can access your server, and all other IPs (except for other "trusted" domains included by Travelin' Man) are blocked. This is the "whitelisting" methodology of securing a server.

DynDNS has been around for many years. It used to be free, but now it costs $25 a year. There are other websites that provide free dynamic DNS services.

Post #2 also has some key security points for locking down root.

FYI: The whitelisting methodology wouldn't be appropriate for some server applications, e.g., this wouldn't work for a web server since ideally you'd want everyone to be able to access your web server. So you'd start by allowing all IP addresses, then you'd have to blacklist any "threats." On Nerdvitttles he talks about how he had 100,000 IP addresses blacklisted (probably by buying the list or using a freely available list of threats). He had to add another 30,000 IPs to the blacklist after he was the target of a DoS attack from 30,000 zombie machines.
[Nexus 4 General] ryuker:
Did you add your IP on only port 443 and didn't use http

s

:// ********* for the address? Port 80 is http://

Don't confuse your public IP with your internal network IP.

If you still can't get it....try this:

Open all ports on 0.0.0.0/0 and see if you can gain access to the web interface. When you configure everything and got it working, Then either try my settings or Travelingman 3.
[Nexus 4 General] jakejm79:
So I have read through this entire thing, I have everything up and running, using exclusively silk12. I have 2 questions tho:

1. The native SIP stack in android only supports GSM and ulaw(711u) correct? I am only able to use other codecs when using csipsimple (or another third party SIP client). Is there anyway to change this, I really would like complete seamless integration, but the quality drop by using GSM or ulaw, isn't worth it. Does anyone know if any custom roms (i.e. CM10) added additional codec support to the native stack?

2. I have tried many times to get outgoing caller id spoofing to work, but regardless of what settings I use within asterisk I still get my GV # displayed, I am thinking that Google doesn't allow out going caller id spoofing, are there any other free providers that do? It would be nice to just have one number show up regardless of whether it was a conventional cell call or VoIP call. I know there are a couple of pay providers, but at $6-7 a month, it pushes the the total monthly bill back up close to what I could get for an unlimited calling plan.
[Nexus 4 General] bluespire:
[1] Good question!

[2] You are correct in that Google does not allow spoofing. Doubtful you will get the flexibility you want from a free account. $6-7/month isn't bad, considering you are still not paying all the telco fees you would pay a normal cell vendor, AND you still get all this great flexibility. Check out Anveo. I liked them a lot when I used them. I have heard CallCentric is good, too (but I don't think it is as flexible). Don't forget the Amazon server will not be free forever, either.
[Nexus 4 General] jakejm79:
But at $6-7 it puts the savings vs. ST to be minimal (only about $5) at that point I'm better off with true unlimited calling. I wish there was a 500/3GB plan for like $35 or so but everything is either unlimited minutes or minimal minutes, no in between
[Nexus 4 General] picodot:
The usual recommendation is to make your Google Voice number your primary number. If you want to keep your mobile number, you can port it into Google Voice for a one time charge of $20. Here are the details:

https://support.google.com/voice/answer/1065667?hl=en
[Nexus 4 General] jakejm79:
2 problems with that is I rely heavily on MMS, which gv doesn't support, also Google doesn't support porting of numbers in my state/area code, so I couldn't port even if I wanted.
[Nexus 4 General] ryuker:
MMS goes to your google email...the T-mobile plan has unlimited texts as well.
[Nexus 4 General] jakejm79:
Only for MMS from certain providers, i.e. Sprint. Yes I text and MMS heavily, so I would be relying on the T-Mobile #, to try and avoid confusing people I would like my outgoing VoIP calls to also reflect that number (I plan on using my 100 minutes for incoming, since I rarely have a need to take a lot of incoming calls, or at least that I can't ignore and call back). It's not a huge deal and not worth spending money on, I will just have my contacts had my GV # has an additional # for me so at least it matches to my contact when I call them. Alternatively if GV ends up supporting MMS across the board and I can interface with the stock messaging app then I would happily go all in with GV.

So it looks like Vonage will spoof my caller id, quality is meant to be good too, I don't have dialer integration, but since I will use it for all outbound, it isn't that difficult to just use that dialer exclusively. This gives me 3 out of my elusive 4 (call quality, caller id spoofing, free, but no native integration), also makes it real easy to manage my voicemail, since no one will be calling my GV # since it wont ever appear on any caller id.
[Nexus 4 General] umassboston:
Links for the Instructions Don't Work

Hi Acegolfer,

Could you please put all the instructions at the same place (the necessary ones, because couple links don't work). Step-by-step will be very helpful, since I don't have any knowledge in setting things up like these. Thank you so much.
[Nexus 4 General] acegolfer:
Updated OP.
[Nexus 4 General] ShinnAsuka:
Does anyone know how to get CsipSimple to both ring and vibrate on incoming calls? Already tried posting in the User Groups on Google Groups, but haven't gotten a response sadly...

Can't seem to find a setting in CsipSimple for that either... The only setting that relates to vibration is the dialing haptic feedback, which is when you go to the dialer and touch type the phone number you want to call.

Thanks...
[Nexus 4 General] cavemandaveman:
I'm having the same issue...only get a ringtone on calls, no vibrate
[Nexus 4 General] acegolfer:
Great question.

I don't know how to enable vibrate in CSS. But how about GV forwarding to both Tmo SIM and PIAF?
[Nexus 4 General] ShinnAsuka:
The problem with that is it will ring both of them, and assuming you want to use CSS for all calls (incoming and outgoing) that complicates things...

Example: You set call forwarding to T-Mobile SIM

Incoming call will ring both CSS and SIM and if you reject call on SIM side, it will reject it on CSS side too. That's my experience anyways...
[Nexus 4 General] acegolfer:
In my case, CSS rings first and then SIM rings. So I usually decline the SIM call and answer the CSS call. Strange to hear that declining SIM killed CSS side. I suppose I'm lucky, even though it's a hassle.
[Nexus 4 General] ShinnAsuka:
Hm... maybe I should try toying around with that again... So if you have GV set to forward to both T-Mobile SIM and GChat, it will ring both CSS and SIM right? Then rejecting the SIM call won't affect the CSS call?

The potential problem that remains is that once you reject the SIM call, wouldn't the vibrating stop?
[Nexus 4 General] acegolfer:
Correct.
[Nexus 4 General] ryuker:
Another tip for everyone....

Beware messing around with the trunk/outbound settings dialing plan options....you can easily reset them by deleting the path you created and then going back to make them again. At least a few times I totally screwed up my outbound calling and inbound recieving. Default works fine IMO...:silly:
[Nexus 4 General] vikas_toad:
What about being outside usa for gv :(
[Nexus 4 General] redholm:
Public IP issues on AT&T

Has anyone tried this using AT&T?

I get different public IP for my Ddns client and for Csipsimple. It looks like AT&T routes different protocols through different public IP.

That causes my Travlin’ Man 3 to not white list my phone so I cannot register. If I turn off iptables everything works.
[Nexus 4 General] Ayni:
I just started to try to set this up but I'm stuck trying to find PIAF in the community AMI's. It just comes up with no results.. Tried searching other related terms to not avail.. Any ideas?

Thank you
[Nexus 4 General] ShinnAsuka:
Finding the AMI'S is hit or miss a lot of the time. Just keep on trying to search for them. If they still don't come up then maybe they were taken down...
[Nexus 4 General] jhardydj:
This is the one I use (from Nerdvittles - PIAF blog)

Hope that helps
[Nexus 4 General] ryuker:
Anyone else occasional get a hiccup where google voice cant dial out?

EDIT: Codec issue? I get hit of miss issues with google voice....works for weeks straight then a day of issues. I disabled the "disallow+all" when I put in the silk codec....seems to have solved that right away. IDK,your miles may vary.

Also, google seems to have made some changes to it's menu for voice on the web:

http://productforums.google.com/forum/#!topic/voice/VBtR-yU-nJU

Try this solution if your having GV issues with recieving calls or issues in general
[Nexus 4 General] jmtjr278:
I'm trying to set this up using raspberry pie. I have followed all the instructions in the op minus the aws portions. Instead of the elastic ip address what would I use?

---------- Post added at 04:58 PM ---------- Previous post was at 04:21 PM ----------

Also the username would be what. A name followed by a number? Or just my username I created?
[Nexus 4 General] plee3:
I am also interested in using a raspberry pi to implement this PIAF setup.

Please update this post if you find a solution in using the raspberry pi.

Any info on the setup would be greatly appreciated.

Thanks... plee3
[Nexus 4 General] acegolfer:
Have you asked in the Piaf forum? You will probably get more help there than here.
[Nexus 4 General] Nick123194:
I need help....
[Nexus 4 General] howardsl2:
Just want to give everyone a heads up that the PIAF EC2 AMIs may be discontinued soon:

http://pbxinaflash.com/community/index.php?threads/aws-ec2-discontinuance-possible.14168/

For installing PIAF on ANY fresh CentOS 6.5 system (excl. OpenVZ), I wrote up a detailed tutorial on my tech blog:

https://blog.ls20.com/install-pbx-in-a-flash-piaf-on-digitalocean/

Also, I wrote a comprehensive HOW-TO on securing your PIAF server with IPTables rules:

https://blog.ls20.com/securing-your-asterisk-voip-server-with-iptables/

I hope you will find them helpful!
[Nexus 4 General] Warbuff:
Thanks for the links man. Going to follow your iptables guide.
[Nexus 4 General] Nick123194:
Wow I was just using this piaf ec2 for only 2 weeks. :(
[Nexus 4 General] ShinnAsuka:
I just tried cloning my current PIAF instance and for some reason calls aren't working anymore. Didn't think it would be any different since it's a clone. Any ideas?

EDIT: nvm, forgot to do the elastic IP and associate it with the new instance.
[Nexus 4 General] errorcod3:
Re: [DISCUSSION] Asterisk/FreePBX/PIAF

The first year is free.

---------- Post added at 03:19 PM ---------- Previous post was at 03:15 PM ----------

1. Yes, but you can open ports.

2. I installed a while ago. I used v11 on Ubuntu lucid. I had to recompile the kernel to 1000HZ. Everything else was pretty straight forward.
[Nexus 4 General] bluespire:
1) That doesn't help when I've had my AWS account for more than a year now.

2) That doesn't help when someone wants to make this a permanent, multi-year, solution.
[Nexus 4 General] errorcod3:
If you have a AWS account then look up how much it cost to run a micro instance. If you want a long term solution then I recommend purchasing a reserve instance.
[Nexus 4 General] bluespire:
I didn't get to respond in time. I looked it up. Not sure I did it right, because the load level are less costly as you move toward heavy from light, which is counter-intuitive. Regardless, about $10/month for 1GB in/out. Not bad. I looked up a forum post on how to do it, and it looks difficult as hell to set up on a EC2 instance. If you have a guide, please post it.
[Nexus 4 General] errorcod3:
I don't have a guide. If you buy a reserve instance for a year, then your price will drop to about $7 per month. There is a calculator that will allow you to compare the prices between ondemand and reserve. http://mikekhristo.com/ec2-ondemand-vs-reserved-instance-savings-calculator/

It's really not hard at all to setup the instance once you get familiar with their interface. Installing asterisk doesn't require anything special, you can just follow any asterisk/google voice guide.
[Nexus 4 General] bluespire:
What image did you use to install linux? You just installed Asterix into that?
[Nexus 4 General] errorcod3:
Just to add...

You can even find a guide to help you recompile the kernel to support 1000HZ timing. Which you will need to get better audio quality.

Basically, get the instance up, setup an elastic ip, recompile kernel, install asterisk, and configure asterisk for google voice. If you are a novice you could probably get this done in an afternoon (minus recompiling kernel, that takes time to recompile). I recommend boosting the micro instance to an extra large instance while the kernel is compiling then downgrade it back to a micro. If you do that, then your compiling time will go down from about 7 hours to 20 minutes... and Amazon would charge you about 70 cents for that hour that you need the extra large instance.

---------- Post added at 09:17 PM ---------- Previous post was at 09:05 PM ----------

I'm using Ubuntu Lucid 10.04 LTS:

http://uec-images.ubuntu.com/releases/10.04/release/

Recompiling Kernel Guide::

# Make yourself root
sudo su

# Update source list:
aptitude update

# Upgrade everything:
aptitude upgrade

# Install dependencies:
apt-get build-dep linux-image-$(uname -r)
apt-get build-dep linux
apt-get install fakeroot build-essential
apt-get install crash kexec-tools makedumpfile kernel-wedge
apt-get install libncurses5 libncurses5-dev
apt-get install libelf-dev asciidoc binutils-dev kernel-package
apt-get install git-core

cd /usr/src
git clone git://kernel.ubuntu.com/ubuntu/ubuntu-lucid.git
cd ubuntu*
git checkout --track -b ec2 origin/ec2
fakeroot debian/rules clean
fakeroot debian/rules editconfigs

# Configuration window should now appear, do the following:

Select YES

# Navigate to:
Processor type and features -> Timer frequency
# Select the 1000HZ frequency
Exit
Exit
Yes (Save)

#After saving and returning to prompt it may ask you to do it again for i386, select yes and repeat!

# Recompile (change to extra large instance to save time at this point):
fakeroot debian/rules binary

#Check if your deb 2-3 files were created
cd ..
ls *.deb
sudo dpkg -i linux-*.deb

#reboot
reboot

#Check your new Kernel version
uname -r

#Check if Kernel HZ value change persisted:
cat /boot/config-`uname -r` | grep HZ

#If value 1000HZ=yes:

Done!;)
[Nexus 4 General] errorcod3:
I added a guide to setup Amazon EC2:

http://xdaforums.com/showthread.php?t=2126964
[Nexus 4 General] acegolfer:
I'm giving up running PIAF in my home PC. It offers better sound quality than my iLBC trick but less reliable. I had to restart asterisk every 24 hours to get GV to work. Not sure whether this is an asterisk 11 issue or not.
[Nexus 4 General] bluespire:
You should give the EC2 instance a try. I will when I get a chance to. Sounds like it will take a day for me to complete.
[Nexus 4 General] cmaxwe:
Digital Ocean (http://www.digitalocean.com) has $5/mo 512mb VPS's that could be used. Just checked one of my CentOS 6.3 ones and it appears that the kernel is already at 1000Hz so the recompile is not necessary.

This is cheaper than running a micro instance (if you have exceeded your year) and I think you get a lot more CPU power with these guyes.