outbound calls via Google Voice

djsullie
Posts: 186
Member Since:
2008-02-16

Nerdvittles published a article on how to make free outbound calls via google voice and Asterisk. Has anyone tried this yet? If so was it successful?

I have followed the instructions but can seem to get it to work. It looks like outbound calls is fine I even see the call setting up in a confrence bridge but the far end never rings..

Also I am a little confused on why do I need two DIDs set up with my google voice account. This could be why it isnt working. but I have one DID poined to a meetme confrence bridge. What do I do with the 2nd DID?

Thanks
Dan



ghost1
Posts: 28
Member Since:
2009-01-02
I'm with Dan on this. I

I'm with Dan on this. I spent a good portion of yesterday trying to get this to work and no go. I can dial out but it never connects to the actual recipient. Panel is showing the conferencing connecting as it is supposed to be but nothing happens from there, just MOH (which I understand to be a disconnect) - but the timer for the call in progress keeps running.

--

using tbCE version 2.6.2.3
grandstream 200 and polycom 330 phones
paired with lumenvox asr



Obzorg
Posts: 55
Member Since:
2009-06-23
I was able to get it working

I was able to get it working using Park() but I don't like that option because it's not "transparent" since it results in Asterisk reading you the slot number the call is parked on followed by a moment of MOH when you dial out. I don't understand AGI and Dialplans well enough to figure out how to use the Bridge() option.

NerdVittles has promised a "refined" version of the GV Dialout solution soon. This has been a great learning experience for me so far... I just wish I could find someone to explain how to get it working using Bridge() instead of Park() or a MeetMe conference since I get the impression that an understanding of that would lead to a better understanding of dialplans in general.



djsullie
Posts: 186
Member Since:
2008-02-16
so did you follow the steps

so did you follow the steps in nerdvittles and then instead of sending the call to a confrence bridge you set them to park? Do you need two forwarding numbers in google. That part is what confused me.



SkykingOH
Posts: 9537
Member Since:
2007-12-17
bridge() joins the specified

bridge() joins the specified channel to the current channel.

This little code example would dial SIP extension 200 and then bridge Skype 42424242424

exten => s,1,Wait(2)
exten => s,n,Dial(sip/200)
exten => s,n,Wait(2)
exten => s,n,Bridge(Skype/42242424242)
exten => s,n,Hangup

Have you checked out the eBook at www.asteriskdocs.org? It is a huge help in understanding Asterisk extension programming.

--

Scott

aka "Skyking"



Obzorg
Posts: 55
Member Since:
2009-06-23
Thank you for the

Thank you for the information... I will go read that eBook.

The part that confuses me with using Bridge() for the GV solution is that I'm not sure how to specify the channel I want to bridge. I'm going to go look at the eBook and hopefully I will find my answer there. I'll report back when I either have an answer or more targeted questions.



ServaLan
Posts: 176
Member Since:
2009-07-12
The Starfish ...

...is a bloody good book, I managed to pick up a hard copy from eBay for a reasonable price.

I always find a physical book more satisfying although it is easier to find things in the electronic version. But then again, you can have the book next to the screen which you can't do with the electronic one...

Anyway, good book, worth getting yourself a copy.

--

Give a man a fish and he'll use trixbox
Teach a man to fish and he'll use asterisk instead

Give a man a fish and he'll come back whenever he wants fish
Call him a twit and he'll get sarcastic and defensive...
then he'll ask for yet another fish!



SkykingOH
Posts: 9537
Member Since:
2007-12-17
Quote: I always find a
Quote:
I always find a physical book more satisfying

It's also easier than carrying your laptop into the john.

--

Scott

aka "Skyking"



Obzorg
Posts: 55
Member Since:
2009-06-23
I have a Sony Reader which

I have a Sony Reader which is nice for eBooks like this...

I see that "Asterisk: The Future of Telephony 2nd Edition" covers Asterisk 1.4. If I understand things correctly, Bridge() is new to Asterisk 1.6. I'll still go through the book to learn what I can and maybe it'll give me enough information to fill in the blanks so I can get a more complete picture.



SkykingOH
Posts: 9537
Member Since:
2007-12-17
That's why I mentioned the

That's why I mentioned the book as a foundation. Once you know how to program Asterisk extensions additional applications and functions are simple to integrate. Many modules and add-ins provide functions.

From the CLI:

To see a list of applications 'core show applications'

To see the syntax for a specific application 'core show application dial'

--

Scott

aka "Skyking"



Obzorg
Posts: 55
Member Since:
2009-06-23
Teach a Man to Fish...

NOTE: the forum software is mangling the URL in the wget line in the script below. Be wary of that when you do your cut-n-paste.
And that was exactly what I needed in order to figure it out.

Below are instructions for getting Google Voice Dialout working under TB CE 2.8. Please keep in mind, I installed trixbox on June 20th. Before that, I had never touched an Asterisk system before. These steps worked for me but it's quite possible (okay, it's LIKELY) that this is NOT the best way to do this. It is, at least, a better option for Asterisk 1.6 users than the MeetMe conference option or the Park() option. I'm doing this with a Gizmo5 trunk.

1) Set up a Gizmo5 trunk and set its context as "context=gv-inbound"
2) Create a Custom Trunk with the following Custom Dial String:
local/$OUTNUM$@gv-outbound
3) Set up an outbound route to use that Custom Trunk.
4) Save the following script to a file and then run it:

#!/bin/bash

clear
echo "This script installs Google Voice on your Asterisk 1.6 system."
echo "WARNING: No error checking is provided."
echo "By using this script, you agree to assume ALL RISK."
echo "NO WARRANTY, EXPRESS OR IMPLIED, OF ANY KIND IS PROVIDED."
echo " "
echo "If you make a typo while entering values below, press Ctrl-C and start over."
echo " "
echo "Your Google Voice entries are stored in /etc/asterisk/extensions_custom.conf."
echo "Edit that file and reload your Asterisk dialplan if you make future changes."
echo " "
echo -n "Google Voice email address: "
read acctname
echo "ACCTNAME: $acctname"
echo -n "Google Voice password: "
read acctpass
echo "ACCTPASS: $acctpass"
echo -n "10-digit Google Voice Phone Number (e.g. 6127654321): "
read gvnum
echo "GVNUMBER: $gvnum"
echo -n "11-digit Ring Back DID (e.g. 16781234567): "
read ringback
echo "RINGBACK: $ringback"
echo " "
echo "We're now ready to begin the installation."
echo "Check your entries above and then press Enter key to proceed."
echo "Or press Ctrl-C to abort and try again."
read readysetgo
clear
echo "Installing Google Voice support for Asterisk 1.6. One moment please..."
echo " "

echo " " >> /etc/asterisk/extensions_custom.conf
echo "[gv-inbound]" >> /etc/asterisk/extensions_custom.conf
echo "exten => s,1,Set(DID_EXTEN=\${SIP_HEADER(To):5})" >> /etc/asterisk/extensions_custom.conf
echo "exten => s,n,Set(DID_EXTEN=\${CUT(DID_EXTEN,@,1)})" >> /etc/asterisk/extensions_custom.conf
echo "exten => s,n,GotoIf(\$[\${CALLERID(num)} = $gvnum]?:normalcall)" >> /etc/asterisk/extensions_custom.conf
echo "exten => s,n,NoCDR()" >> /etc/asterisk/extensions_custom.conf
echo "exten => s,n,Bridge(\${DB_DELETE(gv_dialout/channel)})" >> /etc/asterisk/extensions_custom.conf
echo "exten => s,n(normalcall),Goto(from-trunk,\${DID_EXTEN},1)" >> /etc/asterisk/extensions_custom.conf
echo " " >> /etc/asterisk/extensions_custom.conf
echo "[gv-outbound]" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,1,Wait(1)" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,n,Set(ACCTNAME=$acctname)" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,n,Set(ACCTPASS=$acctpass)" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,n,Set(RINGBACK=$ringback)" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,n,System(gvoice -e \${ACCTNAME} -p \${ACCTPASS} call \${EXTEN} \${RINGBACK})" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,n,Set(DB(gv_dialout/channel)=\${CHANNEL})" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,n,Wait(5)" >> /etc/asterisk/extensions_custom.conf
echo "exten => _X.,n,Hangup" >> /etc/asterisk/extensions_custom.conf
echo " " >> /etc/asterisk/extensions_custom.conf

echo "Reloading Asterisk dialplan..."
asterisk -rx "dialplan reload"
echo " "

echo "Installing Python add-ons..."
cd /root
yum -y install python-setuptools
easy_install simplejson

echo " "
echo "Installing pygooglevoice..."

wget <a href="http://pygooglevoice.googlecode.com/files/pygooglevoice-0.2.tar.gz" title="http://pygooglevoice.googlecode.com/files/pygooglevoice-0.2.tar.gz">http://pygooglevoice.googlecode.com/files/pygooglevoice-0.2.tar.g...</a>
tar zxvf pygooglevoice-0.2.tar.gz

cd pygooglevoice-0.2
python setup.py install

sed -i 's|    help(|#    help(|' /usr/bin/gvoice

echo " "
echo "Installation script is finished. Do NOT run it again on this system!"

Most of this script was taken from the NerdVittles script.

Since I first posted this script, I have been able to test and debug it. I have edited this post to accommodate the changes that were required to make it work properly. It works fine with Gizmo5. I tried to get it working with sipgate but was unsuccessful (I didn't put in much time figuring out why).



sorvani
Posts: 163
Member Since:
2009-06-25
I'm trying to figure out how

I'm trying to figure out how to do this with an ipkall line. In this scenario, I do not have a trunk to set the context in like you do as your first step. I keep getting it halfway there.

Setting up things with the parking lot method works perfectly, but like you I'd rather make use of the new features.

--

Jared Busch
Office: Have 2.8.0.1 talking to 3 IPOffice403's.
Home: Have 2.8.0 with trunks from Vitelity, & CallWithUs.



Obzorg
Posts: 55
Member Since:
2009-06-23
I like using Gizmo5 for this

I like using Gizmo5 for this because of their "direct" connection to Google Voice for the inbound calls. Using sipgate or IPKall means you're going from your Asterisk box to the provider via SIP, then out over the PSTN to Google where it becomes SIP again and then back out over the PSTN to the destination. My understanding of the Google/Gizmo5 connection is that the call remains SIP from Google to Gizmo to Asterisk. Does this make any real difference? Eh. Maybe. I just know that it's a lot easier to configure. Heh.

What I like best about using Bridge() instead of Park() or MeetMe is that the experience is transparent. The only difference is that it takes an extra two seconds or so before you hear the call ringing. There's no MOH or Parking Lot number announcement. It behaves like any other outbound call.

I'll tinker some more this weekend to see if I can figure out why it wasn't working with my sipgate connection. I'll look into IPKall as well.



sorvani
Posts: 163
Member Since:
2009-06-25
I refuse to use Gizmo5

This is on my home box, which I don't have access to during the day.
I ran through the nerdvittles post and got everything working. Then decided to mess with things to use it the way you outlined except with ipkall instead. I did not spend a lot of time working on this last night, just wanted to see if I could make the bridging work for the same reasons you suggested. I refuse to use Gizmo5 for reasons not related to this GV scenario.

--

Jared Busch
Office: Have 2.8.0.1 talking to 3 IPOffice403's.
Home: Have 2.8.0 with trunks from Vitelity, & CallWithUs.



Obzorg
Posts: 55
Member Since:
2009-06-23
Okay, if you set up IPKall

Okay, if you set up IPKall the way he describes in his instructions, you've configured a Custom Destination that sends calls to "custom-park,s,1". Change that to "gv-inbound,s,1".

Then add this to extensions_custom.conf (replacing NXXNXXXXXX with your 10-digit Google Voice number):

[gv-inbound]
exten => s,1,Set(DID_EXTEN=${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=${CUT(DID_EXTEN,@,1)})
exten => s,n,GotoIf($[${CALLERID(num)} = NXXNXXXXXX]?:normalcall)
exten => s,n,NoCDR()
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)})
exten => s,n(normalcall),Goto(from-trunk,${DID_EXTEN},1)

Next, find the [custom-gv] context and comment out (or just delete) these lines:

exten => _X.,n,Playback(pls-wait-connect-call)
exten => _X.,n,Set(PARKINGEXTEN=\${CALLPARK})
exten => _X.,n,Park()

Then add these lines to the end of the [custom-gv] context:

exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL})
exten => _X.,n,Wait(5)
exten => _X.,n,Hangup

I think that will work. Let me know how it goes.



sorvani
Posts: 163
Member Since:
2009-06-25
I forgot about the Custom Destination

NOTE: the forum software is mangling the URL in the wget line in the script below. Copy/type that line carefully.

Thanks for pointing that back out to me. I could not find where it was calling the context.

Here is my working setup for anyone who wants to use an ipkall number set up with the asterisk 1.6 bridge function. This is all courtesy of Nerd Vittles, Obzorg, Asterisk 1.6, ipkall and of course Google.

These instructions assume that you have successfully set up ipkall as instructed in this Nerd Vittles post.

Log in to SSH or go to the console to enter the follow commands

cd /root
yum -y install python-setuptools
easy_install simplejson

wget <a href="http://pygooglevoice.googlecode.com/files/pygooglevoice-0.2.tar.gz" title="http://pygooglevoice.googlecode.com/files/pygooglevoice-0.2.tar.gz">http://pygooglevoice.googlecode.com/files/pygooglevoice-0.2.tar.g...</a>

cd pygooglevoice-0.2
python setup.py install

sed -i 's|    help(|#    help(|' /usr/bin/gvoice

In FreePBX/trixbox
Trunk:

Add Custom Trunk, leave everything blank except
Custom Dial String: local/$OUTNUM$@gv-outbound

Outbound Route:

Add Route, leave everything blank/default except
Route Name: Google Voice
Dial Pattern: 48|NXXNXXXXXX
Trunk Sequence: local/$OUTNUM$@gv-outbound

Custom Destination:

Add Custom Destination
Custom Destination: gv-inbound,s,1
Description: GV-Inbound

Inbound Routes:

Add Incoming Route, leave everything blank/default except
Description: ipkall for GV
DID: ipkall <== this is whatever your set the SIP Phone Number to on the ipkall website.
Custom Destinations: GV-Inbound

Add the following to extensions_custom.conf

[gv-outbound]
exten => _X.,1,Wait(1)
exten => _X.,n,Set(ACCTNAME=gvemail) ;<== Your Google Voice email
exten => _X.,n,Set(ACCTPASS=gvpassword) ;<== Your Google Voice password
exten => _X.,n,Set(RINGBACK=1NXXNXXXXXXX) ;<== Your Google Voice number with a leading 1
exten => _X.,n,System(gvoice -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK})
exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL})
exten => _X.,n,Wait(5)
exten => _X.,n,Hangup

[gv-inbound]
exten => s,1,Set(DID_EXTEN=\${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=\${CUT(DID_EXTEN,@,1)})
exten => s,n,GotoIf(\$[\${CALLERID(num)} = NXXNXXXXXX]?:normalcall) ;<==Your Google Voice number no leading 1
exten => s,n,NoCDR()
exten => s,n,Bridge(\${DB_DELETE(gv_dialout/channel)})
exten => s,n(normalcall),Goto(from-trunk,\${DID_EXTEN},1)
--

Jared Busch
Office: Have 2.8.0.1 talking to 3 IPOffice403's.
Home: Have 2.8.0 with trunks from Vitelity, & CallWithUs.



sorvani
Posts: 163
Member Since:
2009-06-25
wtf is up with the board

wtf is up with the board trying to put a wrapper around the wget url in my [code ] tags

--

Jared Busch
Office: Have 2.8.0.1 talking to 3 IPOffice403's.
Home: Have 2.8.0 with trunks from Vitelity, & CallWithUs.



SkykingOH
Posts: 9537
Member Since:
2007-12-17
I have noticed that

I have noticed that happening with this release of drupal.

Did you try the PHP tag instead of the code tag?

You may need to just link to pastebin.

Sorry for the trouble.

--

Scott

aka "Skyking"



sorvani
Posts: 163
Member Since:
2009-06-25
url bug

both tags have the problem, but it does not occur if the php or code opening or closing tag is on the same line as the link.
php tag


http://www.google.com
<a href="http://www.google.com" title="http://www.google.com">http://www.google.com</a>
http://www.google.com

code tag

http://www.google.com
<a href="http://www.google.com" title="http://www.google.com">http://www.google.com</a>
http://www.google.com
--

Jared Busch
Office: Have 2.8.0.1 talking to 3 IPOffice403's.
Home: Have 2.8.0 with trunks from Vitelity, & CallWithUs.



UncleWard
Posts: 358
Member Since:
2006-05-31
Nice!

Great job. We'll add the 1.6 bridge setup to the Nerd Vittles article so that it's all in one place for future readers. Thanks!!



Obzorg
Posts: 55
Member Since:
2009-06-23
Something that put me off

Something that put me off about the IPKall stuff is the need to add more custom stuff to config files for the incoming SIP connection. But this thread seems to imply you can avoid that by using IAX instead of SIP for IPKall since you can use authentication. Might be worth a try.



ghost1
Posts: 28
Member Since:
2009-01-02
*61 weather, *62 wake-up calls

Has anyone else had the issue of *61 weather forecast and *62 wake-up call ceasing to work once the GV script from Nerdvittles was run? I had to restore my machine to a back-up from prior to adding this script before either of those would work again.

--

using tbCE version 2.6.2.3
grandstream 200 and polycom 330 phones
paired with lumenvox asr



ghost1
Posts: 28
Member Since:
2009-01-02
all circuits are busy at this time

I am getting an "all circuits ar busy at this time" recording when trying to dial out 48|mynumber. I've done all the steps listed above in the final version... when trying to paste sed -i 's| help(|# help(|' /usr/bin/gvoice into my SSH it gave me all kinda gibberish, however. New to RedHat Linux stuff...

--

using tbCE version 2.6.2.3
grandstream 200 and polycom 330 phones
paired with lumenvox asr



tnk
Posts: 2
Member Since:
2009-08-16
Same problem - all circuits are busy

Have same problem as ghost1. (Trixbox 2.8.01 & Grandsream HandyTone 502)

If I call out 48|NxxNxxxxx I get "all circuits are busy". The log shows a call from the right extension and with the right destination, which results in NO ANSWER disposition. No incoming call (i.e. callback from google) is registered by trixbox log and no outgoing call is registered by google voice log.

However, I can get command "gvoice -e xxx@gmail.com -p xxxxx call NxxNxxxxx NxxNxxxxx" successfully executed from the system CLI and can receive the resulting call from google voice on my trixbox if I replace Incoming Route "Custom Destinations: GV-Inbound" by a regular local extension. If, at the moment of the call, I pick up that extension google voice connects OK. If I change back to "Custom Destinations: GV-Inbound" I can not connect and no incoming call is registered in the log. However, System Status panel still shows "total active calls: 1" and "total active channels 1" as the result of the CLI gvoice command execution.

Looks like something might be wrong with the integration of the gv-outbound and gv-inbound scripts with asterisk. Any help would be greatly appreciated.



sorvani
Posts: 163
Member Since:
2009-06-25
ghost, you need to be

ghost, you need to be careful on the spacing of the sed command. sed is a find/replace command, if you have the spacing wrong, you will be find/replacing the wrong information.

The information in my post was pulled directly from the Nerdvittles.com install script. I simply did not want to run a script, preferring to change everything manually.

--

Jared Busch
Office: Have 2.8.0.1 talking to 3 IPOffice403's.
Home: Have 2.8.0 with trunks from Vitelity, & CallWithUs.



tnk
Posts: 2
Member Since:
2009-08-16
RESOLVED - "all circuits are busy" problem

I think I was able to resolve the "all circuits are busy" problem described in my previous message (tnk, 08/16/09). I also think it is the same problem that ghost1 mentioned in his post of 08/15/09.

The issue turns out to be really simple, it is a typo in the [gv-outbound] script that sorvani posted on 08/13/09. Instead of:

exten => _X.,n,Set(RINGBACK=1NXXNXXXXXXX) ;

one has to have:

exten => _X.,n,Set(RINGBACK=NXXNXXXXXXX) ;

This, of cause, is rather obvious since the RINGBACK variable is the one that is transmitted by the gvoice script to the google voice server to initiate the call back. It has to have a value equal to one of the callback numbers that you've registered with your google voice account.

The other issue that I have encountered has to do with the [gv-inbound] script. I wanted all the incoming external calls to be screened to see whether they are a google voice callback or a regular call. In case of a regular call I wanted them to be always redirected to the same predetermined route. So, in [gv-inbound] I had to change:

exten => s,n(normalcall),Goto(from-trunk,\${DID_EXTEN},1)

to

exten => s,n(normalcall),Goto(from-trunk,XXXX,1)

where XXXX is the extension to which your regular calls will be redirected. For this to work you have to add an Inbound Route in FreePBX to handle incoming calls to XXXX. Click Setup, then Inbound Routes, then Add Incoming Route. For the DID, enter XXXX. For the destination, choose an extension, ring group, or IVR to which you want to pass these calls.

This approach works nicely with the SIPGate DID as well. The only thing I had to do is to create "catch all" anyCID/anyDID Inbound Route and select custom destinations: GV-Inbound.

Hope this helps.



thomashang
Posts: 26
Member Since:
2007-08-25
"all circuits are busy" problem when use IPKALL DID number

For whom want to used GoogleVoice with DID of IPKALL number on Trixbox 2.8.0.1.

at sip_custum.conf
Add
context=from-trunk

make sure you can call google number via ipkall to your trixbox with exten that you put on ipkall acount.

and follow all step that "sorvani" post on this page
only need to change the RINGBACK phone number from google voice number to ipkall number as :

from
exten => _X.,n,Set(RINGBACK=1NXXNXXXXXXX) ; to
exten => _X.,n,Set(RINGBACK=14252222222) ;

It will work.

enjoy freedom of free

ps: put google voice number at Inbound Caller ID: NxxNxxNxxx at add custum_Trunk step.(for incoming call)



ghost1
Posts: 28
Member Since:
2009-01-02
Thomas, I can do incoming no

Thomas, I can do incoming no problem, works like a charm. Still getting the annoying "all circuits are busy now" admonition when trying 48|NxxNxxXxxx. Is there any log or command I can run to show you guys what I'm either missing, have screwed up, etc?

Also, I'm still having issue with the sed command. If I were more fluent in Linux I'd prob know more about how to run that string listed in the directions above but I'm a newb with it.

--

using tbCE version 2.6.2.3
grandstream 200 and polycom 330 phones
paired with lumenvox asr



thomashang
Posts: 26
Member Since:
2007-08-25
Only asterisk 1.6 on tb 2.8 have Bridge function

You can't get it work on your tbce version 2.6.2.3
because tb 2.6 work under asterisk 1.4 without support Bridge function.
you have 2 choice.
1. Download tbce 2.8.0.1 clean install.
2. or remain use tbce 2.6.2.3 and follow with this link provide by Nerd Vittles.
http://nerdvittles.com/?m=20090805

SED command on this forum only put "#" sign on front of 2nd last statment of file ( /usr/bin/gvoice).

try your best to understand linux command line function.



mastic
Posts: 1
Member Since:
2009-10-13
How To: Multiple GV Trunks

Some comments about what I've found in getting this to work to my liking. Hopefully this will be of help to others:

1. Make sure your setup makes it easy to upgrade pygooglevoice. Google has changed its protocol at least once since this tutorial was written prompting an upgrade to the pygooglevoice script. As of this writing the current version is 0.4. For my setup, I've elected to get the source directly using 'hg' and rebuilding anytime there is an update. Hopefully in future revisions there won't be any changes necessary to the asterisk scripts and I can continue to build the gvoice binary and libs independently and drop them in place. The idea is to avoid having to run the 'asterisk' install script included in the package as it will overwrite the custom changes made in the steps below.

2. Following this tutorial, when a trunk's context is set to 'gv-inbound' any incoming call on that trunk will start with this [gv-inbound] custom section first. Consequently the Inbound Routes configured in freePBX will not be considered until the test for the google voice caller ID fails and the jump to 'from-trunk' occurs following this line in extensions_custom.conf:
exten => s,n(normalcall),Goto(from-trunk,${DID_EXTEN},1)
So Inbound Routes should really only be used for deciding where calls should be routed once they're known not to be from the google voice CID. The 'gv-inbound' is the only location where the google voice CID test needs to take place. In other words it doesn't really make sense to create an inbound route that routes to the gv-inbound,s,1 custom destination.

3. Setting up more than one google voice on more than one trunk is fairly straight forward. Change the 'gv-inbound' section to the following:

[gv-inbound]
exten => s,1,Set(DID_EXTEN=${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=${CUT(DID_EXTEN,@,1)})
exten => s,n,GotoIf($[${CALLERID(num)} = XXXXXXXXX]?GV:)      ;<---One ore more of these lines when using 2 or more numbers
exten => s,n,GotoIf($[${CALLERID(num)} = XXXXXXXXX]?:normalcall) ;<---Final number should look like this
exten => s,n(GV),NoCDR()
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)})
exten => s,n(normalcall),Goto(from-trunk,${DID_EXTEN},1)

This just simply checks against a list of CIDs and when a match is found jumps to the bridging code. If no match is found it falls through to be handled by the from-trunk.

On the outbound side, I created a custom trunk for each GV account (e.g. gv-outbound-1 and gv-outbound-2) and added the following to extensions_custom.conf

[gv-dialout]
exten => _X.,1,System(gvoice -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK})
exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL})
exten => _X.,n,Wait(5)
exten => _X.,n,Hangup

[gv-outbound-1]
exten => _X.,1,Wait(1)
exten => _X.,n,Set(ACCTNAME=first_acct)
exten => _X.,n,Set(ACCTPASS='first_acct_passwd')
exten => _X.,n,Set(RINGBACK=XXXXXXXXXX)	;<--First accts trunk number
exten => _X.,n,Goto(gv-dialout,${EXTEN},1)

[gv-outbound-2]
exten => _X.,1,Wait(1)
exten => _X.,n,Set(ACCTNAME=second_acct)
exten => _X.,n,Set(ACCTPASS='second_acct_passwd')
exten => _X.,n,Set(RINGBACK=XXXXXXXXXX)	;<--second accts trunk number
exten => _X.,n,Goto(gv-dialout,${EXTEN},1)

Note the passwords are enclosed in single quotes. This was neccessary to handle special characters in the GV account password (e.g. $). It may work for spaces in the password as well but I haven't tested it.

I've done basic testing with this setup. Both lines appear to work well independently. I haven't tried concurrently connecting calls on each trunk.

A big thanks to everyone that contributed to this thread! It has been a great learning tool.



dobkin
Posts: 1
Member Since:
2009-10-14
Using a global variable instead of CALLERID for incoming calls

Instead of screening incoming calls for callerid to determine whether to bridge the call or not - you could set a global variable in gv-outbound and use this as a flag in gv-inbound to either bridge or not bridge the inbound call. That way it makes it easier to use multiple GV trunks, and allows normal incoming calls on GV (where you have the GV callerid set to the GV number).

I modified my script as follows:

[gv-inbound]
exten => s,1,Set(DID_EXTEN=\${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=\${CUT(DID_EXTEN,@,1)})
exten => s,n,GotoIf($["${BRIDGE}"="YES"]?:normalcall)
exten => s,n,GotoIf(\$[\${CALLERID(num)} = $gvnum]?:normalcall)
exten => s,n,NoCDR()
exten => s,n,Set(GLOBAL(BRIDGE)=NO) ; RESET global variable BRIDGE just before bridge occurs
exten => s,n,Bridge(\${DB_DELETE(gv_dialout/channel)})
exten => s,n,hangup
exten => s,n(normalcall),Goto(from-trunk,\${DID_EXTEN},1)

[gv-outbound]" >> /etc/asterisk/extensions_custom.conf
exten => _X.,1,Wait(1)
exten => _X.,n,Set(ACCTNAME=$acctname)
exten => _X.,n,Set(ACCTPASS=$acctpass)
exten => _X.,n,Set(RINGBACK=$ringback)
exten => _X.,n,System(gvoice -e \${ACCTNAME} -p \${ACCTPASS} call \${EXTEN} \${RINGBACK})
exten => _X.,n,Set(DB(gv_dialout/channel)=\${CHANNEL})
exten => _X.,n,Set(GLOBAL(BRIDGE)=YES
exten => _X.,n,Wait(10) ; Changed this from 5 to 10 to allow more time while waiting for incoming gv call
exten => _X.,n,Set(GLOBAL(BRIDGE)=NO ; RESET global variable BRIDGE in the event of timeout
exten => _X.,n,Hangup
exten => _X.,h,Set(GLOBAL(BRIDGE)=NO ; RESET global variable BRIDGE in the event of hangup



pcasado
Posts: 31
Member Since:
2007-04-24
exten => for gvoice -b -e

Hello, am hoping to find a solution for this problem , if someone knows or had experience this and could fix it, I will really appreciate your help and kindness...

First, I don't understand why the line :

exten => _X.,n,System(gvoice -b -e \${ACCTNAME} -p \${ACCTPASS} call \${EXTEN} \${RINGBACK})

is not working for me, I mean, it show well on the Asterisk CLI then it goes to the next step,

-- Executing [1NXXNXXXXXX@custom-gv:7] System("Local/1NXXNXXXXXX@custom-gv-caaf,2", "gvoice -b -e my@gmail.com -p my_gmail_pw call 1NXXNXXXXXX 1NXXNXXNXXX") in new stack
-- Executing [1NXXNXXXXXX@custom-gv:8] Set("Local/1NXXNXXXXXX@custom-gv-caaf,2", "PARKINGEXTEN=79") in new stack
-- Executing [1NXXNXXXXXX@custom-gv:9] Park("Local/1NXXNXXXXXX@custom-gv-caaf,2", "") in new stack
== Parked Local/1NXXNXXXXXX@custom-gv-caaf,2 on 79@parkedcalls. Will timeout back to extension [custom-gv] s, 1 in 30 seconds
-- Playing 'digits/7' (language 'en')
-- Playing 'digits/9' (language 'en')
-- Added extension '79' priority 1 to parkedcalls
-- Started music on hold, class 'default', on Local/1NXXNXXXXXX@custom-gv-caaf,2

1NXXNXXXXXX is the No. am trying to dial-out & 1NXXNXXNXXX is the No. that GV try to RINGBACK

It stays for ever there or at least I get tired listening the same "please hold while I try to connect... park #" over and over, but ...... (here is why I think this line in particular is not working for me) while I am waiting and watching in the Asterisk CLI the call in-progress, from a command shell I type " gvoice -b -e my@gmail.com -p my_gmail_pw call 1NXXNXXXXXX 1NXXNXXNXXX " and it place the call as it should... and because the extension is "parked" it connects.

I guess the pygooglevoice is well compiled and installed since I can place the call using the "gvoice" command from the shell

but why, inside the asterisk it cannot place the call ?, I see NO error message while is executing the script(s) on [custom-gv] and [custom-park] on extensions_custom.conf

Is there no other method besides than using "parking lot" on asterisk 1.4???? , since this only works fine if there is only ONE (1) user, since all calls redirects to ONE (1) destination which it only works for me if I use an extension and it don't if I use an IVR or some other destination otherwise all the inbound calls will get lost (I don't know, why but it happened, I tried using other destinations and calls get hang up).

Also, I tried using all the methods described here (for the extensions_custom.conf) and none it worked for me, on *1.4 (tb-2.6.) and *1.6 (tb-2.8.) my google voice was working fine until they change the codes internally, since at that time there was no solution and I blew up the system trying to figure it out why or how to fix it (only the gvoice part, all the rest was working fine), so no update(s), re-compiling or re-installing the pygooglevoice worked for me... I also try installing the PBX-in-a-Flash in another system to try out and no luck to work... and now am stuck in a whole new system with asterisk 1.4 trying to make google voice dial-out to work for me...

Any help will be appreciated... Thanks in advance.



pcasado
Posts: 31
Member Since:
2007-04-24
finally GVoice dial-out works

From my previous post, now the Google voice dial-out works, finally.... I end up installing the trixbox 2.8, did NO updates whatsoever (only for FreePBX) and then just install the pygooglevoice and its needs.

I end up using the method that "Ozborg" described on 08/07/2009 and end up using Gizmo5 as RINGBACK, then redirecting from my GV # to to my IPKall, since the Gizmo5 CID is set in the incoming route to use the gv-inbound. I tried what is on "dubkin" post on 10/14/2009t but it did not work for me...

the other methods for the "extensions_custom.conf" worked as well but in some times with issues (calls get disconnected while dialing-out) I notice that this methods place the call, hang-up then ring back to the extension, so is not like a live session...

I have just one (1) question, when I dial-out using google from one of the extensions I can't not dial-out from other extension at the same time, I get the "all circuits are busy", does this means that using this lines for "extensions_custom.conf" I can place/dial-out only one (1) call at the same time?, so if someone already dial-out then others can't since the "line" is busy?

Thanks.



raz
Posts: 2
Member Since:
2009-11-08
is this solution still functional?

Hi!
After spending a whole week-end trying the different solutions presented in this thread, I had to give up.
I'm running a PBX in a flash server, with Asterisk 1.6.1.1 (so the Bridge() solution should work).

I have an ipkall account, that I set up to forward the calls to my Asterisk, using IAX2 (setup an IAX2 trunk as shown here http://www.trixbox.org/forums/trixbox-forums/sip-and-iax-trunks-and-providers/ipkall-configuration) - and it works fine when a catchall (anyDID/anyCID) incoming route directs the call to an extension.

I installed pygooglevoice, first version 0.2, then version 0.4, then from the repository, using hg.
It works from the command line, for example, I can call my cell phone from the extension where the ipkall is routed automatically, like this:

gvoice -e gmail.user -p gmail_password call ZZZZZZZZZZ 1YYYYYYYYYY

where ZZZZZZZZZZ is my cell phone,
1YYYYYYYYYY is my ipkall number and
XXXXXXXXXX is my Google Voice number
(I have added YYYYYYYYYY as my default forwarding number in Google Voice).
As a side note, in command line both YYYYYYYYYY and 1YYYYYYYYYY work - contrary to what some people reported before.

I have compiled an /etc/asterisk/extensions_custom.conf combining the solutions presented before in this thread.

[gv-inbound]
exten => s,1,Set(DID_EXTEN=${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=${CUT(DID_EXTEN,@,1)})
exten => s,n,Set(GVNUM=XXXXXXXXXX)
exten => s,n,GotoIf($["${BRIDGE}"="YES"]?:normalcall)
exten => s,n,GotoIf($["${CALLERID(number)}"="${GVNUM}"]?GV:normalcall)
exten => s,n(GV),NoCDR()
exten => s,n,Set(GLOBAL(BRIDGE)=NO) ; RESET global variable BRIDGE just before bridge occurs
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)})
exten => s,n,Hangup
exten => s,n(normalcall),Goto(from-trunk,${DID_EXTEN},1)

[gv-outbound]
exten => _X.,1,Wait(1)
exten => _X.,n,Set(ACCTNAME=gmail.user)
exten => _X.,n,Set(ACCTPASS=gmail.pass)
exten => _X.,n,Set(RINGBACK=1YYYYYYYYYY)
exten => _X.,n,System(gvoice -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK})
exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL})
exten => _X.,n,Set(GLOBAL(BRIDGE)=YES)
exten => _X.,n,Wait(10) ; Changed this from 5 to 10 to allow more time while waiting for incoming gv call
exten => _X.,n,Set(GLOBAL(BRIDGE)=NO) ; RESET global variable BRIDGE in the event of timeout
exten => _X.,n,Hangup
exten => _X.,h,Set(GLOBAL(BRIDGE)=NO) ; RESET global variable BRIDGE in the event of hangup

I created the custom destination "GV-inbound" as gv-inbound,s,1 in Tools - Custom Destinations and I modified the catchall incoming route to direct all incoming calls to GV-inbound.
Also, a custom trunk with the dial string "local/$OUTNUM$@gv-outbound" and an outbound route with a Dial Pattern of "48|NXXNXXXXXX" that uses the custom trunk.

Now, if I dial 48ZZZZZZZZZZ (my cell phone) I only get a busy tone in 10 seconds and I see in /var/log/asterisk/full these lines (the numbers are as explained above):

[2009-11-09 00:35:39] VERBOSE[4852] pbx.c: -- Executing [ZZZZZZZZZZ@gv-outbound:5] System("Local/ZZZZZZZZZZ@gv-outbound-57ab;2", "gvoice -e gmail.user -p gmail.pass call ZZZZZZZZZZ 1YYYYYYYYYY") in new stack
[2009-11-09 00:35:39] VERBOSE[4852] pbx.c: -- Executing [ZZZZZZZZZZ@gv-outbound:6] Set("Local/ZZZZZZZZZZ@gv-outbound-57ab;2", "DB(gv_dialout/channel)=Local/ZZZZZZZZZZ@gv-outbound-57ab;2") in new stack
[2009-11-09 00:35:39] VERBOSE[4852] pbx.c: -- Executing [ZZZZZZZZZZ@gv-outbound:7] Set("Local/ZZZZZZZZZZ@gv-outbound-57ab;2", "GLOBAL(BRIDGE)=YES") in new stack
[2009-11-09 00:35:39] VERBOSE[4852] pbx.c: == Setting global variable 'BRIDGE' to 'YES'
[2009-11-09 00:35:39] VERBOSE[4852] pbx.c: -- Executing [ZZZZZZZZZZ@gv-outbound:8] Wait("Local/ZZZZZZZZZZ@gv-outbound-57ab;2", "10") in new stack
[2009-11-09 00:35:49] VERBOSE[4852] pbx.c: -- Executing [ZZZZZZZZZZ@gv-outbound:9] Set("Local/ZZZZZZZZZZ@gv-outbound-57ab;2", "GLOBAL(BRIDGE)=NO") in new stack
[2009-11-09 00:35:49] VERBOSE[4852] pbx.c: == Setting global variable 'BRIDGE' to 'NO'
[2009-11-09 00:35:49] VERBOSE[4852] pbx.c: -- Executing [ZZZZZZZZZZ@gv-outbound:10] Hangup("Local/ZZZZZZZZZZ@gv-outbound-57ab;2", "") in new stack
[2009-11-09 00:35:49] VERBOSE[4852] pbx.c: == Spawn extension (gv-outbound, ZZZZZZZZZZ, 10) exited non-zero on 'Local/ZZZZZZZZZZ@gv-outbound-57ab;2'
[2009-11-09 00:35:49] VERBOSE[4850] app_dial.c: -- No one is available to answer at this time (1:0/0/0)

Also, there is no call shown in Google Voice (as opposed to when I run gvoice from command line, when the calls show up) - also, I don't see any inbound call from Google Voice in the asterisk log.

This sounds similar with the problems that tnk and ghost1 had before - but contrary to what they reported, having the "1" in the RINGBACK number didn't solve the problem for me.

I suspect that the problem is running the gvoice inside asterisk - but it seems to be hard to debug as gvoice doesn't come with a verbose debug option.

I'm just curious - if the people that reported making this work (admittedly, on trixbox and with Gizmo5 or ipkall with SIP) are still having a functional system.
Thanks,
Raz



raz
Posts: 2
Member Since:
2009-11-08
problem solved - PYTHON_EGG_CACHE

Hi again,
It seems that the problem was that pygooglevoice needs to deploy a Python .egg package - simplejson and by default, in my centos 5.2 based PIAF it tried to do it in /root/.python-eggs/simplejson-2.0.9-py2.4-linux-i686.egg-tmp/simplejson/_speedups.so
Of course, /root/.python-eggs is not writable by the user asterisk - which is the user who the asterisk program is running as.

Adding this line after the gvoice System call in [gv-outbound] helped me find this issue:

exten => _X.,n,System(gvoice -b -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK})
exten => _X.,n,Verbose(0,$[SYSTEMSTATUS_is_${SYSTEMSTATUS}])

(it shows this line in /var/log/asterisk/full:
[2009-11-09 12:21:17] VERBOSE[8299] app_verbose.c: SYSTEMSTATUS_is_APPERROR

Also, stopping the asterisk and safe_asterisk processes and capturing the main console with:

killall safe_asterisk
killall asterisk
/usr/sbin/asterisk -f -U asterisk -G asterisk -vvvg -c

allows you to capture the problem - when you try to originate a call from a local extension by dialing 48YYYYYYYYYY, you see this:

  File "/usr/lib/python2.4/site-packages/pkg_resources.py", line 846, in extraction_error
    raise err
pkg_resources.ExtractionError: Can't extract file(s) to egg cache

The following error occurred while trying to extract file(s) to the Python egg
cache:

  [Errno 13] Permission denied: '/root/.python-eggs'

The Python egg cache directory is currently set to:

  /root/.python-eggs

Perhaps your account does not have write access to this directory?  You can
change the cache directory by setting the PYTHON_EGG_CACHE environment
variable to point to an accessible directory.

The solution that worked for me was to change the /usr/bin/gvoice script, by adding 2 lines (import os and os.environ):

#!/usr/bin/python
# EASY-INSTALL-SCRIPT: 'pygooglevoice==0.4','gvoice'
__requires__ = 'pygooglevoice==0.4'
import os
os.environ['PYTHON_EGG_CACHE'] = '/var/lib/asterisk/.python-eggs'
import pkg_resources
pkg_resources.run_script('pygooglevoice==0.4', 'gvoice')

Hope this will help others that try to set up gvoice - Asterisk integration.
Raz



ghost1
Posts: 28
Member Since:
2009-01-02
got it to work

I can't believe it but I got the Google Voice workaround to actually work. I followed a combination of this installation guide http://sphinxdoc.github.com/pygooglevoice/index.html and these instructions http://nerdvittles.com/?p=637 and used SIPgate.com rather than ipkall.com for the SIP line.

Works like a champ. I'm quite sure the look on my face when I dialed 48|NXXNXXXXXX and the call connected was priceless as I've been at this off and on since the first incarnation of this.

using tbCE version 2.6.2.3
grandstream 200 and polycom 330 phones
paired with lumenvox asr

--

using tbCE version 2.6.2.3
grandstream 200 and polycom 330 phones
paired with lumenvox asr



Ravindharan
Posts: 1
Member Since:
2010-02-25
conference bridge hung up

I am running Trixbox 2.8.0 CE and I had conference rooms setup fine. when a user accesses the conference bridge, it asks for the password and when i enter it hangs up.

Thanks and Regards
Ravi

--

Thanks and Regards
Ravi



obeliks
Posts: 877
Member Since:
2010-03-14
Working solution with asterisk 1.6

This is based on earlier posts in this thread with some bug fixes. I also used a guide from flynnsarcade.net - http://flynnsarcade.net/Google%20Voice%20Setup.pdf
I am using GV with Gizmo5 but plan on switching to an analog line once my SPA3102 arrives ( do not ask me why I need an analog line in my home)
Here is my extensions_custom.conf:

[gv-inbound]
exten => s,1,Verbose(Incoming call — ${SIP_HEADER(TO)} - CallerID=${CALLERID(num)} - $[GROUP_COUNT(bridge)]);debug info
exten => s,n,GotoIf($[GROUP_COUNT(gvbridge) = 1]?:normalcall) ;
exten => s,n,GotoIf($["${CALLERID(num)}" = "+1234567890"]?:normalcall) ; this is where you put your Google Voice number
exten => s,n,Set(GROUP()=gvbridge) ; GROUP_COUNT(bridge) should be 2 now
exten => s,n,NoCDR() ; remove callback CDR
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)}, p)
exten => s,n,System(bash -c 'HOME=~asterisk && gvoice --batch cancel') ; mostly in case local hanged up
exten => s,n,Hangup()
exten => s,n(normalcall),Goto(from-trunk,123456,1); will use an inbound route for this DID

[gv-outbound]
exten => _X.,1,Verbose(gvbridge - $[GROUP_COUNT(gvbridge)]); some debug info
exten => _X.,n,GotoIf($[GROUP_COUNT(gvbridge) = 0]?:gvinuse); only one call per GV account ;-(
exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL}) ; inbound needs this
exten => _X.,n,Set(GROUP()=gvbridge);
exten => _X.,n,System(bash -c 'HOME=~asterisk && gvoice --batch call ${EXTEN}'); fix the environment before running gvoice
exten => _X.,n,Wait(5) ; 5 secs should be plenty or you need better trunks
exten => _X.,n,Hangup()
exten => _X.,n(gvinuse), Macro(outisbusy)

My Google Voice credentials are stored in /var/lib/asterisk/.gvoice so no passwords in asterisk logs ;-)
You can create the file by running:
#su - asterisk -s /bin/bash -c 'HOME=~asterisk && gvoice call 12345678'

Setting HOME to the right value also takes care of the earlier problem, where user asterisk was trying to write to root's directory.
Let's hope the asterisk devs will fix this issue at some point, otherwise most of the System() calls will require ugly hacks.



jaminmc
Posts: 6
Member Since:
2010-03-12
Asterisk 1.6.0.22-samy-r60 - trixbox CE 2.8.0.3, with Ipkall

Ok, I have mine setup with a IAX2 trunk from ipkall. The annoying thing is, all unknown numbers seem to come from 2062040232, which messes with the way my script was working. (I just started getting that from my Google voice number today too.... So I rewrote the gv-inbound and gv-outbound. I only use the ipkall did for outgoing, as the Caller ID has been crazy lately. all Google voice numbers seem to loose their caller ID. my cell comes in fine... Anyways, I have my ipkall go strait to hold as long as the 2 caller id's of either my Google Voice number, or 2062040232. So here is what I did. I setup the stuff like the guide, but instead of directing the DID of ipkall to the gv-inbound, I did the two caller id numbers with the DID too (Otherwise the DID of 9696 wont work, and you will have a loop on your hands.... Since there are 2 different ones, It creates a global variable that directs whether or not I am placing a call. If I didn't place the call, then it sends the call out as being from trunk 9696, then you set how you want to route that. I basically put it the same place as my ipkall DID. I call it with another google voice number, and it routes right where it is supposed to.

Here is my modified code. By the way, obeliks, thank you soo much for the "bash -c 'HOME=~asterisk && gvoice..." I was pulling my hair out trying to get it to work right without that. If you could share how you modified /var/lib/asterisk/.gvoice, that would be awesome!

[gv-outbound]
exten => _X.,1,Set(DB(gv_dialout/channel)=${CHANNEL})
exten => _X.,n,Set(GLOBAL(GOOGDIALED)=1)
exten => _X.,n,System(bash -c 'HOME=~asterisk && gvoice -e YOUR_GOOGLE _VOICE_EMAIL -p YOUR_PASSWORD call ${EXTEN} YOUR_RINGBACK')
exten => _X.,n,Wait(10)
exten => _X.,n,Set(GLOBAL(GOOGDIALED)=0)
exten => _X.,n,Hangup

[gv-inbound]
exten => s,1,GotoIf($[${GOOGDIALED} = 1]?:normalcall)"
exten => s,n,Set(GLOBAL(GOOGDIALED)=0)
exten => s,n,Set(DID_EXTEN=${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=${CUT(DID_EXTEN,@,1)})
exten => s,n,NoCDR()
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)})
exten => s,n(normalcall),Goto(from-trunk,9696,1)

As you can see, I have it set the GOOGDIALED to 1 if it calls out, and if it fails to connect, then it sets it back to 0. I then have my CallWithUs account as the backup trunk. At .99 Cents per minute, it is a good deal. But free is even better :) Then on the inbound, if it isn't 1, it jumps to the normal call line, and that changed the trunk to 9696, and it routes the call from there. if it is one, the next line changes it to 0, and then it bridges the call.

A side note, I have tried to do more that one call on Google voice at once, and it fails. The Google voice doesn't initiate another call to my ipkall. So it isn't a replacement for a outgoing sip account, or sip trunk. Although, I just called it with all six of my lines, and they are all on hold now. Then I used my iSip on my iphone, and called the AT&T number going through google voice, and it worked. So I guess this means that you can get a cool DID from google voice, and have it go to your ipkall DID, and be set.... Although callerid from Google voice has been 2062040232 for all of these calls since around noonish eastern today. since all of these extensions are using ulaw, the processor use is on 2.3% on a P4 2.4 with only 512 megs of ram.

Besides the caller id issue, Ipkall is awesome!. I called it with all 6 of my lines at my office, and my cellphone. I wonder what the mas simultaneous lines is. Also, I know you aren't supposed to send faxes through voip, but I have been experimenting with it, and getting very good results. I am even on the east coast.

I even did this: I have a cheap HP all in one scanner-fax-inkjet printer, hooked up to a SPA-2102-SF hooked to my work network (Going through 2 100mbit switches) and connecting to my trixbox. I then have my trixbox setup with 2 ethernet cards. One is connected directly to my cablemodem (Time Warner businness 2mb up 7mb down with 5 static ip's) then I have my work router hooked to that, and a client network, and a guest wifi (WPA protected) hooked to that. Setup the trixbox because we are going to hook up our phone system we had at our other building that had 2 T1's run to it there, but here it would of cost too much to get them here, and we also scaled way down in the move too. Now we are going to need the capacity again, and to save lots of $$, I am going voip :) So I will be getting a Dual T1 card soon to play with.... Probably a month. When I do, I will also get a Netgear GS108T QOS switch, and set the trixbox as the highest priority, then my office net on normal, and the clients on low. I do have a gigabit card in my trizbox, but this switch isn't much more than the 100mb version.

Ok, Got sidetracked.... So after a grueling night lastnight, I got Asterfax setup to be able to send and receive faxes from any one of my SIP & IAx2 accounts. IT uses the fax detection pretty well. Granted I only tested it with my fax machine I have at my office that is connected to a POTS line from AT&T. It received faxes from my Google voice-ipkall combo nicely. It also sent just fine to my ipkall DID, and even our old companies number that is forwarded to me sipgate DID. (That just goes to a voicemail saying that the company is out of business, and where to sent mail, and to leave a message type thing.) Today I brought in a fresh SPA2102, and configured both lines. 1 - the all in one fax, and 2, I hooked up to our credit card machine. (Not supposed to work from what I hear) and it worked! Then I did the ultimate test. I sent a fax using google voice, through ipkall to call my AT&T DID that is forwarded to sipgate. and it worked!!!!!!! Got the fax delivered to my Email, and it looks perfect :)

So when our contract is up with AT&T for our business lines, we are going to cut them off. It is kind of sad to think of the 100 pair of copper telephone lines that come into this building, and only 2 will be used. (Someone renting space downstairs has one, and there is another that has a DSL that is the open WIFI for people that visit. the client WPA's one it the Plus network that the privileged clients get access too.)

So anyways, I have been shopping for a good SIP trunk that does IAX2. Some of these places don't seem too much cheaper that a real T1. I did find Unified Vox that looks real promising, but haven found really anything about them on Google. But $39.95 a month with unlimited inbound, unlimited concurrent calls, 2000 outbound, and $1 for ever additional DID sounds like a super deal to me. Granted after the 2000 minutes it is 2.9 cents per minute, that is where callwithus can come in at .99 cents per minute. The beauty of trixbox. You can mix up the trunks however you can imagine.

And to think it was only 1 week ago today that I discovered trixbox. I had been playing with sipsorcery for google voice before. but now it only goes down when I am messing with the trixbox :) My trixbox also seems more NAT friendly. With sipsorcery, I could only use my iphone through AT&T with gizmo5. Not sipgate, or ipcall, or even ipcomms. Anything in my trunks and enums workes perfectly through my iphone now. And to think, I am not even a Linux guy. Im a mac Guy. But hey, I am very familiar with the shell environment on it, and I have been using DD-wrt on my routers for years :)



obeliks
Posts: 877
Member Since:
2010-03-14
Content of .gvoice

A sample content of .gvoice file is listed on project's google code page:
http://code.google.com/p/pygooglevoice/source/browse/googlevoice/settings.py
[auth]
# Google Account email address (one associated w/ your Voice account)
email=
# Raw password used or login
password=
[gvoice]
# your callback number (no idea why they chose forwarding)
forwardingNumber=
# Default phoneType for your forwardingNumber as defined below
# 1 - Home
# 2 - Mobile
# 3 - Work
# 7 - Gizmo
phoneType=2



sjohnson
Posts: 4
Member Since:
2010-03-27
I've been trying all night

I've been trying all night to get this to work, but with no dice. I keep getting an 'all circuits are busy' message when dialing out. Here's my extensions_custom.conf:

[gv-inbound]
exten => s,1,Set(DID_EXTEN=${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=${CUT(DID_EXTEN,@,1)})
exten => s,n,GotoIf($[${CALLERID(num)} = 207956xxxx]?:normalcall)
exten => s,n,NoCDR()
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)})
exten => s,n,(normalcall),Goto(from-trunk,123456,1)

[gv-outbound]
exten => _X.,1,Wait(1)
exten => _X.,n,Set(ACCTNAME=xxxxx)
exten => _X.,n,Set(ACCTPASS=xxxxx)
exten => _X.,n,Set(RINGBACK=747474xxxx)
exten => _X.,n,System(gvoice -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK})
exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL})
exten => _X.,n,Set(GLOBAL(BRIDGE)=YES)
exten => _X.,n,Wait(10)
exten => _X.,n,Set(GLOBAL(BRIDGE)=NO)
exten => _X.,n,Hangup
exten => _X.,n,Set(GLOBAL(BRIDGE)=NO)


obeliks
Posts: 877
Member Since:
2010-03-14
Couple of problems with your

Couple of problems with your dialplan:

1. You need to set HOME variable before calling gvoice
2. You need to indicate the type of callback number to gvoice - for Gizmo5 the type is 7

and there is also a minor issue:

3. There are built-in functions in Asterisk which take care of decrementing variables when channel is destroyed:
GROUP() and GROUP_COUNT(). Use them instead of fiddling with global variables.

There is a complete working recipe in my earlier post in this thread.



sjohnson
Posts: 4
Member Since:
2010-03-27
Okay, so I was able run the

Okay, so I was able run the gvoice command from the command line and I got a call (needed that 7!). However, now when calling from the PBX I get two 'all circuits are busy now' messages immediately.

I've adapted your earlier config a bit, which now looks like this:

[gv-inbound]
exten => s,n,GotoIf($[GROUP_COUNT(gvbridge) = 1]?:normalcall) ;
exten => s,n,GotoIf($["${CALLERID(num)}" = "+1207956xxxx"]?:normalcall) ; this is where you put your Google Voice number
exten => s,n,Set(GROUP()=gvbridge) ; GROUP_COUNT(bridge) should be 2 now
exten => s,n,NoCDR() ; remove callback CDR
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)}, p)
exten => s,n,System(bash -c 'HOME=~asterisk && gvoice --batch cancel') ; mostly in case local hanged up
exten => s,n,Hangup()
exten => s,n(normalcall),Goto(from-trunk,123456,1); will use an inbound route for this DID

[gv-outbound]
exten => _X.,n,Set(ACCTNAME=xxxx)
exten => _X.,n,Set(ACCTPASS=xxxx)
exten => _X.,n,Set(RINGBACK=747474xxxx)
exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL}) ; inbound needs this
exten => _X.,n,Set(GROUP()=gvbridge);
exten => _X.,n,System(bash -c 'HOME=~asterisk && gvoice --batch -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK} 7');
exten => _X.,n,Wait(5) ; 5 secs should be plenty or you need better trunks
exten => _X.,n,Hangup()

I am able to receive incoming calls sent to my GV number, so that part of the config does seem to be working properly.



Stormwind
Posts: 1
Member Since:
2010-03-28
Asterisk + GV almost working, but caller voice echoed/not sent

Update #2:

I have worked around the problem by favoring alaw then ulaw in both the Asterisk and HT-503 configuration for the ATA. Very strange, but at least Google Voice outbound calling is working! :-)

In my sip_custom.conf included by sip.conf:
[HT503]
; ... lines removed
disallow=all
allow=alaw
allow=ulaw

Update #1:

The problem appears to be a combination of my Grandstream HT-503 ATA and Asterisk bridging causing the problem... When I call out on GV from iSip running on my wife's iPhone, it works fine! I think I'll try some different default codecs on my ATA, but I would have thought Asterisk would handle any codec issues via transcoding.

Original post:

Hi all,

Thanks to everyone for the Asterisk+Google Voice recipes!

I almost have it working with a plain Asterisk 1.6.2.6 install (not Trixbox), but I'm seeing one odd behavior: when the Google Voice incoming call (over Gizmo5) is bridged with the original line, the incoming voice from the callee works fine but the outgoing voice does not go to the callee (at first I thought it was being echoed back to the callee, but I just had the other phone too close).

Otherwise, when I call the Google Voice number it works correctly (incoming via SIP to Gizmo5) without this problem. When I run the gvoice command directly outside of Asterisk without bridging (so I have to answer the call from Google Voice manually), it also works correctly.

As you can probably tell, I'm stumped! :-) Any help from fellow Asterisk users would be appreciated.

My relevant extensions.conf sections, mostly from jaminmc's post:

[gv-outbound]
exten => _95X.,1,Set(DB(gv_dialout/channel)=${CHANNEL})
exten => _95X.,n,Set(GLOBAL(GOOGDIALED)=1)
exten => _95X.,n,System(bash -c 'HOME=~asterisk && /usr/bin/gvoice -b -e USERNAME -p PASSWORD call ${EXTEN:2} 1747GNUMBER 7')
exten => _95X.,n,Wait(10)
exten => _95X.,n,Set(GLOBAL(GOOGDIALED)=0)
exten => _95X.,n,Hangup

[gv-inbound]
exten => gv-inbound,1,Goto(gv-inbound,s,1)
exten => s,1,GotoIf($[${GOOGDIALED} = 1]?:normalcall)"
exten => s,n,Set(GLOBAL(GOOGDIALED)=0)
exten => s,n,Set(DID_EXTEN=${SIP_HEADER(To):5})
exten => s,n,Set(DID_EXTEN=${CUT(DID_EXTEN,@,1)})
exten => s,n,NoCDR()
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)})
exten => s,n,Hangup()
exten => s,n(normalcall),Goto(incoming,${EXTEN},1)



obeliks
Posts: 877
Member Since:
2010-03-14
@sjohnson Does ls -la

@sjohnson

Does ls -la /var/lib/asterisk show any files owned by root ?
If so, chown -R asterisk /var/lib/asterisk

you should also less -R /var/log/asterisk/full for clues



sjohnson
Posts: 4
Member Since:
2010-03-27
Here's where it falls apart

Here's where it falls apart in the log-

No such extension/context <number I dialed>@gv-outbound creating local channel
Unable to create channel of type 'local' (cause 0 - unknown)
Everyone is busy/congested at this time

Then it executes CHANUNAVAIL.



obeliks
Posts: 877
Member Since:
2010-03-14
One more problem in your

One more problem in your dialplan, you need to start numbering priorities from 1, not from n.

Do dialplan show gv-outbound to make sure it starts from 1.

Btw, why, oh why, you simply did not copy my recipe ???



sjohnson
Posts: 4
Member Since:
2010-03-27
I did copy your recipe

I did copy your recipe :)

Here's what I have now:

[gv-inbound]
exten => s,1,Verbose(Incoming call — ${SIP_HEADER(TO)} - CallerID=${CALLERID(num)} - $[GROUP_COUNT(bridge)]);debug info
exten => s,n,GotoIf($[GROUP_COUNT(gvbridge) = 1]?:normalcall) ;
exten => s,n,GotoIf($["${CALLERID(num)}" = "+1207956xxxx"]?:normalcall) ; this is where you put your Google Voice number
exten => s,n,Set(GROUP()=gvbridge) ; GROUP_COUNT(bridge) should be 2 now
exten => s,n,NoCDR() ; remove callback CDR
exten => s,n,Bridge(${DB_DELETE(gv_dialout/channel)}, p)
exten => s,n,System(bash -c 'HOME=~asterisk && gvoice --batch cancel') ; mostly in case local hanged up
exten => s,n,Hangup()
exten => s,n(normalcall),Goto(from-pstn,123456,1); will use an inbound route for this DID
[gv-outbound]
exten => _X.,1,Set(ACCTNAME=xx)
exten => _X.,n,Set(ACCTPASS=xx)
exten => _X.,n,Set(RINGBACK=747474xxxx)
exten => _X.,n,Verbose(gvbridge - $[GROUP_COUNT(gvbridge)]); some debug info
exten => _X.,n,GotoIf($[GROUP_COUNT(gvbridge) = 0]?:gvinuse); only one call per GV account ;-(
exten => _X.,n,Set(DB(gv_dialout/channel)=${CHANNEL}) ; inbound needs this
exten => _X.,n,Set(GROUP()=gvbridge);
exten => _X.,n,System(bash -c 'HOME=~asterisk && gvoice --batch -e ${ACCTNAME} -p ${ACCTPASS} call ${EXTEN} ${RINGBACK} 7'); fix the environment before running gvoice
exten => _X.,n,Wait(20) ; 5 secs should be plenty or you need better trunks
exten => _X.,n,Hangup()
exten => _X.,n(gvinuse), Macro(outisbusy)

No dice.

EDIT: Rebooted the server, there were a ton of 'stuck' calls. Guess what? It works! Thank you for all the help!



jason331
Posts: 9
Member Since:
2009-01-20
Can't seem to get it to work

Hi everyone,

After parsing through the instructions above and following NerdVittles' guide I can't seem to get this working properly. I am using SIPGate and Google Voice on TB 2.8.0.1. I call a long distance number and get the message "Please wait while I connect your call." I then hear "75" and some music on hold. After that I get a fast busy signal no matter what number I dial. When I dial my Google Voice number from any land line or cell I have it forwarded to my SIPGate account which then forwards to an extension in TrixBox.

Here's what my logs say:

[Jun 2 10:55:49] VERBOSE[2946] logger.c: == Using SIP RTP TOS bits 184
[Jun 2 10:55:49] VERBOSE[2946] logger.c: == Using SIP RTP CoS mark 5
[Jun 2 10:55:49] VERBOSE[2946] logger.c: == Using SIP VRTP TOS bits 136
[Jun 2 10:55:49] VERBOSE[2946] logger.c: == Using SIP VRTP CoS mark 6
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [NumberI'mDialing@from-internal:1] Macro("SIP/599-b7cf1cf0", "user-callerid,SKIPTTL,") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:1] Set("SIP/599-b7cf1cf0", "AMPUSER=599") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:2] GotoIf("SIP/599-b7cf1cf0", "0?report") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:3] ExecIf("SIP/599-b7cf1cf0", "1?Set(REALCALLERIDNUM=599)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:4] Set("SIP/599-b7cf1cf0", "AMPUSER=599") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:5] Set("SIP/599-b7cf1cf0", "AMPUSERCIDNAME=House Phones") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:6] GotoIf("SIP/599-b7cf1cf0", "0?report") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:7] Set("SIP/599-b7cf1cf0", "AMPUSERCID=599") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:8] Set("SIP/599-b7cf1cf0", "CALLERID(all)="House Phones" ") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:9] ExecIf("SIP/599-b7cf1cf0", "0?Set(CHANNEL(language)=)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:10] GotoIf("SIP/599-b7cf1cf0", "1?continue") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Goto (macro-user-callerid,s,19)
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-user-callerid:19] NoOp("SIP/599-b7cf1cf0", "Using CallerID "House Phones" ") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [NumberI'mDialing@from-internal:2] Set("SIP/599-b7cf1cf0", "_NODEST=") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [NumberI'mDialing@from-internal:3] Macro("SIP/599-b7cf1cf0", "record-enable,599,OUT,") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-record-enable:1] GotoIf("SIP/599-b7cf1cf0", "1?check") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Goto (macro-record-enable,s,4)
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-record-enable:4] AGI("SIP/599-b7cf1cf0", "recordingcheck,20100602-105549,1275494149.252") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/recordingcheck
[Jun 2 10:55:49] VERBOSE[20174] logger.c: recordingcheck,20100602-105549,1275494149.252: Outbound recording enabled.
[Jun 2 10:55:49] VERBOSE[20174] logger.c: recordingcheck,20100602-105549,1275494149.252: CALLFILENAME=OUT599-20100602-105549-1275494149.252
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- AGI Script recordingcheck completed, returning 0
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-record-enable:999] MixMonitor("SIP/599-b7cf1cf0", "OUT599-20100602-105549-1275494149.252.wav,,") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [NumberI'mDialing@from-internal:4] Macro("SIP/599-b7cf1cf0", "dialout-trunk,4,NumberI'mDialing,,") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:1] Set("SIP/599-b7cf1cf0", "DIAL_TRUNK=4") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:2] GosubIf("SIP/599-b7cf1cf0", "0?sub-pincheck,s,1") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:3] GotoIf("SIP/599-b7cf1cf0", "0?disabletrunk,1") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:4] Set("SIP/599-b7cf1cf0", "DIAL_NUMBER=NumberI'mDialing") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:5] Set("SIP/599-b7cf1cf0", "DIAL_TRUNK_OPTIONS=trwW") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:6] Set("SIP/599-b7cf1cf0", "OUTBOUND_GROUP=OUT_4") in new stack
[Jun 2 10:55:49] VERBOSE[20176] logger.c: == Begin MixMonitor Recording SIP/599-b7cf1cf0
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:7] GotoIf("SIP/599-b7cf1cf0", "1?nomax") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Goto (macro-dialout-trunk,s,9)
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:9] GotoIf("SIP/599-b7cf1cf0", "0?skipoutcid") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:10] Set("SIP/599-b7cf1cf0", "DIAL_TRUNK_OPTIONS=wW") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:11] Macro("SIP/599-b7cf1cf0", "outbound-callerid,4") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:1] ExecIf("SIP/599-b7cf1cf0", "0?Set(CALLERPRES()=)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:2] ExecIf("SIP/599-b7cf1cf0", "0?Set(REALCALLERIDNUM=599)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:3] GotoIf("SIP/599-b7cf1cf0", "1?normcid") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Goto (macro-outbound-callerid,s,6)
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:6] Set("SIP/599-b7cf1cf0", "USEROUTCID=") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:7] Set("SIP/599-b7cf1cf0", "EMERGENCYCID=") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:8] Set("SIP/599-b7cf1cf0", "TRUNKOUTCID=GoogleVoicePhoneNumber") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:9] GotoIf("SIP/599-b7cf1cf0", "1?trunkcid") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Goto (macro-outbound-callerid,s,12)
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:12] ExecIf("SIP/599-b7cf1cf0", "1?Set(CALLERID(all)=GoogleVoicePhoneNumber)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:13] ExecIf("SIP/599-b7cf1cf0", "0?Set(CALLERID(all)=)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-outbound-callerid:14] ExecIf("SIP/599-b7cf1cf0", "0?Set(CALLERPRES()=prohib_passed_screen)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:12] ExecIf("SIP/599-b7cf1cf0", "0?AGI(fixlocalprefix)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:13] Set("SIP/599-b7cf1cf0", "OUTNUM=NumberI'mDialing") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:14] Set("SIP/599-b7cf1cf0", "custom=AMP") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:15] ExecIf("SIP/599-b7cf1cf0", "0?Set(DIAL_TRUNK_OPTIONS=M(setmusic^)wW)") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:16] Macro("SIP/599-b7cf1cf0", "dialout-trunk-predial-hook,") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk-predial-hook:1] MacroExit("SIP/599-b7cf1cf0", "") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:17] GotoIf("SIP/599-b7cf1cf0", "0?bypass,1") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:18] GotoIf("SIP/599-b7cf1cf0", "1?customtrunk") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Goto (macro-dialout-trunk,s,21)
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:21] Set("SIP/599-b7cf1cf0", "pre_num=AMP:local/") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:22] Set("SIP/599-b7cf1cf0", "the_num=OUTNUM") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:23] Set("SIP/599-b7cf1cf0", "post_num=@custom-gv") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:24] GotoIf("SIP/599-b7cf1cf0", "1?outnum:skipoutnum") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Goto (macro-dialout-trunk,s,25)
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:25] Set("SIP/599-b7cf1cf0", "the_num=NumberI'mDialing") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Executing [s@macro-dialout-trunk:26] Dial("SIP/599-b7cf1cf0", "local/NumberI'mDialing@custom-gv,300,wW") in new stack
[Jun 2 10:55:49] VERBOSE[20174] logger.c: -- Called NumberI'mDialing@custom-gv
[Jun 2 10:55:49] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:1] Wait("Local/NumberI'mDialing@custom-gv-54a5;2", "1") in new stack
[Jun 2 10:55:50] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:2] Set("Local/NumberI'mDialing@custom-gv-54a5;2", "ACCTNAME=GoogleVoiceEmailAddress") in new stack
[Jun 2 10:55:50] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:3] Set("Local/NumberI'mDialing@custom-gv-54a5;2", "ACCTPASS=GoogleVoicePassword") in new stack
[Jun 2 10:55:50] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:4] Set("Local/NumberI'mDialing@custom-gv-54a5;2", "RINGBACK=PSTNPhoneNumber") in new stack
[Jun 2 10:55:50] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:5] Set("Local/NumberI'mDialing@custom-gv-54a5;2", "CALLPARK=75") in new stack
[Jun 2 10:55:50] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:6] Playback("Local/NumberI'mDialing@custom-gv-54a5;2", "pls-wait-connect-call") in new stack
[Jun 2 10:55:50] VERBOSE[20174] logger.c: -- Local/NumberI'mDialing@custom-gv-54a5;1 answered SIP/599-b7cf1cf0
[Jun 2 10:55:50] VERBOSE[20177] logger.c: -- Playing 'pls-wait-connect-call.ulaw' (language 'en')
[Jun 2 10:55:52] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:7] System("Local/NumberI'mDialing@custom-gv-54a5;2", "gvoice -e GoogleVoiceEmailAddress -p GoogleVoicePassword call NumberI'mDialing PSTNPhoneNumber") in new stack
[Jun 2 10:55:55] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:8] Set("Local/NumberI'mDialing@custom-gv-54a5;2", "PARKINGEXTEN=75") in new stack
[Jun 2 10:55:55] VERBOSE[20177] logger.c: -- Executing [NumberI'mDialing@custom-gv:9] Park("Local/NumberI'mDialing@custom-gv-54a5;2", "") in new stack
[Jun 2 10:55:56] VERBOSE[20177] logger.c: == Parked Local/NumberI'mDialing@custom-gv-54a5;2 on 75@parkedcalls in lot 0. Will timeout back to extension [custom-gv] s, 1 in 30 seconds
[Jun 2 10:55:56] VERBOSE[20177] logger.c: -- Added extension '75' priority 1 to parkedcalls (0x9591f20)
[Jun 2 10:55:56] VERBOSE[20177] logger.c: -- Playing 'digits/7.gsm' (language 'en')
[Jun 2 10:55:56] VERBOSE[20179] logger.c: == Manager 'admin' logged on from 127.0.0.1
[Jun 2 10:55:56] VERBOSE[20179] logger.c: == Manager 'admin' logged off from 127.0.0.1
[Jun 2 10:55:57] VERBOSE[20177] logger.c: -- Playing 'digits/5.gsm' (language 'en')
[Jun 2 10:55:58] VERBOSE[20177] logger.c: -- Started music on hold, class 'default', on Local/NumberI'mDialing@custom-gv-54a5;2
[Jun 2 10:55:58] VERBOSE[20177] logger.c: == Spawn extension (custom-gv, s, 1) exited non-zero on 'Parked/Local/NumberI'mDialing@custom-gv-54a5;2'
[Jun 2 10:56:26] VERBOSE[2930] logger.c: -- Stopped music on hold on Local/NumberI'mDialing@custom-gv-54a5;2
[Jun 2 10:56:26] VERBOSE[2930] logger.c: -- Added extension 'SIP0599' priority 1 to park-dial (0x9621a80)
[Jun 2 10:56:26] VERBOSE[2930] logger.c: == Timeout for Local/NumberI'mDialing@custom-gv-54a5;2 parked on 75. Returning to park-dial,SIP0599,1
[Jun 2 10:56:26] VERBOSE[20180] logger.c: -- Executing [SIP0599@park-dial:1] Dial("Local/NumberI'mDialing@custom-gv-54a5;2", "SIP/599|30|t") in new stack
[Jun 2 10:56:26] VERBOSE[20180] logger.c: == Using SIP RTP TOS bits 184
[Jun 2 10:56:26] VERBOSE[20180] logger.c: == Using SIP RTP CoS mark 5
[Jun 2 10:56:26] VERBOSE[20180] logger.c: == Using SIP VRTP TOS bits 136
[Jun 2 10:56:26] VERBOSE[20180] logger.c: == Using SIP VRTP CoS mark 6
[Jun 2 10:56:26] WARNING[20180] chan_sip.c: No such host: 599|30|t
[Jun 2 10:56:26] WARNING[20180] app_dial.c: Unable to create channel of type 'SIP' (cause 20 - Unknown)
[Jun 2 10:56:26] VERBOSE[20180] logger.c: == Everyone is busy/congested at this time (1:0/0/1)
[Jun 2 10:56:26] VERBOSE[20180] logger.c: -- Executing [SIP0599@park-dial:2] Goto("Local/NumberI'mDialing@custom-gv-54a5;2", "app-blackhole,hangup,1") in new stack
[Jun 2 10:56:26] VERBOSE[20180] logger.c: -- Goto (app-blackhole,hangup,1)
[Jun 2 10:56:26] VERBOSE[20180] logger.c: -- Executing [hangup@app-blackhole:1] NoOp("Local/NumberI'mDialing@custom-gv-54a5;2", "Blackhole Dest: Hangup") in new stack
[Jun 2 10:56:26] VERBOSE[20180] logger.c: -- Executing [hangup@app-blackhole:2] Hangup("Local/NumberI'mDialing@custom-gv-54a5;2", "") in new stack
[Jun 2 10:56:26] VERBOSE[20180] logger.c: == Spawn extension (app-blackhole, hangup, 2) exited non-zero on 'Local/NumberI'mDialing@custom-gv-54a5;2'
[Jun 2 10:56:26] VERBOSE[20181] logger.c: == Manager 'admin' logged on from 127.0.0.1
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Executing [h@macro-dialout-trunk:1] Macro("SIP/599-b7cf1cf0", "hangupcall,") in new stack
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Executing [s@macro-hangupcall:1] GotoIf("SIP/599-b7cf1cf0", "1?skiprg") in new stack
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Goto (macro-hangupcall,s,4)
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Executing [s@macro-hangupcall:4] GotoIf("SIP/599-b7cf1cf0", "1?skipblkvm") in new stack
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Goto (macro-hangupcall,s,7)
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Executing [s@macro-hangupcall:7] GotoIf("SIP/599-b7cf1cf0", "1?theend") in new stack
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Goto (macro-hangupcall,s,9)
[Jun 2 10:56:26] VERBOSE[20174] logger.c: -- Executing [s@macro-hangupcall:9] Hangup("SIP/599-b7cf1cf0", "") in new stack
[Jun 2 10:56:26] VERBOSE[20174] logger.c: == Spawn extension (macro-hangupcall, s, 9) exited non-zero on 'SIP/599-b7cf1cf0' in macro 'hangupcall'
[Jun 2 10:56:26] VERBOSE[20174] logger.c: == Spawn extension (macro-dialout-trunk, h, 1) exited non-zero on 'SIP/599-b7cf1cf0'
[Jun 2 10:56:26] VERBOSE[20174] logger.c: == Spawn extension (macro-dialout-trunk, s, 26) exited non-zero on 'SIP/599-b7cf1cf0' in macro 'dialout-trunk'
[Jun 2 10:56:26] VERBOSE[20174] logger.c: == Spawn extension (from-internal, NumberI'mDialing, 4) exited non-zero on 'SIP/599-b7cf1cf0'
[Jun 2 10:56:26] VERBOSE[20176] logger.c: == End MixMonitor Recording SIP/599-b7cf1cf0
[Jun 2 10:56:26] VERBOSE[20181] logger.c: == Manager 'admin' logged off from 127.0.0.1

Help!



obeliks
Posts: 877
Member Since:
2010-03-14
Wiki page created

I created a wiki page with detailed instructions:

http://trixbox.org/wiki/outbound-calls-google-voice



djsullie
Posts: 186
Member Since:
2008-02-16
Obeliks, thank you for

Obeliks,

thank you for creating this wiki page.. it works great?



Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.