<html>
<head>
<base href="https://wiki.asterisk.org/wiki">
<link rel="stylesheet" href="/wiki/s/en/2166/18/9/_/styles/combined.css?spaceKey=AST&forWysiwyg=true" type="text/css">
</head>
<body style="background: white;" bgcolor="white" class="email-body">
<div id="pageContent">
<div id="notificationFormat">
<div class="wiki-content">
<div class="email">
<h2><a href="https://wiki.asterisk.org/wiki/display/AST/Calling+using+Google?focusedCommentId=18415962#comment-18415962">Calling using Google</a></h2>
<h4>Page
<b>comment added</b> by <a href="https://wiki.asterisk.org/wiki/display/~brucelampson@gmail.com">Bruce Lampson</a>
</h4>
<br/>
<div class="notificationGreySide">
<p>Hi Shyju,</p>
<p>this works for me!</p>
<p>sip.conf</p>
<p><span class="error">[1000]</span><br/>
type=friend<br/>
secret=1000<br/>
host=dynamic<br/>
context=local</p>
<p>jabber.conf</p>
<p><span class="error">[general]</span><br/>
autoregister=yes</p>
<p><span class="error">[asterisk]</span><br/>
type=client<br/>
serverhost=talk.google.com<br/>
username=YOUR_EMAIL/Talk<br/>
secret=YOUR_PASSWORD<br/>
port=5222<br/>
usetls=yes<br/>
usesasl=yes<br/>
statusmessage="ASTERISK"<br/>
timeout=100</p>
<p>gtalk.conf</p>
<p><span class="error">[general]</span><br/>
context=local<br/>
allowguests=yes<br/>
bindaddr=0.0.0.0<br/>
externip=YOUR_EXTERNAL_IP_ADDRESS</p>
<p><span class="error">[guest]</span><br/>
disallow=all<br/>
allow=ulaw<br/>
context=local<br/>
connection=asterisk</p>
<p>extensions.conf</p>
<p><span class="error">[local]</span></p>
<p>exten => s,1,Answer()<br/>
exten => s,n,Wait(8)<br/>
exten => s,n,SendDTMF(1)<br/>
exten => s,n,Set(name=$</p>
<div class="error"><span class="error">Unknown macro: {CALLERID(name)}</span> </div>
<p>)<br/>
exten => s,n,Set(num=$</p>
<div class="error"><span class="error">Unknown macro: {CUT(name,@,1)}</span> </div>
<p>)<br/>
exten => s,n,Set(CALLERID(all)=$</p>
<div class="error"><span class="error">Unknown macro: {num}</span> </div>
<p>)<br/>
exten => s,n,Dial(SIP/1000,20,tT)<br/>
exten => s,n,Voicemail(1000@voicemail)<br/>
exten => s,n,Playback(vm-goodbye)<br/>
exten => s,n,Hangup()</p>
<p>exten => 100,1,Dial(gtalk/asterisk/MYFRIEND@gmail.com)<br/>
exten => _1XXXXXXXXXX,1,Dial(gtalk/asterisk/+$</p>
<div class="error"><span class="error">Unknown macro: {EXTEN}</span> </div>
<p>@voice.google.com)</p>
<p>exten => *98,1,Answer()<br/>
exten => *98,2,Wait(1)<br/>
exten => *98,3,VoiceMailMain($</p>
<div class="error"><span class="error">Unknown macro: {CALLERID}</span> </div>
<p>@voicemail)<br/>
exten=> *98,4,Hangup()</p>
</div>
<div style="border-bottom: 1px solid #ddd; padding: 10px 20px 7px 20px;">
<strong>In reply to a comment by <a href="/wiki/display/~shyju"
class="url fn confluence-userlink" data-username="shyju"
>Shyju Kanaprath</a>:</strong><br/>
<p>Nice tutorial. Incoming calls are working fine.I'm facing problem with outbound calls. The outbound calls only works when I add gmail id which is already in my buddy list to jabber.conf & gtalk.conf. Find my configurations files below. Now the outbound calls work only on those 2 buddys. How can I dial anyone/any pstn number without adding it to gtalk/jabber config. In Gmail my chat setting is "Only allow people that I've explicitly approved to chat with me and see when I'm online." Any insight would be appreciated.</p>
<p>Version: Asterisk 10.0.0-beta1</p>
<p>/etc/asterisk/jabber.conf</p>
<p><span class="error">[general]</span><br/>
autoregister = yes<br/>
autoprune = no</p>
<p><span class="error">[asterisk]</span><br/>
type = client<br/>
serverhost = talk.google.com<br/>
username = shy**@gmail.com/Talk<br/>
secret = ******<br/>
port = 5222<br/>
usetls = yes<br/>
usesasl = yes<br/>
buddy = shy**@epillars.com<br/>
buddy = +971554880722@voice.google.com<br/>
statusmessage = "I am an Asterisk Server"<br/>
timeout = 100</p>
<p>/etc/asterisk/gtalk.conf</p>
<p><span class="error">[general]</span><br/>
context = default<br/>
allowguests = yes<br/>
;bindaddr = 192.168.20.159<br/>
bindaddr = 0.0.0.0<br/>
externip = 2.50.27.181<br/>
;allowguest = yes<br/>
<span class="error">[guest]</span><br/>
;username = _.@gmail.com<br/>
disallow = all<br/>
allow = all<br/>
context = gtalk_incoming_guest<br/>
connection = asterisk</p>
<p>/etc/asterisk/extensions.conf</p>
<p>exten => _XXXXXXXXXX.,1,Dial(gtalk/asterisk/+${EXTEN}@voice.google.com)<br/>
exten => 123,1,Dial(gtalk/asterisk/shy**@epillars.com)</p>
<p>Asterisk CLI<br/>
== Using SIP RTP CoS mark 5<br/>
– Executing <span class="error">[971503014208@DLPN_ePillars:1]</span> Dial("SIP/604-00000000", "gtalk/asterisk/+971503014208@voice.google.com") in new stack<br/>
– Called gtalk/asterisk/+971503014208@voice.google.com<br/>
– Gtalk/+971503014208@voice.google.com-6a29 is ringing<br/>
== Everyone is busy/congested at this time (1:0/0/1)</p>
</div>
<div id="commentsSection" class="wiki-content pageSection">
<div style="float: right;" class="grey">
<a href="https://wiki.asterisk.org/wiki/users/removespacenotification.action?spaceKey=AST">Stop watching space</a>
<span style="padding: 0px 5px;">|</span>
<a href="https://wiki.asterisk.org/wiki/users/editmyemailsettings.action">Change email notification preferences</a>
</div>
<a href="https://wiki.asterisk.org/wiki/display/AST/Calling+using+Google?focusedCommentId=18415962#comment-18415962">View Online</a>
|
<a id="reply-18415962" href="https://wiki.asterisk.org/wiki/display/AST/Calling+using+Google?replyToComment=18415962#comment-18415962">Reply To This</a>
</div>
</div>
</div>
</div>
</div>
</body>
</html>