[Home]

Summary:ASTERISK-18084: chan_gtalk only receives calls from Gtalk Android but not viceversa
Reporter:Augusto Henrique Petzinger (apetzinger)Labels:
Date Opened:2011-07-02 08:55:53Date Closed:2011-07-15 11:58:42
Priority:MajorRegression?Yes
Status:Closed/CompleteComponents:Channels/chan_gtalk Resources/res_jabber
Versions:1.8.4 Frequency of
Occurrence
Constant
Related
Issues:
is the original version of this clone:ASTERISK-18206 CLONE - chan_gtalk only receives calls from Gtalk Android
is the original version of this clone:ASTERISK-18661 CLONE - chan_gtalk only receives calls from Gtalk Android
Environment:Centos OS 5.5 - 2.6.18-238.12.1.el5 kernelAttachments:
Description:The client android (gtalk) support voice and video, is ginglerbread 2.3.4, and version is 1.3.
Asterisk normally receive voice calls, but do not for the client, text only.
I think it has to do with Jingle capable: no, because the client's Web gtlak is yes, but the Android client is "NO"
Android Client:
       Buddy:  augusto@xxx
               Resource: android3d8b2e790a48
                       node: http://www.android.com/gtalk/client/caps
                       version: 1.1
                       Jingle capable: no
               Status: 3
jabber debug:
JABBER: asterisk INCOMING: <presence from="augusto@xxx/android9a105ca0eaeb" to="sip@xxx.com.br"><priority>24</priority><caps:cnode="http://www.android.com/gtalk/client/caps" ext="pmuc-v1 voice-v1 video-v1" ver="1.1" xmlns:caps="http://jabber.org/protocol/caps"/><status/><x xmlns="vcard-temp:x:update"><photo>5533866a0bb07c4fbbc49c6de940bfd78dc650b0</photo></x></presence>

Web Client
       Buddy:  augusto@xxx
               Resource: gmail.E88B6649
                       node: http://mail.google.com/xmpp/client/caps
                       version: 1.1
                       Jingle capable: yes
               Status: 1
               Priority: 24
Debug debug:
JABBER: asterisk INCOMING: <presence from="augusto@xxx/gmail.E84EB883" to="sip@xxx.com.br"><priority>24</priority><caps:cnode="http://mail.google.com/xmpp/client/caps" ver="1.1" ext="pmuc-v1 sms-v1 camera-v1 video-v1 voice-v1" xmlns:caps="http://jabber.org/protocol/caps"/><status/><x xmlns="vcard-temp:x:update"><photo>5533866a0bb07c4fbbc49c6de940bfd78dc650b0</photo></x></presence>

Only diference is sms-v1 camera-v1 in debug
Thanks

Comments:By: Leif Madsen (lmadsen) 2011-07-11 14:33:22.092-0500

Assigning this to Terry because it looks like he has either fixed this already, or it will be fixed in 1.8 very soon after he commits his changes.

By: Terry Wilson (twilson) 2011-07-11 18:28:23.440-0500

@Augusto I've done a lot of testing and had someone else do testing and both worked fine. I'm going to need the output of 'jabber set debug on' to see what is going on in your case.

By: Augusto Henrique Petzinger (apetzinger) 2011-07-11 19:27:20.022-0500

JABBER: asterisk INCOMING: <presence id="jIIoB8G-401" type="unavailable" from="augusto@status.com.br/android3d8b2e790a48" to="sip@status.com.br"><priority>24</priority><caps:c node="http://www.android.com/gtalk/client/caps" ver="1.1" xmlns:caps="http://jabber.org/protocol/caps"/></presence>
[Jul 11 20:53:05] DEBUG[10406] res_jabber.c: JABBER: Handling paktype PRESENCE
[Jul 11 20:53:10] VERBOSE[10406] res_jabber.c:
JABBER: asterisk INCOMING: <presence from="augusto@status.com.br/android3d8b2e790a48" to="sip@status.com.br"><priority>24</priority><caps:c node="http://www.android.com/gtalk/client/caps" ext="pmuc-v1 voice-v1 video-v1" ver="1.1" xmlns:caps="http://jabber.org/protocol/caps"/><status/><x xmlns="vcard-temp:x:update"><photo>5533866a0bb07c4fbbc49c6de940bfd78dc650b0</photo></x></presence>
[Jul 11 20:53:10] VERBOSE[10406] res_jabber.c:
JABBER: asterisk OUTGOING: <iq type='get' to='augusto@status.com.br/android3d8b2e790a48' from='sip@status.com.br/asterisk866DD99D' id='aaaaj'><query xmlns='http://jabber.org/protocol/disco#info'/></iq>
[Jul 11 20:53:10] DEBUG[10406] res_jabber.c: JABBER: Handling paktype PRESENCE
[Jul 11 20:53:10] VERBOSE[10406] res_jabber.c:
JABBER: asterisk INCOMING: <iq type="result" from="augusto@status.com.br/android3d8b2e790a48" to="sip@status.com.br/asterisk866DD99D" id="aaaaj"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="account" type="registered" name="Google Talk User Account"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="http://jabber.org/protocol/disco#items"/></query></iq>
[Jul 11 20:53:10] DEBUG[10406] res_jabber.c: JABBER: Handling paktype IQ


By: Augusto Henrique Petzinger (apetzinger) 2011-07-11 19:29:07.743-0500

Hi Terry,
I'll test it in another phone with android.
I want to make clear that Web-based client or via GTALK windows works ok.
Just does not work for GTALK for android.
Thanks


By: Augusto Henrique Petzinger (apetzinger) 2011-07-11 19:32:45.096-0500

]# cat jabber.conf
[general]
;debug=yes                              ; Enable debugging (disabled by default).
;autoprune=yes                          ; Auto remove users from buddy list. Depending on your
                                       ; setup (ie, using your personal Gtalk account for a test)
                                       ; you might lose your contacts list. Default is 'no'.
autoregister=yes                        ; Auto register users from buddy list.
collection_nodes=yes                    ; Enable support for XEP-0248 for use with
                                       ; distributed device state.  Default is 'no'.
;pubsub_autocreate=yes                  ; Whether or not the PubSub server supports/is using
                                       ; auto-create for nodes.  If it is, we have to
                                       ; explicitly pre-create nodes before publishing them.
                                       ; Default is 'no'.
;auth_policy=accept                     ; Auto accept users' subscription requests (default).
                                       ; Set to deny for auto denial.

[asterisk]
type=client                             ; Client or Component connection
serverhost=talk.google.com              ; Route to server for example, talk.google.com
;pubsub_node=pubsub.astjab.org          ; Node to use for publishing events via PubSub
;distribute_events=yes                  ; Whether or not to distribute events using
                                       ; this connection.  Default is 'no'.
username=sip@status.com.br              ; Username with optional resource.
secret=secret                           ; Password
;priority=1                             ; Resource priority
port=5222                               ; Port to use defaults to 5222
usetls=yes                              ; Use tls or not
usesasl=yes                             ; Use sasl or not
buddy=sip@status.com.br                 ; Manual addition of buddy to list.
                                       ; For distributed events, these buddies are
                                       ; automatically added in the whitelist as
                                       ; 'owners' of the node(s).
status=available                        ; One of: chat, available, away, xaway, or dnd
statusmessage="Asterisk Server de Status - Somente recebo ligacao com voz, nao mande mensagens de texto"        ; Have custom status message for
timeout=15                              ; Timeout (in seconds) on the message stack, defaults to 5.
                                       ; Messages stored longer than this value will be deleted by Asterisk.
                                       ; This option applies to incoming messages only, which are intended to
                                       ; be processed by the JABBER_RECEIVE dialplan function.

# cat gtalk.conf
[general]
context=from-pstn               ;;Context to dump call into ; default
bindaddr=0.0.0.0                ;;Address to bind to
externip=201.25.27.147          ; Set your external ip if you are behind a NAT.
;stunaddr=mystunserver.com      ; Get your external ip from a STUN server.
                               ; Note, if the STUN query is successful, this will
                               ; replace any value placed in externip;
allowguest=yes                  ;;Allow calls from people not in

[guest]                 ; special account for options on guest account
disallow=all
allow=alaw,ulaw
context=from-pstn
;context=custom-gtalk
connection=asterisk

;[asterisk]
;username=sip@status.com.br     ;;username of the peer your
                       ;;calling or accepting calls from
;disallow=all
;allow=ulaw
;context=google-in
;connection=asterisk            ;;client or component in jabber.conf
                               ;;for the call to leave on.



By: Augusto Henrique Petzinger (apetzinger) 2011-07-15 11:58:42.178-0500

Hi Terry,

Unfortunately I did tests with another android gtalk client and did not work.
I posted the configuration files and also the debug files.
Also now put the dial string ... gtalk/asterisk/augusto@ status.com.br
If you have anything else that can help, please ask.
thanks


By: Claudio Pizzillo (claudiopizzillo) 2011-09-30 03:08:41.624-0500

Hi same problem here on asterisk 1.8.7.0:

{code}
[2011-09-30 09:41:07] VERBOSE[2735] netsock.c:   == Using UDPTL TOS bits 184
[2011-09-30 09:41:07] VERBOSE[2735] netsock.c:   == Using UDPTL CoS mark 5
[2011-09-30 09:41:07] VERBOSE[2735] netsock2.c:   == Using SIP RTP TOS bits 184
[2011-09-30 09:41:07] VERBOSE[2735] netsock2.c:   == Using SIP RTP CoS mark 5
[2011-09-30 09:41:07] VERBOSE[12883] pbx.c:     -- Executing [701@from-internal:1] Goto("SIP/2-00000064", "google-out,s,1") in new stack
[2011-09-30 09:41:07] VERBOSE[12883] pbx.c:     -- Goto (google-out,s,1)
[2011-09-30 09:41:07] VERBOSE[12883] pbx.c:     -- Executing [s@google-out:1] NoOp("SIP/2-00000064", " Call for Gtalk ") in new stack
[2011-09-30 09:41:07] VERBOSE[12883] pbx.c:     -- Executing [s@google-out:2] Dial("SIP/2-00000064", "gtalk/asterisk/XXXXXXX@gmail.com") in new stack
[2011-09-30 09:41:07] ERROR[12883] chan_gtalk.c: no gtalk capable clients to talk to.
[2011-09-30 09:41:07] WARNING[12883] app_dial.c: Unable to create channel of type 'gtalk' (cause 0 - Unknown)
[2011-09-30 09:41:07] VERBOSE[12883] app_dial.c:   == Everyone is busy/congested at this time (1:0/0/1)
[2011-09-30 09:41:07] VERBOSE[12883] pbx.c:     -- Auto fallthrough, channel 'SIP/2-00000064' status is 'CHANUNAVAIL'
{code}

This is the jabber buddies status:

{code}
pbx*CLI> jabber show buddies
Jabber buddy lists
Client: YYYYYYY@gmail.com/Talk
       Buddy:  YYYYYYY@gmail.com
               Resource: Talk6DB56D7F
                       node: http://www.asterisk.org/xmpp/client/caps
                       version: asterisk-xmpp
                       Jingle capable: yes
               Status: 1
               Priority: 0
       Buddy:  XXXXXXX@gmail.com
               Resource: android1cd6fad4fa74
                       node: http://www.android.com/gtalk/client/caps2
                       version: 1.1
                       Jingle capable: no
               Status: 1
               Priority: 24
{code}

Naturally i can call and receive from gmail users and i can receive calls from android gtalk users (on nexus s 2.3.5).

By: Lorenzo Braghetto (monossido) 2012-01-31 09:45:38.732-0600

I've made a simply (dirty) workaround to fix this, it is avaiable here https://gist.github.com/1710331

By: Lorenzo Braghetto (monossido) 2012-02-02 12:49:26.251-0600

There is another issue with Android 4.0 Gtalk client, when someone try to call from gtalk, asterisk can't parse the jabber datas:

"chan_gtalk.c:2005 gtalk_parser: No attribute "type" found.  Ignoring message."

In fact gtalk closes the </jingle> tag before open the <session> one...here there is a fix https://gist.github.com/1725076

By: Lorenzo Braghetto (monossido) 2012-02-02 14:06:13.621-0600

previous fix create an issue with outgoing calls, here is a fix also for that!
https://gist.github.com/1725447

By: Claudio Pizzillo (claudiopizzillo) 2012-02-03 03:31:37.431-0600

Error compiling: chan_gtalk.c:616: error: tmp2 undeclared (first use in this function)
Asterisk 1.8.9.0 after https://gist.github.com/1725447 patch.

Grazie.

By: Lorenzo Braghetto (monossido) 2012-02-03 04:33:25.460-0600

oH sorry, there is a missing
"iks *tmp2;"
after
"int peernoncodeccapability;"   line 612

I'll update the diff on gist.github.com

prego ;)

By: Claudio Pizzillo (claudiopizzillo) 2012-02-06 11:48:30.937-0600

Ok, everything is working now.

Thanks. Tested on GB 2.3.5, 2.3.6, 2.3.7, ICS 4.0.3 and HC 3.2.



By: Brian Czapiga (evool) 2012-03-18 17:17:47.720-0500

This is still an issue in 10.2.1. Cannot get asterisk to answer when using the Google Talk client on ICS 4.0.2.

Message is:
[Mar 18 15:08:48] NOTICE[24186]: chan_gtalk.c:2086 gtalk_parser: No attribute "type" found.  Ignoring message.

Will the above patch be merged into 10?

By: vikas (vikas) 2012-05-02 01:48:51.530-0500

I am using Asterisk 1.8.11.1 version.
I have tried all the patches which have mentioned above for asterisk to gtalk android call.

But the issues are not solved I got the following error

-- Attempting call on Gtalk/google_talk/gmail_id@gmail.com for XXXXXXX@gv:1 (Retry 1)
[May  2 12:17:28] ERROR[7930]: chan_gtalk.c:1023 gtalk_alloc: no gtalk capable clients to talk to.
[May  2 12:17:28] NOTICE[7930]: channel.c:5325 __ast_request_and_dial: Unable to request channel Gtalk/google_talk/gmail_id@gmail.com
[May  2 12:17:28] NOTICE[7930]: pbx_spool.c:353 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?)
[May  2 12:17:28] NOTICE[7930]: pbx_spool.c:356 attempt_thread: Queued call to Gtalk/google_talk/gmail_id@gmail.com expired without completion after 0 attempts

By: Zohair Raza (zuhairraza) 2012-06-06 08:12:05.748-0500

Hi,

I can't get it working on android ICS 4.0.4 and asterisk 1.8.12

Same error message after applying patch
chan_gtalk.c:2009 gtalk_parser: No attribute "type" found.  Ignoring message.


       Buddy:  XXXXXX@gmail.com
               Resource: gmail.BBDDD1F1
                       node: http://mail.google.com/xmpp/client/caps
                       version: 1.1
                       Jingle capable: yes
               Status: 1
               Priority: 24
               Resource: Talk.v104E7CDA757
                       node: http://www.google.com/xmpp/client/caps
                       version: 1.0.0.104
                       Jingle capable: yes
               Status: 1
               Priority: 24
       Buddy:  YYYYY@gmail.com
               Resource: android_talk5bba4779c0af
                       node: http://www.android.com/gtalk/client/caps
                       version: 1.1
                       Jingle capable: no
               Status: 1
               Priority: 24
               Resource: gmail.BA249B47
                       node: http://mail.google.com/xmpp/client/caps
                       version: 1.1
                       Jingle capable: yes
               Status: 3
               Priority: 0




By: Zohair Raza (zuhairraza) 2012-06-07 01:01:15.863-0500

Hi Lorenzo,

I have commented on the same issue yesterday, your patch is not working for me.

can you pleas help me

By: Shady Elashi (shadyelashi1984) 2013-01-04 14:28:06.824-0600

Hi, I've spent alot of time trying to figure out how to deply patch specified here https://gist.github.com/1725447

Do I need to modify a specific file? Not uch instructions there, please help...

Problem: android talk is not able to call asterisk because of the closed "jingle" message before "session" message.