Asterisk PBX + Google Voice / How I set up 100% free landline calling

Page 3 - Seeking answers? Join the AnandTech community: where nearly half-a-million members share solutions and discuss the latest tech.

xlr8n

Junior Member
Mar 8, 2013
2
0
0
The problem with inbound calls not routing to Asterisk from GV was that my phone was logged into my GV account. This apparently suppresses all other outbound routing. After creating a separate Google account dedicated for GV both inbound and outbound calls are working reliably, at least for now.
 

dhyaneshm

Junior Member
May 25, 2013
1
0
0
I Still dont understand the incoming GV flow :

1) I created a fresh google voice account .
2) Creating a fresh google voice account always forces you to have atleast one physical phone number to be associated with .So I did associate that to one of my physical number .
3) Use the fresh new google voice number in inbound route .

---But still it doesnt work .

Also my question is .If google voice doenst have any phone number associated .how does it know that call should be routed to my PBX server ?

Please help me...
 

carbonad

Junior Member
Jun 11, 2013
1
0
0
First off just wanted to say great write up! I followed it and have been running Elastix on my home VMWare ESX box prefectly!

But...

Now I want to look into adding additional GV lines. I read your notes about not added routes with them. Is it possible to have multiple GV accounts working inbound and outbound some one Elastix box? I would normall just start making changes and see what happens but I'm afraid of breaking it and not getting any phone calls, lol.

Thanks,

carbon
 

leetwanker

Junior Member
Jan 14, 2014
4
0
66
I just set up an Elastix 2.4 box and everything went smoothly. I followed the instructions exactly (I THINK!) and am able to make outgoing calls via my Google Voice number.

I have Zoiper 2.1.4 on my iPhone and registered it with the Elastix box, everything seems good there.

When I dial my GV number I don't get an incoming call on the iPhone. I've added an inbound route to Elastix.

I'm not sure how to troubleshoot this. I need to figure out if the problem is with the Elastix box or with the SIP client on my iPhone. Any help?

Thanks!

edit: I found a report summary:
Code:
Ext.  	User 	# Incoming Calls 	# Outgoing Calls 	Total time (Incoming Calls) 	Total time (Outgoing Calls) 	Details 
1001	561-xxx-xxxx	       0	        3	00h. 00m. 00s	00h. 00m. 14s	View

It's hard to format it but basically it's showing my outgoing calls but nothing incoming. Any ideas?
 
Last edited:

DaWhim

Lifer
Feb 3, 2003
12,985
1
81
I just set up an Elastix 2.4 box and everything went smoothly. I followed the instructions exactly (I THINK!) and am able to make outgoing calls via my Google Voice number.

I have Zoiper 2.1.4 on my iPhone and registered it with the Elastix box, everything seems good there.

When I dial my GV number I don't get an incoming call on the iPhone. I've added an inbound route to Elastix.

I'm not sure how to troubleshoot this. I need to figure out if the problem is with the Elastix box or with the SIP client on my iPhone. Any help?

Thanks!

edit: I found a report summary:
Code:
Ext.  	User 	# Incoming Calls 	# Outgoing Calls 	Total time (Incoming Calls) 	Total time (Outgoing Calls) 	Details 
1001	561-xxx-xxxx	       0	        3	00h. 00m. 00s	00h. 00m. 14s	View

It's hard to format it but basically it's showing my outgoing calls but nothing incoming. Any ideas?

look like you will have until may 14th, 2014, after this date, this setup will be useless. google is turning off XMPP
 

JoLLyRoGer

Diamond Member
Aug 24, 2000
4,153
4
81
I just set up an Elastix 2.4 box and everything went smoothly. I followed the instructions exactly (I THINK!) and am able to make outgoing calls via my Google Voice number.

I have Zoiper 2.1.4 on my iPhone and registered it with the Elastix box, everything seems good there.

When I dial my GV number I don't get an incoming call on the iPhone. I've added an inbound route to Elastix.

I'm not sure how to troubleshoot this. I need to figure out if the problem is with the Elastix box or with the SIP client on my iPhone. Any help?

Thanks!

edit: I found a report summary:
Code:
Ext.  	User 	# Incoming Calls 	# Outgoing Calls 	Total time (Incoming Calls) 	Total time (Outgoing Calls) 	Details 
1001	561-xxx-xxxx	       0	        3	00h. 00m. 00s	00h. 00m. 14s	View

It's hard to format it but basically it's showing my outgoing calls but nothing incoming. Any ideas?

So a quick way to eliminate your SIP app, use something like SJ Softphone installed on another laptop/PC on your local LAN and provision it an extension in A*.. there are plenty of tutorials on how to do this.. then make sure you can dial between internal extensions (1001 to 1002 for example).

Assuming all that is good, double check your inbound route setup and DIDs (direct in dials) and make sure you have your desired extension you want to use to answer inbound calls associated as a destination.

If all that is good, then go to the CLI and enter asterisk debug mode (asterisk -vvvvvvv) place an inbound call to your asterisk box and post back the debug messages.

Also MAKE SURE nothing else (like another client on your phone.... or the GV app inside your gmail) is actively logged in and using your GV acct or your A* box will never receive the call.
 

leetwanker

Junior Member
Jan 14, 2014
4
0
66
Also MAKE SURE nothing else (like another client on your phone.... or the GV app inside your gmail) is actively logged in and using your GV acct or your A* box will never receive the call.

That's the first step I'm taking. I just activated a new GV account and am going to see if that solves the problem first.
 

leetwanker

Junior Member
Jan 14, 2014
4
0
66
Two issues I've found:

1) I've done 2 Elastix installs because I wanted to start fresh with the new GV account. Both times my Asterisk logs filled up with about 1400 pages of error messages like these:

Code:
Jan 14 16:22:30	WARNING	[2794] pbx.c:	
Context 'a2billing' tries to include nonexistent context 'a2billing_monitoring'
Jan 14 16:22:30	WARNING	[2794] pbx.c:	
Context 'default' tries to include nonexistent context 'ext-local'
Jan 14 16:22:30	WARNING	[2794] pbx.c:	
Context 'from-internal' tries to include nonexistent context 'bad-number'
Jan 14 16:22:30	WARNING	[2794] pbx.c:	
Context 'from-internal-xfer' tries to include nonexistent context 'parkedcalls'
Jan 14 16:22:30	WARNING	[2794] pbx.c:	
Context 'from-did-direct' tries to include nonexistent context 'ext-findmefollow'
Jan 14 16:22:30	WARNING	[2794] pbx.c:	
Context 'from-pstn' tries to include nonexistent context 'from-pstn-custom'

It makes it hard to do troubleshooting with all those in there. Not sure what's causing them.

2) I'm not sure if it's Asterisk or GV but I'm getting "All circuits are busy now. Please try your call again later" messages when I try to dial out. It only happened once on my first install. On the second I haven't been able to make an outgoing call yet.

Supposedly 6 pages of error messages were created when I try to make an outgoing call. Here's the page where the warnings start. I've edited out the phone number and GV account name.

Code:
Jan 14 17:32:33	WARNING	[4817] chan_gtalk.c:	
Could not find recipient.
Jan 14 17:32:33	WARNING	[4817] app_dial.c:	
Unable to create channel of type 'Gtalk' (cause 0 - Unknown)
Jan 14 17:32:33	WARNING	[4817] app_dial.c:	
Invalid timeout specified: 'tr'. Setting timeout to infinite
Jan 14 17:32:33	VERBOSE	[4817] app_dial.c:	
== Everyone is busy/congested at this time (1:0/0/1)
Jan 14 17:32:33	VERBOSE	[4817] pbx.c:	
-- Executing [1561xxxxxxx@googlevoice-gvaccountname:2] NoOp("Local/1561xxxxxxx@googlevoice-gvaccountname-00000010;2", "GoogleVoice Call to 1561xxxxxxx failed") in new stack
Jan 14 17:32:33	VERBOSE	[4817] pbx.c:	
-- Auto fallthrough, channel 'Local/1561xxxxxxx@googlevoice-gvaccountname-00000010;2' status is 'CHANUNAVAIL'
Jan 14 17:32:33	VERBOSE	[4816] app_dial.c:	
-- Local/1561xxxxxxx@googlevoice-gvaccountname-00000010;1 is circuit-busy
Jan 14 17:32:33	VERBOSE	[4816] app_dial.c:	
== Everyone is busy/congested at this time (1:0/1/0)
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s@macro-dialout-trunk:28] NoOp("SIP/1001-00000012", "Dial failed for some reason with DIALSTATUS = CONGESTION and HANGUPCAUSE = 0") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s@macro-dialout-trunk:29] Goto("SIP/1001-00000012", "s-CONGESTION,1") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Goto (macro-dialout-trunk,s-CONGESTION,1)
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s-CONGESTION@macro-dialout-trunk:1] Set("SIP/1001-00000012", "RC=0") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s-CONGESTION@macro-dialout-trunk:2] Goto("SIP/1001-00000012", "0,1") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Goto (macro-dialout-trunk,0,1)
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [0@macro-dialout-trunk:1] Goto("SIP/1001-00000012", "continue,1") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Goto (macro-dialout-trunk,continue,1)
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [continue@macro-dialout-trunk:1] GotoIf("SIP/1001-00000012", "1?noreport") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Goto (macro-dialout-trunk,continue,3)
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [continue@macro-dialout-trunk:3] NoOp("SIP/1001-00000012", "TRUNK Dial failed due to CONGESTION HANGUPCAUSE: 0 - failing through to other trunks") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [continue@macro-dialout-trunk:4] Set("SIP/1001-00000012", "CALLERID(number)=1001") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [5617902906@from-internal:7] Macro("SIP/1001-00000012", "outisbusy,") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s@macro-outisbusy:1] Progress("SIP/1001-00000012", "") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s@macro-outisbusy:2] GotoIf("SIP/1001-00000012", "0?emergency,1") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s@macro-outisbusy:3] GotoIf("SIP/1001-00000012", "0?intracompany,1") in new stack
Jan 14 17:32:33	VERBOSE	[4816] pbx.c:	
-- Executing [s@macro-outisbusy:4] Playback("SIP/1001-00000012", "all-circuits-busy-now&pls-try-call-later, noanswer") in new stack
Jan 14 17:32:33	VERBOSE	[4816] file.c:	
-- <SIP/1001-00000012> Playing 'all-circuits-busy-now.gsm' (language 'en')
Jan 14 17:32:33	WARNING	[4817] channel.c:	
Prodding channel 'Local/1561xxxxxxx@googlevoice-gvaccountname-00000010;2' failed
Jan 14 17:32:33	VERBOSE	[4817] pbx.c:	
-- Executing [h@googlevoice-gvaccountname:1] Hangup("Local/1561xxxxxxx@googlevoice-gvaccountname-00000010;2", "") in new stack
Jan 14 17:32:33	VERBOSE	[4817] pbx.c:	
== Spawn extension (googlevoice-gvaccountname, h, 1) exited non-zero on 'Local/1561xxxxxxx@googlevoice-gvaccountname-00000010;2'
Jan 14 17:32:35	VERBOSE	[4816] file.c:	
-- <SIP/1001-00000012> Playing 'pls-try-call-later.gsm' (language 'en')

Did I screw something up this time or is it a GV issue?

Thanks!
 
Last edited:

leetwanker

Junior Member
Jan 14, 2014
4
0
66
I found that my gtalk.conf and extensions.conf were missing some lines. I pasted in some config info that I found on the web and now everything seems to be working.
 

JoLLyRoGer

Diamond Member
Aug 24, 2000
4,153
4
81
I found that my gtalk.conf and extensions.conf were missing some lines. I pasted in some config info that I found on the web and now everything seems to be working.

Glad you got it sorted out! :) I was going to mention extensions.conf and to check and make sure something wasn't commented out inadvertently based on all of the missing context error messages.
 

skyeyedoc

Junior Member
Feb 12, 2014
1
0
0
First, your tutorial is just brilliant: clear and precise. I can't thank you enough for posting it, and continuing to respond in the forum.

I had no serious difficulties setting up my Elastix box, and following your recipe for an initial set up. I've only tested my in and outbound calling using the 3CX softphone client software on my desktop Windows 7 system.

Does this configuration for using gv DID inbound and Trunk outbound depend on Google Chat continuing to use XMPP? My understanding is that google will turn off that protocol on May 15th of this year? So, I'm guessing that this development Elastix box will need a different configuration going forward from there. Or am I mistaken?

I've begun looking at using a python method that pre-dates the XMPP gv patches, but am so new to Elastix/Asterisk telephony that I really don't know what I'm doing yet. I was hoping you've followed the same leads, and might have tutorial in the works that applies to the Elastix installation on CentOS. The notes I've seen are here: http://tech.iprock.com/?p=9784

That post is specifict to Asterisk1.6 and 1.8: If you can point me towards some notes for noobs on how to correctly install and configure a custom trunk for an Elastix/FreePBX box like the one you've described here, it would be a huge help, and I'll give it a try, and repost my notes to this forum. Hopefully, it will be a success.

Thanks again for sharing what you've accomplished.
 

chjno

Junior Member
Oct 20, 2016
1
0
1
I found that my gtalk.conf and extensions.conf were missing some lines. I pasted in some config info that I found on the web and now everything seems to be working.

I'm getting the same "all circuits are busy" message. Would you mind sharing how you fixed your issues?

Thanks!
 

corkyg

Elite Member | Peripherals
Super Moderator
Mar 4, 2000
27,370
239
106
Good luck in getting a response from a 2.5 year old post in a 4 year old thread.
 

MMHunt

Junior Member
Jul 1, 2017
2
0
1
This is really awesome, but is there any chance this could be updated? It's originally from 2012, quite a bit has changed since then...
 

ericlp

Diamond Member
Dec 24, 2000
6,137
225
106
This is really awesome, but is there any chance this could be updated? It's originally from 2012, quite a bit has changed since then...

Yeah you can hack a Magic Jack to do this now days. But that too was a few years back. So, maybe a PI or possibly even a router could pull it off. But, why would you want to do it with cheap ass talk cell phone plans, unless you didn't leave the house? Or were just bored?
 

MMHunt

Junior Member
Jul 1, 2017
2
0
1
I'm setting up a lab situation, working on my Elastix skills. When I went to follow your tutorial, I ran into some issues:

http://www.freedoh.net/googlevoice.html seems to be DOA. Google has recently radically changed their whole "gchat" suite, so this will probably radially affect the rest of the tutorials. They've pushed off TLS too, and have disables much of the xmpp GV functionality.

On #2, you now have to select the "classic gvoice interface" to get to those settings, as they don't appear in the new UI.

With all the changes, getting Asterisk and GV to work together now may be impossible. It's outside my technical skills mostly with all the changes...I can get through a tutorial, and am semi-skilled in Linux, but the deep-dive required to get it working again...yeah.