Summary:ASTERISK-13122: [branch] gtalk web no incoming or outgoing calls
Reporter:adria vidal (adriavidal)Labels:
Date Opened:2008-11-25 17:35:30.000-0600Date Closed:2010-10-14 16:32:01
Versions:Frequency of
Environment:Attachments:( 0) chan_gtalk.c.1.6.1.gtalk-web.c.patch
( 1) jabber.h.1.6.1.gtalk-web.h.patch
( 2) res_jabber.c.1.6.1.gtalk-web.c.patch
Description:Calls from or to asterisk done from or to a web enabled gtalk account are not connected.

Here a put an example of an incoming call from web to Asterisk

There is a branch for this issue that should be used for testing:



Connected to Asterisk currently running on testPBX (pid = 11200)
Verbosity was 0 and is now 2
testPBX*CLI> core set verbose 30
Verbosity was 2 and is now 30
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" type="set" id="F247A2FF288A6842" from="fromB@gmail.com/gmail.D1E4E104"><ses:session type="terminate" initiator="fromB@gmail.com/gmail.D1E4E104" id="c387525529" xmlns:ses="http://www.google.com/session"/></iq>
JABBER: gtalk INCOMING: <message to="toA@gmail.com" type="chat" id="F5F72D7D26B2F4BF_0" iconset="goomoji" from="fromB@gmail.com/gmail.D1E4E104"><body>hola</body><met:google-mail-signature xmlns:met="google:metadata">7482865d358ff692</met:google-mail-signature><cha:active xmlns:cha="http://jabber.org/protocol/chatstates"/><nos:x value="disabled" xmlns:nos="google:nosave"/><arc:record otr="false" xmlns:arc="http://jabber.org/protocol/archive"/></message>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" type="set" id="F76E6F3B4CA5BCFD" from="fromB@gmail.com/gmail.D1E4E104"><ses:session type="initiate" initiator="fromB@gmail.com/gmail.D1E4E104" id="c1901961616" xmlns:ses="http://www.google.com/session"><pho:description xmlns:pho="http://www.google.com/session/phone"><pho:payload-type id="103" name="ISAC" clockrate="16000"/><pho:payload-type id="97" name="IPCMWB" bitrate="80000" clockrate="16000"/><pho:payload-type id="99" name="speex" bitrate="22000" clockrate="16000"/><pho:payload-type id="4" name="G723" bitrate="6300" clockrate="8000"/><pho:payload-type id="98" name="speex" bitrate="11000" clockrate="8000"/><pho:payload-type id="100" name="EG711U" bitrate="64000" clockrate="8000"/><pho:payload-type id="101" name="EG711A" bitrate="64000" clockrate="8000"/><pho:payload-type id="0" name="PCMU" bitrate="64000" clockrate="8000"/><pho:payload-type id="8" name="PCMA" bitrate="64000" clockrate="8000"/><pho:payload-type id="13" name="CN" clockrate="

JABBER: gtalk INCOMING: 8000"/><pho:payload-type id="102" name="iLBC" bitrate="13300" clockrate="8000"/><pho:payload-type id="106" name="telephone-event" clockrate="8000"/></pho:description></ses:session></iq>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" type="set" id="8766B0289C0EEDBB" from="fromB@gmail.com/gmail.D1E4E104"><ses:session type="candidates" initiator="fromB@gmail.com/gmail.D1E4E104" id="c1901961616" xmlns:ses="http://www.google.com/session"><ses:candidate address="" port="49419" name="rtp" username="V2R3SNmx9Cle826I" password="/mAwXu1tLMrXpnBj" preference="1" protocol="udp" generation="0" network="en1" type="local"/></ses:session></iq>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" type="set" id="D9271327A60AFB06" from="fromB@gmail.com/gmail.D1E4E104"><ses:session type="candidates" initiator="fromB@gmail.com/gmail.D1E4E104" id="c1901961616" xmlns:ses="http://www.google.com/session"><ses:candidate address="84.77.XX.XX" port="49420" name="rtp" username="aQSP5HsBlBErVoox" password="sk0OOZJ0xw7y3bKb" preference="0.9" protocol="udp" generation="0" network="en1" type="stun"/></ses:session></iq>
   -- ast_get_srv: SRV lookup for '_sip._UDP.adamvozip.es' mapped to host sip.adamvozip.es, port 5060
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" type="set" id="45324C6E79C32B31" from="fromB@gmail.com/gmail.D1E4E104"><ses:session type="candidates" initiator="fromB@gmail.com/gmail.D1E4E104" id="c1901961616" xmlns:ses="http://www.google.com/session"><ses:candidate address="" port="49421" name="rtp" username="Bxk07s3t1SQJymwO" password="y56mHpjEkokL3/xr" preference="1" protocol="udp" generation="1" network="en1" type="local"/></ses:session></iq>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" type="set" id="BC7B0926B305B8B0" from="fromB@gmail.com/gmail.D1E4E104"><ses:session type="candidates" initiator="fromB@gmail.com/gmail.D1E4E104" id="c1901961616" xmlns:ses="http://www.google.com/session"><ses:candidate address="84.77.XX.XX" port="49422" name="rtp" username="5SvNDlixjfkVvOdZ" password="ZsviEhx8WIfDP2QD" preference="0.9" protocol="udp" generation="1" network="en1" type="stun"/></ses:session></iq>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" id="D53F436E" type="set"><query xmlns="jabber:iq:roster"><item jid="fromB@gmail.com" subscription="remove"/></query></iq>
JABBER: gtalk INCOMING: <presence type="unsubscribed" from="fromB@gmail.com" to="toA@gmail.com"/>
   -- JABBER: This is a subcription of type 11

JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" id="D088976D" type="set"><query xmlns="jabber:iq:roster"><item jid="fromB@gmail.com" subscription="from"/></query></iq>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" id="D088976F" type="set"><query xmlns="jabber:iq:roster"><item jid="fromB@gmail.com" subscription="from" ask="subscribe"/></query></iq>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" id="D08897D0" type="set"><query xmlns="jabber:iq:roster"><item jid="fromB@gmail.com" subscription="both"/></query></iq>
JABBER: gtalk INCOMING: <presence from="fromB@gmail.com/gmail.D1E4E104" to="toA@gmail.com"><priority>24</priority><caps:c node="http://mail.google.com/xmpp/client/caps" ver="1.1" ext="pmuc-v1 sms-v1 video-v1 voice-v1" xmlns:caps="http://jabber.org/protocol/caps"/><status/><x xmlns="vcard-temp:x:update"><photo/></x></presence>
JABBER: gtalk INCOMING: <presence from="fromB@gmail.com/gmail.D1E4E104" to="toA@gmail.com"><priority>24</priority><caps:c node="http://mail.google.com/xmpp/client/caps" ver="1.1" ext="pmuc-v1 sms-v1 video-v1 voice-v1" xmlns:caps="http://jabber.org/protocol/caps"/><status/><x xmlns="vcard-temp:x:update"><photo/></x></presence>
JABBER: gtalk INCOMING: <iq to="toA@gmail.com/asteriskDF134744" type="set" id="61408B6FC5E2EBF8" from="fromB@gmail.com/gmail.D1E4E104"><ses:session type="terminate" initiator="fromB@gmail.com/gmail.D1E4E104" id="c1901961616" xmlns:ses="http://www.google.com/session"/></iq>
Comments:By: phsultan (phsultan) 2008-12-11 12:46:32.000-0600

The signalling used by the gmail Voice/Video chat client is not supported by Asterisk at the moment.

By: phsultan (phsultan) 2009-01-05 11:06:11.000-0600

Reopening this bug since we now have a compatible version.

Can you please test the corresponding branch :
#svn co http://svn.digium.com/svn/asterisk/team/phsultan/gmail-voice-video

This branch is made off of Asterisk's trunk.

Thanks for your feedback!

By: Tilghman Lesher (tilghman) 2009-02-26 12:49:29.000-0600

adriavidal:  Please respond to phsultan's request for testing or this issue will be closed.

By: Max A Glucksmann (maxgo) 2009-03-03 08:36:21.000-0600

Hello phsultan,

Is this version also compatible to receive jabber messages?

I mean, will we be able to receive text messages from the web gmail/jabber client?


By: phsultan (phsultan) 2009-03-04 03:49:06.000-0600

Hi Max,

No, both functionalities are still under development in separate code branches. They must be tested and validated before getting into Asterisk.

By: adria vidal (adriavidal) 2009-03-04 15:58:32.000-0600

Thanks a lot phsultan's your trunk version is running great!!!
web>*>SIP runing fine.

very good work!!! (hope to get some kind of dtmf & text incoming soon)

tried with video but got a crash (maybe better to open another ticket?)

incoming video call :

JABBER: gtalk INCOMING: <iq to="adriavidal2008@gmail.com/asterisk73D033FE" type="set" id="C04FF3346E752F4A" from="adriavidal@gmail.com/gmail.C8C08C4C"><ses:session type="initiate" initiator="adriavidal@gmail.com/gmail.C8C08C4C" id="c1495532688" xmlns:ses="http://www.google.com/session"><vid:description xmlns:vid="http://www.google.com/session/video"><vid:payload-type id="96" name="H264-SVC" width="320" height="200" framerate="30"/><vid:payload-type id="96" name="H264/SVC" width="320" height="240" framerate="30"/><vid:payload-type id="97" name="H264" width="320" height="200" framerate="30"/><pho:payload-type id="103" name="ISAC" clockrate="16000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="104" name="ISACLC" bitrate="40000" clockrate="16000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="99" name="speex" bitrate="22000" clockrate="16000" xmlns:pho="

JABBER: gtalk INCOMING: http://www.google.com/session/phone"/><pho:payload-type id="97" name="IPCMWB" bitrate="80000" clockrate="16000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="102" name="iLBC" bitrate="13300" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="98" name="speex" bitrate="11000" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="3" name="GSM" bitrate="13000" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="100" name="EG711U" bitrate="64000" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="101" name="EG711A" bitrate="64000" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="0" name="PCMU" bitrate="64000" clockrate="8000" xmlns:pho="

JABBER: gtalk INCOMING: http://www.google.com/session/phone"/><pho:payload-type id="8" name="PCMA" bitrate="64000" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="106" name="telephone-event" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/><pho:payload-type id="13" name="CN" clockrate="8000" xmlns:pho="http://www.google.com/session/phone"/></vid:description></ses:session></iq>
[Mar  4 21:51:49] NOTICE[6512]: chan_gtalk.c:1239 gtalk_newcall: iks_name(codec) : vid:payload-type
[Mar  4 21:51:49] NOTICE[6512]: chan_gtalk.c:1239 gtalk_newcall: iks_name(codec) : vid:payload-type
[Mar  4 21:51:49] NOTICE[6512]: chan_gtalk.c:1239 gtalk_newcall: iks_name(codec) : vid:payload-type
Segmentation fault

By: tootai (tootai) 2009-03-12 13:36:55

I have similar behaviour in as well as in Will be the new code included in 1.4 branch?

By: snuffy (snuffy) 2009-03-12 14:08:56

1.4.x is bugfixes only, so this code would not be included.

Both the gtalk video and gtalk receive functionality would be in the next 1.6.x release after it has been merged to trunk.

By: Tilghman Lesher (tilghman) 2009-08-25 01:22:10

Branch resynced to current trunk.

phsultan:  Is there anything I can do to get this branch back on track?

By: phsultan (phsultan) 2009-08-25 04:02:13

Well, bringing up the branch by resynchronizing it was necessary, thanks for that Tilghman. I'll watch for autormege failure emails more carefully to keep the branch up, as ViewVC cannot help anymore here.

We need to fix the crash issue adriavidal put in evidence by testing Asterisk along with the Gmail video client.

Also, David Brooks told me that someone took over the iksemel library development. Since this branch addresses an issue that should be handled by iksemel, I'll report the bug there too.

I expect to have time to investigate that in a couple of weeks.

By: John Covert (jcovert) 2009-09-15 15:40:10

tilghman: "Branch resynced to current trunk." -- is that "team/phsultan/gmail-voice-video" or some other branch?

phsultan: I have a client willing to pay me to help test and debug the voice capability in the web client.  We're on (which is why I just opened the separate issue to re-sync 1.6.1-head with 1.6.0-head).

Does the code in http://svn.digium.com/svn/asterisk/team/phsultan/gmail-voice-video/channels/chan_gtalk.c sort of work?  Should I try synching it up with 1.6.1-head for testing and possible submission to the code stream going forward?

By: phsultan (phsultan) 2009-09-15 16:25:57

The code is indeed in team/phsultan/gmail-voice-video, which is based off trunk.

I guess you should not have problems merging the diff with 1.6.1-head though.

adriavidal provided useful testing, having more feedback on this code would help integrate it with Asterisk.

By: John Covert (jcovert) 2009-10-13 21:59:33

I've merged chan_gtalk.c, res_jabber.c, and jabber.h from team/phsultan/gmail-voice-video with 1.6.1/head.  Patch files are attached.

Observations for reviewers and testers:

1. Autoprune seems like a bad default.  Unless you want to explicitly put all of your buddies into jabber.conf, turning off Autoprune so that the "central" buddy registry gets loaded each time asterisk starts seems like the way to go.  I did not change this, though.

2. I found the following problems, and fixed them:  (a) the ext string I am seeing from the Google web client is "pmuc-v1 sms-v1 video-v1 voice-v1", so I'm recognizing it in addition to "pmuc-v1 sms-v1 camera-v1 video-v1 voice-v1" in gtalk_yuck -- without this the Google web clients I've seen are not jingle-capable.  (b) the code in gtalk_is_answered looks for "session", but the web client is sending "ses:session".  This results in the pointer "tmp" having the value zero when used in the call to ast_rtp_set_m_type.  I have modified the code to search for both "session" and "ses:session" and to protect asterisk from a seg fault if neither are found.

There was a call to ast_rtp_lookup_code @ the end of add_codec_to_answer which I did not remove.

I have only begun testing this.  It seems to work, but there are some issues I've noticed, which seem to be partly Google's fault, and may have been caused when I had autoprune set on.  Specifically, the web client seemed to think it was a buddy, but during initial registration, Google was not returning the web client in the roster, and the web client would not send a new "subscribe".  I believe I've worked around this by temporarily including a "buddy=..." in jabber.conf.

By: Piermarco Zerbini (pier) 2009-10-19 05:14:28

Thanks for the patch files!
- the call Web>>SIP works fine,
- but the inverse call SIP>>Web is mute: web client rings and answers the incoming call, but there's no audio and after about 30 seconds the call ends

is it possible to fix that?
Thank you for supporting

By: Leif Madsen (lmadsen) 2010-01-19 13:55:52.000-0600

Pinging this issue as it hasn't moved forward in some time. Curious what is left to be done here?

By: John Covert (jcovert) 2010-01-19 14:33:05.000-0600

By coincidence, just as Leif was writing the note above, I was on the phone with my customer, who is interested in moving this forward now.

He is absolutely sure that it WAS working in both directions right after I did the work on it, but we are now seeing the same directionalness that pier reports.

Have either phsultan or pier done any further work on the code?  If not, I'll continue in a week or so with the same code I dropped in for testing on 2009-10-13.  It's difficult for me, because I have no platform on which the web client runs, so I have to get someone to work with me whenever I want to do some debugging.


By: Leif Madsen (lmadsen) 2010-01-19 15:05:14.000-0600

Since I have a triple boot laptop, I can do some testing with you if that's all you require. Find me on IRC prior to testing to see if I'm free to help. Thanks!

By: Piermarco Zerbini (pier) 2010-01-20 03:09:22.000-0600

Well, i have followed the instructions of the previous notes of this page:
- Download of Asterisk from subversion
#svn co http://svn.digium.com/svn/asterisk/team/phsultan/gmail-voice-video
- Patch of the files with the attachments.

I have no modified the source code.

I also confirm another problem reported above: if the user of gmail from web browser starts a video-chat, Asterisk crashes. This may be a prolem of usability, because the web interface of gmail is predisposed to video-chat.
I have enabled video support to gtalk channel and allowed the requested codecs, but Asterisk crashes anyway.

I am using Ubuntu 9.10 server 32-bit, because i have tried also on 64-bit version but Asterisk doesn't work correctly with that architecture (gmail web calls don't work, like if Asterisk weren't patched with attachments). Can anyone confirm this issues?

Thank you again for supporting! :)

By: phsultan (phsultan) 2010-01-20 04:48:15.000-0600

I'll update the branch soon to include jcovert's fixes.

By: phsultan (phsultan) 2010-01-20 07:14:46.000-0600

Ok the branch have been updated :
- jcovert's changes in the backport to 1.6.1 have been integrated
- video capabilities are not advertized anymore (since we don't have proper video support yet)

Therefore, voice calls only are available from the Gmail web client, and calls coming from Asterisk are restricted to voice as well.

By: Piermarco Zerbini (pier) 2010-01-20 08:28:38.000-0600

Thanks! I will try this new version as soon as possible.

By: Piermarco Zerbini (pier) 2010-01-21 06:18:27.000-0600

Hi! I have just try the updated version from sbversion and i can see this:
- the icon of Asterisk's jabber account shows that there isn't the video support;
- i can call my sip phone from web browser, and it works fine;
- the inverse call (from SIP phone to web browser) still not works.

I'm looking for more informations that can help to solve this issue (SIP >> WEB call).

Asterisk's console offers theese two messages:
ERROR[23107]: chan_gtalk.c:959 gtalk_alloc: no gtalk capable clients to talk to.
WARNING[23107]: app_dial.c:1865 dial_exec_full: Unable to create channel of type 'GTALK' (cause 0 - Unknown)

When the browser web is ringing i see this notification in asterisk console:
 "chan_gtalk.c:885 gtalk_create_candidates: Client type is unknown"
When i accept the call i see this other notification:
 "chan_gtalk.c:1548 gtalk_indicate: Don't know how to indicate condition '20' "
Then there's no audio and after a timeout i can see this:
- Asterisk ends the call
- In gmail's chat appears this message from Google:
 " Sorry! The voice chat with 'Asterisk's account' failed because of a network problem at 11:31 AM. Please try again. "
I hope that theese informations could be useful to solve the problem.

Does your Asterisk work correctly phsultan?


By: Piermarco Zerbini (pier) 2010-01-25 09:11:47.000-0600

Hi again!
I have modified the chan_gtalk file. My target was to force a call from a SIP endpoint to a gmail account in a web browser.

//First change: withowt this, there are no resources available for Asterisk
snprintf(idroster, sizeof(idroster), "%s/%s", them, resources->resource);

//Before change it was...
if (resources)
  snprintf(idroster, sizeof(idroster), "%s/%s", them, resources->resource);
else {
  ast_log(LOG_ERROR, "no gtalk capable clients to talk to.\n");
  return NULL;

//Second change: forces the gmail web client
tmp->ctype = AJI_CLIENT_GMAIL;

//Before change it was...
tmp->ctype = AJI_CLIENT_UNKNOWN;

Now Asterisk works correctly in input and output with gmail.
Despite i'm forcing asterisk to talk to a gmail in a web browser, it also works correctly with the gtalk client.

By: Piermarco Zerbini (pier) 2010-01-25 09:58:33.000-0600

There is another thing to say. With theese modifies, the gtalk channel works also with Empathy, but only in one way: calls from SIP to Empathy work correctly, but in the other way (Empathy >> SIP) the conversation is mute.

Maybe this could be the first step to solve the issue at link:

By: Piermarco Zerbini (pier) 2010-02-18 05:15:05.000-0600

Any feedback?

By: John Covert (jcovert) 2010-02-18 10:05:13.000-0600

Just this past week, my client got interested enough in the gtalk web client again to allow me to try pier's change in production.  (And just monday we also finally allocated another machine purely to test - hooray.)

Anyway, pier's change seems to work, but I'm a bit concerned about the "forcing the gmail web client" and would like to see some feedback from someone who understands this protocol better than I do and might have more to say about the implications.

I'd love to see some things committed to 1.6.1.x though.


By: phsultan (phsultan) 2010-02-18 10:26:02.000-0600

pier, one thing that could explain this message :
RROR[23107]: chan_gtalk.c:959 gtalk_alloc: no gtalk capable clients to talk to.
WARNING[23107]: app_dial.c:1865 dial_exec_full: Unable to create channel of type 'GTALK' (cause 0 - Unknown)

When starting Asterisk you have to wait for the XMPP stack to get the presence and capabilities information of the buddies from the network. This may take some time.

That is, before trying to place a call from SIP to your Web client, you should try to issue a 'jabber show buddies'  console command and check that the buddy you want to place the call to has Jingle capabilities.

I can't try right now, my Gmail client doesn't want to connect for a few days whoever knows why.

By: Leif Madsen (lmadsen) 2010-02-26 15:45:44.000-0600

When attempting to place an outbound call via Gtalk, I get the following:

[Feb 26 16:46:33] WARNING[14602]: chan_gtalk.c:1658 gtalk_request: Could not find recipient.
[Feb 26 16:46:33] WARNING[14602]: app_dial.c:1745 dial_exec_full: Unable to create channel of type 'Gtalk' (cause 0 - Unknown)

Is that related to this issue?

By: Jeffrey C. Ollie (jcollie) 2010-03-14 15:42:09

Having problems connecting inbound calls from google talk, I'm getting the following with

[Mar 14 15:40:53] NOTICE[5053]: chan_gtalk.c:1495 gtalk_indicate: Don't know how to indicate condition '-1'
[Mar 14 15:40:54] NOTICE[4825]: chan_gtalk.c:1769 gtalk_parser: Remote peer reported an error, trying to establish the call anyway

By: John Covert (jcovert) 2010-04-14 17:04:37

We've been running pier's change at 117133 in production for a while, but just started having crashes.

This troubles me (from 117133):

//First change: withowt this, there are no resources available for Asterisk
snprintf(idroster, sizeof(idroster), "%s/%s", them, resources->resource);

//Before change it was...
if (resources)
  snprintf(idroster, sizeof(idroster), "%s/%s", them, resources->resource);
else {
  ast_log(LOG_ERROR, "no gtalk capable clients to talk to.\n");
  return NULL;

I really should have noticed this before.  The removal of the check for "resources" being non-zero before calling snprintf(... resources->resources) seems VERY bad.  In fact, it's causing a crash:

#0  0x00be3993 in strlen () from /lib/libc.so.6
(gdb) bt
#0  0x00be3993 in strlen () from /lib/libc.so.6
#1  0x00bb3bce in vfprintf () from /lib/libc.so.6
#2  0x00bd43b4 in vsnprintf () from /lib/libc.so.6
#3  0x00bb9e85 in snprintf () from /lib/libc.so.6
#4  0x00ef5eb5 in gtalk_alloc (client=0xb7957990, us=0x830f0d6 "info@xxxxxxx.com/Talk846FAECD",
   them=0xb6c8223c "yyyyy@zzzzz.com/", sid=0x0) at chan_gtalk.c:959

And, if I show buddies, I see:

       Buddy:  yyyyy@zzzzz.com
               Resource: None

Actually, he's off now.  But for other GTalk Web clients I see:

  Resource: TalkGadgetCA042948
node: http://talkgadget.google.com/client/caps
version: 1.0
Jingle capable: no

So the loop right above this code is going to search to the end, since it's looking for a Jingle Capable resource.

I'm going to try a few things.

Seems to me that the right thing is to modify the code in res_jabber that handles the presence method, and where it's setting jingle capable, to also recognize that node http://talkgadget.google.com/client/caps indicates a jingle capable client, just like we do with node ...............

Halt: now I see that these guys are here:

               Resource: android6c6fe3bb80ac
                       node: http://www.android.com/gtalk/client/caps
                       version: 1.1
                       Jingle capable: no


By: John Covert (jcovert) 2010-04-15 09:01:58


To eliminate the crash caused by the first of the two proposed changes in 117133, I have backed that out.  I still have the second change in place.

In order to find that there is a resource available, in the resource search code immediately above piers first proposed change, after the check for "jingle"

Existing code (on three lines per coding standard:
  if (resources->cap->jingle) { break; }

I have added a test that first ensures that resources->resource is non-zero (don't want to introduce another similar bug) and then checks to see if it begins with either "TalkGadget" or "android"

if (resources->resource && (strncmp(resources->resource, "TalkGadget", 10) == 0
                           || strncmp(resources->resource, "android", 7))) {

It works; my client is happy but NERVOUS; his client is operational.

But I don't think this is ready to be turned into a patch.

How do we decide the RIGHT thing to do to determine how to support Google's clients?  It seems to me (as I said above) that the RIGHT place to make this work is in res_jabber, and we should probably either set "jingle capable" and/or some other flag that gets tested in chan_jabber.  But I don't know what, if any, real standardization is being done; Google may just be "doing whatever they want" with no intention of "allowing" interoperability with Asterisk or any other jabber clients.  If they started with "TalkGadget" and have now added "android", how do we know they won't add "bazoogle" tomorrow.  Or is there some other thing that can be checked.

Or should we just attempt the call to ANYTHING that has a resource?  Will we be able to figure out how to format messages in some general, interoperable way?


By: yokonunz (yokonunz) 2010-04-25 12:02:22

I tried it today and it is working :) but now the problem with this chan is to fix the possibility to receive calls from empathy pidgin and other clients. can you do something?

By: Leif Madsen (lmadsen) 2010-04-26 14:24:09

I'd rather the empathy/pidgin stuff be handled separately if calls from Gtalk web are fixed. This issue has been sitting here too long and we can always break the problems up into smaller pieces and relate them back here if necessary.

By: yokonunz (yokonunz) 2010-04-27 01:24:06

ok. the issue with other gtalk was closed for lack of testing, i'm here if you want to reopen it :) thanks

By: phsultan (phsultan) 2010-04-30 09:00:15

yokonunz: chan_jingle (not chan_gtalk) is probably the best way to interoperate with Empathy, Pidgin and PSI.

Please check this code : https://issues.asterisk.org/view.php?id=15634

By: Leif Madsen (lmadsen) 2010-04-30 14:03:34

Can someone give me a breakdown as to what this issue resolves, what is working now, and what is needed to get done to resolve this issue?

Also, if anything overlaps or requires other issues, please state which issues should be linked to this one, and why (i.e. if another issue is required to be resolved first, or if this one is required to resolve the other issue)

By: John Covert (jcovert) 2010-05-06 09:36:15

Let's try to stick to gtalk web here.

Here's my current status:

(1) My client is now successfully talking to Gtalk and Gtalk Web clients with the code as described at 0120451.  He runs

(2) I have just upgraded my own (Darwin) system to (.7 won't load on Darwin but that's not related to this) but haven't done anything about gtalk yet.

(3) The client who cares about Gtalk has authorized me to spend time getting a working version checked in to Asterisk.

(4) I have two other projects impending on my time, but would like to move this forward in the next three weeks.

I want to thank Pier for his work, but want to talk with phsultan about Pier's changes, since I think the big picture needs to be looked at a bit before committing those changes.  Would phsultan please contact me offline.

By: phsultan (phsultan) 2010-05-07 07:58:41

John, I'm on vacations for a few days, and will come back by the end of next week. I will get in touch with you as soon as possible.

By: Leif Madsen (lmadsen) 2010-05-10 11:11:47

Thanks for moving this forward guys! Good work!

By: Leif Madsen (lmadsen) 2010-08-12 13:31:39

Just wanted to ping this again :)

By: Thambi Sree (jsree) 2010-08-19 13:09:49

which version of asterisk will support webGtalk in chan_gtalk

By: Arie Skliarouk (skliarie) 2010-08-25 13:41:27

I confirm that calling from Google Web interface on Ubuntu 10.04 amd64 works.
I used today's checkout from

Excellent work, thank you!

By: outcast (outcast) 2010-09-14 12:34:23

Inbound now work with above mentioned branch, but something is broke in its chan_sip, so was not able to do a full test. But I was able route the call but there is an issue with RTP on the sip side.

By: outcast (outcast) 2010-09-15 09:03:37

Just retested I had something wrong with my sip settings. I now can confirm that work with audio have not test with video yet. that is next.

By: Leif Madsen (lmadsen) 2010-09-20 15:12:06

Can someone give an example of a working configuration? I can't seem to get past the error message I posted 2010-02-26 and I'm starting to think it's a configuration error I have on my end.

Also, do I just need the branch, or do I need the branch and the patches here?

By: Jan Zelenka (zeli) 2010-09-30 06:15:30

Hi, I have some observations for this topic. I am new here, so, please, be mercy:-)
In this (and other related topics) I have seen a problem with unexpected call termination after aprox. 30 sec. I had same difficulties and it has been solved with this line in gtalk.conf:
This line is not presented in wide-spreaded examples over the internet so it can causes problems at many users.
The second thing equals exactly to this topic. I've had a problem with calling from SIP client to web gtalk client as described higher. The opposite dirrection worked right. I've used pier's and jcovert's corrections in chan_gtalk.c and now I can also confirm that calls in both dirrections work perfectly. Thanks for this job!
At last I have a little off-topic question: Is there any (simple) way how to combine "gmail-voice-video" and "jingle-support" version of asterisk? I would like to use both functionalities - web gtalk telephony and gtalk chat function in one asterisk. May be we can discuss this on other thread or with private message but I did not find a way how to contact somebody. If you can navigate me I will appreciate it.

By: Paul Belanger (pabelanger) 2010-10-01 13:25:26

Just tested http://svn.digium.com/svn/asterisk/team/phsultan/gmail-voice-video and incoming calls worked right away.

By: outcast (outcast) 2010-10-01 13:41:11

has anyone linked their google voice account to they gtalk account? If so have you been able to recieve calls?

By: Leif Madsen (lmadsen) 2010-10-04 12:45:23

Updated the branch location to http://svn.asterisk.org/svn/asterisk/team/dvossel/gtalk_fixup/ as dvossel is now working on this and porting the changes from phsultans branch.

By: David Vossel (dvossel) 2010-10-14 16:31:59

gtalk and Google Voice calls now work in 1.8.