[Home]

Summary:ASTERISK-11526: problem with guest account in gtalk
Reporter:Clod Patry (junky)Labels:
Date Opened:2008-02-27 00:21:32.000-0600Date Closed:2008-06-02 09:34:29
Priority:MinorRegression?No
Status:Closed/CompleteComponents:Channels/chan_gtalk
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) branch-1.4-12085-1.diff
( 1) branch-1.4-12085-2.diff
Description:deer*CLI> gtalk show channels
Channel                         Jabber ID                       Resource         Read  Write
deer*CLI>

deadlocks...

deer*CLI> core show locks
deer*CLI>
=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 1073985856 (listener             started at [ 1062] asterisk.c ast_makesocket())
=== -------------------------------------------------------------------
===
=== Thread ID: 1074231616 (accept_thread        started at [ 2954] manager.c init_manager())
=== -------------------------------------------------------------------
===
=== Thread ID: 1074477376 (do_devstate_changes  started at [  378] devicestate.c ast_device_state_engine_init())
=== -------------------------------------------------------------------
===
=== Thread ID: 1074723136 (do_parking_thread    started at [ 2420] res_features.c load_module())
=== -------------------------------------------------------------------
===
=== Thread ID: 1075214656 (netconsole           started at [ 1004] asterisk.c listener())
=== ---> Lock #0 (chan_gtalk.c): MUTEX 1637 gtalk_show_channels &(&gtalk_list)->_lock 0x2aaac0c04c40 (1)
=== -------------------------------------------------------------------
===
=== Thread ID: 1074968896 (scan_thread          started at [  499] pbx_spool.c load_module())
=== -------------------------------------------------------------------
===
=== Thread ID: 1075460416 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1075706176 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1075951936 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076197696 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076443456 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076689216 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076934976 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077180736 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077426496 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077672256 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077918016 (sched_thread         started at [ 8761] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078163776 (network_thread       started at [ 8762] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078409536 (do_monitor           started at [ 6972] chan_zap.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078655296 (do_monitor           started at [ 1127] chan_phone.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078901056 (accept_thread        started at [ 4768] chan_skinny.c reload_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079146816 (do_monitor           started at [ 4582] chan_skinny.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079392576 (do_monitor           started at [15443] chan_sip.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079638336 (network_thread       started at [ 2198] pbx_dundi.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079884096 (process_precache     started at [ 2199] pbx_dundi.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080129856 (sla_thread           started at [ 4759] app_meetme.c sla_load_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080375616 (sound_thread         started at [ 1811] chan_oss.c store_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080621376 (sound_thread         started at [ 1811] chan_oss.c store_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080867136 (monitor_sig_flags    started at [ 2964] asterisk.c main())
=== -------------------------------------------------------------------
===
=== Thread ID: 1081604416 (aji_recv_loop        started at [ 2444] res_jabber.c aji_reload())
=== -------------------------------------------------------------------
===
=== Thread ID: 1081850176 (aji_recv_loop        started at [ 2444] res_jabber.c aji_reload())
=== -------------------------------------------------------------------
===
=== Thread ID: 1081112896 (netconsole           started at [ 1004] asterisk.c listener())
=== -------------------------------------------------------------------
===
=======================================================================

so the lock remains there.



****** ADDITIONAL INFORMATION ******

so if you exits the CLI and come back and type the same command (gtalk show channels), you will see a lot of:

[Feb 27 01:25:08] ERROR[11073]: /usr/src/asterisk-1.4.13/include/asterisk/lock.h:292 __ast_pthread_mutex_lock: chan_gtalk.c line 1637 (gtalk_show_channels): Deadlock? waited 5 sec for mutex '&(&gtalk_list)->_lock'?
[Feb 27 01:25:08] ERROR[11073]: /usr/src/asterisk-1.4.13/include/asterisk/lock.h:295 __ast_pthread_mutex_lock: chan_gtalk.c line 1637 (gtalk_show_channels): '&(&gtalk_list)->_lock' was locked here.
[Feb 27 01:25:08] ERROR[11073]: /usr/src/asterisk-1.4.13/include/asterisk/lock.h:292 __ast_pthread_mutex_lock: chan_gtalk.c line 1637 (gtalk_show_channels): Deadlock? waited 5 sec for mutex '&(&gtalk_list)->_lock'?
[Feb 27 01:25:08] ERROR[11073]: /usr/src/asterisk-1.4.13/include/asterisk/lock.h:295 __ast_pthread_mutex_lock: chan_gtalk.c line 1637 (gtalk_show_channels): '&(&gtalk_list)->_lock' was locked here.
[Feb 27 01:25:08] ERROR[11073]: /usr/src/asterisk-1.4.13/include/asterisk/lock.h:292 __ast_pthread_mutex_lock: chan_gtalk.c line 1637 (gtalk_show_channels): Deadlock? waited 5 sec for mutex '&(&gtalk_list)->_lock'?
[Feb 27 01:25:08] ERROR[11073]: /usr/src/asterisk-1.4.13/include/asterisk/lock.h:295 __ast_pthread_mutex_lock: chan_gtalk.c line 1637 (gtalk_show_channels): '&(&gtalk_list)->_lock' was locked here.

and again after the 2nd command were typed in CLI:
deer*CLI> core show locks
deer*CLI>
=======================================================================
=== Currently Held Locks ==============================================
=======================================================================
===
=== <file> <line num> <function> <lock name> <lock addr> (times locked)
===
=== Thread ID: 1073985856 (listener             started at [ 1062] asterisk.c ast_makesocket())
=== -------------------------------------------------------------------
===
=== Thread ID: 1074231616 (accept_thread        started at [ 2954] manager.c init_manager())
=== -------------------------------------------------------------------
===
=== Thread ID: 1074477376 (do_devstate_changes  started at [  378] devicestate.c ast_device_state_engine_init())
=== -------------------------------------------------------------------
===
=== Thread ID: 1074723136 (do_parking_thread    started at [ 2420] res_features.c load_module())
=== -------------------------------------------------------------------
===
=== Thread ID: 1075214656 (netconsole           started at [ 1004] asterisk.c listener())
=== ---> Lock #0 (chan_gtalk.c): MUTEX 1637 gtalk_show_channels &(&gtalk_list)->_lock 0x2aaac0c04c40 (1)
=== ---> Lock #1 (chan_gtalk.c): MUTEX 1637 gtalk_show_channels &(iterator)->_lock 0x910900 (1)
=== -------------------------------------------------------------------
===
=== Thread ID: 1074968896 (scan_thread          started at [  499] pbx_spool.c load_module())
=== -------------------------------------------------------------------
===r*CLI>
=== Thread ID: 1075460416 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1075706176 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1075951936 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076197696 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076443456 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076689216 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1076934976 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077180736 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077426496 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077672256 (iax2_process_thread  started at [ 8751] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1077918016 (sched_thread         started at [ 8761] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078163776 (network_thread       started at [ 8762] chan_iax2.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078409536 (do_monitor           started at [ 6972] chan_zap.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078655296 (do_monitor           started at [ 1127] chan_phone.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1078901056 (accept_thread        started at [ 4768] chan_skinny.c reload_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079146816 (do_monitor           started at [ 4582] chan_skinny.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079392576 (do_monitor           started at [15443] chan_sip.c restart_monitor())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079638336 (network_thread       started at [ 2198] pbx_dundi.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1079884096 (process_precache     started at [ 2199] pbx_dundi.c start_network_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080129856 (sla_thread           started at [ 4759] app_meetme.c sla_load_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080375616 (sound_thread         started at [ 1811] chan_oss.c store_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080621376 (sound_thread         started at [ 1811] chan_oss.c store_config())
=== -------------------------------------------------------------------
===
=== Thread ID: 1080867136 (monitor_sig_flags    started at [ 2964] asterisk.c main())
=== -------------------------------------------------------------------
===
=== Thread ID: 1081604416 (aji_recv_loop        started at [ 2444] res_jabber.c aji_reload())
=== -------------------------------------------------------------------
===
=== Thread ID: 1081850176 (aji_recv_loop        started at [ 2444] res_jabber.c aji_reload())
=== -------------------------------------------------------------------
===
=== Thread ID: 1081112896 (netconsole           started at [ 1004] asterisk.c listener())
=== ---> Waiting for Lock #0 (chan_gtalk.c): MUTEX 1637 gtalk_show_channels &(&gtalk_list)->_lock 0x2aaac0c04c40 (1)
=== -------------------------------------------------------------------
===
=== Thread ID: 1082341696 (iax2_process_thread  started at [  913] chan_iax2.c find_idle_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1083078976 (iax2_process_thread  started at [  913] chan_iax2.c find_idle_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1081358656 (iax2_process_thread  started at [  913] chan_iax2.c find_idle_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1082833216 (iax2_process_thread  started at [  913] chan_iax2.c find_idle_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1082587456 (iax2_process_thread  started at [  913] chan_iax2.c find_idle_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1082095936 (iax2_process_thread  started at [  913] chan_iax2.c find_idle_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1083324736 (iax2_process_thread  started at [  913] chan_iax2.c find_idle_thread())
=== -------------------------------------------------------------------
===
=== Thread ID: 1083570496 (netconsole           started at [ 1004] asterisk.c listener())
=== -------------------------------------------------------------------
===
=======================================================================



and now thru gdb at the moment the deadlocks is there:
(gdb) info threads
 33 Thread 1073985856 (LWP 10585)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 32 Thread 1074231616 (LWP 10586)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 31 Thread 1074477376 (LWP 10587)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 30 Thread 1074723136 (LWP 10588)  0x00002ba0fa64c9c2 in select () from /lib/libc.so.6
 29 Thread 1074968896 (LWP 10589)  0x00002ba0fa61a1d1 in nanosleep () from /lib/libc.so.6
 28 Thread 1075214656 (LWP 10590)  0x00002aaac09f8632 in __ast_pthread_mutex_lock (filename=0x2aaac0a02c50 "chan_gtalk.c", lineno=1637,
   func=0x2aaac0a03410 "gtalk_show_channels", mutex_name=0x2aaac0a02f53 "&(iterator)->_lock", t=0x910900)
   at /usr/src/asterisk-1.4.13/include/asterisk/lock.h:263
 27 Thread 1075460416 (LWP 10591)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 26 Thread 1075706176 (LWP 10592)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 25 Thread 1075951936 (LWP 10593)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 24 Thread 1076197696 (LWP 10594)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 23 Thread 1076443456 (LWP 10595)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 22 Thread 1076689216 (LWP 10596)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 21 Thread 1076934976 (LWP 10597)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 20 Thread 1077180736 (LWP 10598)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 19 Thread 1077426496 (LWP 10599)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 18 Thread 1077672256 (LWP 10600)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 17 Thread 1077918016 (LWP 10601)  0x00002ba0f9c7f987 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 16 Thread 1078163776 (LWP 10602)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 15 Thread 1078409536 (LWP 10603)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 14 Thread 1078655296 (LWP 10608)  0x00002ba0fa64c9c2 in select () from /lib/libc.so.6
 13 Thread 1078901056 (LWP 10609)  0x00002ba0f9c821fb in ?? () from /lib/libpthread.so.0
 12 Thread 1079146816 (LWP 10610)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 11 Thread 1079392576 (LWP 10611)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 10 Thread 1079638336 (LWP 10612)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 9 Thread 1079884096 (LWP 10613)  0x00002ba0fa61a1d1 in nanosleep () from /lib/libc.so.6
 8 Thread 1080129856 (LWP 10614)  0x00002ba0f9c7f796 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
 7 Thread 1080375616 (LWP 10615)  0x00002ba0fa64c9c2 in select () from /lib/libc.so.6
 6 Thread 1080621376 (LWP 10616)  0x00002ba0fa64c9c2 in select () from /lib/libc.so.6
 5 Thread 1080867136 (LWP 10617)  0x00002ba0fa64a8c6 in poll () from /lib/libc.so.6
 4 Thread 1081604416 (LWP 10659)  0x00002ba0fa64c9c2 in select () from /lib/libc.so.6
 3 Thread 1081850176 (LWP 10660)  0x00002ba0fa64c9c2 in select () from /lib/libc.so.6
 2 Thread 1081112896 (LWP 11073)  0x00002ba0fa61a1d1 in nanosleep () from /lib/libc.so.6
 1 Thread 47970398330256 (LWP 26152)  0x00002ba0f9c81fdb in ?? () from /lib/libpthread.so.0
(gdb) thread 28
[Switching to thread 28 (Thread 1075214656 (LWP 10590))]#0  0x00002aaac09f8632 in __ast_pthread_mutex_lock (filename=0x2aaac0a02c50 "chan_gtalk.c",
   lineno=1637, func=0x2aaac0a03410 "gtalk_show_channels", mutex_name=0x2aaac0a02f53 "&(iterator)->_lock", t=0x910900)
   at /usr/src/asterisk-1.4.13/include/asterisk/lock.h:263
263             int canlog = strcmp(filename, "logger.c");
(gdb) bt
#0  0x00002aaac09f8632 in __ast_pthread_mutex_lock (filename=0x2aaac0a02c50 "chan_gtalk.c", lineno=1637, func=0x2aaac0a03410 "gtalk_show_channels",
   mutex_name=0x2aaac0a02f53 "&(iterator)->_lock", t=0x910900) at /usr/src/asterisk-1.4.13/include/asterisk/lock.h:263
#1  0x00002aaac09fc70a in gtalk_show_channels (fd=10, argc=<value optimized out>, argv=<value optimized out>) at chan_gtalk.c:1609
#2  0x0000000000459577 in ast_cli_command (fd=10, s=<value optimized out>) at cli.c:1979
#3  0x000000000042823a in netconsole (vconsole=0x774b20) at asterisk.c:939
#4  0x00000000004ebaec in dummy_start (data=<value optimized out>) at utils.c:806
ASTERISK-1  0x00002ba0f9c7b2a5 in start_thread () from /lib/libpthread.so.0
ASTERISK-2  0x00002ba0fa65361d in clone () from /lib/libc.so.6
ASTERISK-3  0x0000000000000000 in ?? ()






and if you comment the guest context in gtalk.conf:
deer*CLI> gtalk show channels
Channel                         Jabber ID                       Resource         Read  Write
0 active gtalk channels
deer*CLI>

works like expects and no locks remains in the core show locks.


but the the guest account not active, call cant go in/out from the buddy list.


tested on 1.4.13 and 1.4.18 for the CLI lock problems.


Thanks to akaris from the AMUG for letting me a bug resulting in that one.
Comments:By: phsultan (phsultan) 2008-02-27 04:35:36.000-0600

Hi Claude,

can you post your jabber.conf and gtalk.conf files, please? Also, I'd like to know if some gtalk calls are handled when you issue the command. What happens if you type it before any gtalk call has been passed to/from Asterisk?

Thanks!

By: Clod Patry (junky) 2008-02-27 19:15:41.000-0600

hi philippe,
there was no active calls when I reproduce that bug.
Apparently, you can reproduce it really easily if you have a guest account defined in your gtalk.conf.

gtalk.conf:
[general]
context=google-in
allowguest=yes
bindaddr=70.83.17.183

[guest]
disallow=all
allow=ulaw
context=google-in


[buddy]
username=cpatry.jingle@gmail.com
disallow=all
allow=ulaw
context=google-in
connection=gtalk_account


[cpatryasterisk]
username=cpatry.asterisk@gmail.com
disallow=all
allow=ulaw
context=google-in
connection=gtalk_account2




jabber.conf:

[general]
debug=yes
autoprune=no
autoregister=no

[gtalk_account]
type=client
serverhost=talk.google.com
username=cpatry.jingle@gmail.com/Talk
secret=PASS
port=5222
usetls=yes
usesasl=yes
buddy=cpatry.jingle@gmail.com
buddy=juliedube01@gmail.com
buddy=gagnon.david@gmail.com
buddy=cyrusfreaker@gmail.com
buddy=pokstar@gmail.com
buddy=cpatry@gmail.com
buddy=klictel@gmail.com
buddy=christian.leclerc@sphere3solutions.com
buddy=bertrand.tohio@gmail.com
statusmessage="im an Asterisk server with jingle"
timeout=100


[gtalk_account2]
type=client
serverhost=talk.google.com
username=cpatry.asterisk@gmail.com/Talk
secret=PASS
port=5222
usetls=yes
usesasl=yes
buddy=cpatry.jingle@gmail.com
buddy=bertrand.tohio@gmail.com
buddy=juliedube01@gmail.com
buddy=gagnon.david@gmail.com
buddy=cyrusfreaker@gmail.com
buddy=pokstar@gmail.com
buddy=cpatry@gmail.com
buddy=klictel@gmail.com
buddy=christian.leclerc@sphere3solutions.com
statusmessage="im an Asterisk server with jingle"
timeout=100



By: phsultan (phsultan) 2008-02-28 02:47:24.000-0600

ok Claude, I could reproduce it by using two different jabber connections along with two gtalk accounts, just like in your case.

By: phsultan (phsultan) 2008-02-28 06:51:55.000-0600

Can you please try the attached patch? We're trying to link an Asterisk object to a container too many times in the case of the guest account.

By: Clod Patry (junky) 2008-02-29 22:19:01.000-0600

that solve that issue.
However,when I call from my gtalk application to my *. It doesnt work anymore.
when I answer, it still continue to ring in google talk app.
Here's the output when I answered:


   -- IAX2/5143155001-72 answered Gtalk/juliedube01-1673

JABBER: gtalk_account OUTGOING: <iq type='set' to='juliedube01@gmail.com/Talk.v1040B07F3A6' from='cpatry.asterisk@gmail.com/TalkA2FC0379' id='aaaau'><session xmlns='http://www.google.com/session' type='accept' initiator='juliedube01@gmail.com/Talk.v1040B07F3A6' id='1775923308'><description xmlns='http://www.google.com/session/phone' xml:lang='en'><payload-type id='0' name='PCMU' clockrate='8000' bitrate='64000'/><payload-type id='100' name='EG711U' clockrate='8000' bitrate='64000'/><payload-type id='106' name='telephone-event' clockrate='8000'/></description><transport xmlns='http://www.google.com/transport/p2p'/></session></iq>
deer*CLI>
JABBER: gtalk_account INCOMING: <iq type="error" to="cpatry.asterisk@gmail.com/TalkA2FC0379" from="juliedube01@gmail.com/Talk.v1040B07F3A6" id="aaaau"><session type="accept" initiator="juliedube01@gmail.com/Talk.v1040B07F3A6" id="1775923308" xmlns="http://www.google.com/session"><description xml:lang="en" xmlns="http://www.google.com/session/phone"><payload-type id="0" name="PCMU" clockrate="8000" bitrate="64000"/><payload-type id="100" name="EG711U" clockrate="8000" bitrate="64000"/><payload-type id="106" name="telephone-event" clockrate="8000"/></description><transport xmlns="http://www.google.com/transport/p2p"/></session><error code="400" type="modify"><bad-request xmlns="urn:ietf:params:xml:ns:xmpp-stanzas"/><text xmlns="urn:ietf:params:xml:ns:xmpp-stanzas">

JABBER: gtalk_account INCOMING: If set, the 'from' attribute must be set to the user's full JID.</text></error></iq>

JABBER: gtalk_account OUTGOING: <iq type='result' from='cpatry.asterisk@gmail.com/TalkA2FC0379' to='juliedube01@gmail.com/Talk.v1040B07F3A6' id='aaaau'/>
   -- Hungup 'IAX2/5143155001-72'
 == Spawn extension (macro-dialOutVoip, s, 6) exited non-zero on 'Gtalk/juliedube01-1673' in macro 'dialOutVoip'
 == Spawn extension (macro-dialOutVoip, s, 6) exited non-zero on 'Gtalk/juliedube01-1673'



You can notice the error.
Without that patch, the answer was working fine.






And if I try to dialout to a buddy:
   -- Executing [211@piovIncoming:3] Dial("IAX2/5144484188-95", "Gtalk/cpatry.asterisk@gmail.com/juliedube01@gmail.com") in new stack
[Feb 29 23:29:22] WARNING[29756]: chan_gtalk.c:1581 gtalk_request: Could not find recipient.
But cpatry.asterisk@gmail.com is a good one and juliedube01@gmail.com is in my buddy list.

Without that patch, I was unable to see the latest message, since this was looping with the guest account.

By: phsultan (phsultan) 2008-03-05 04:52:07.000-0600

We definitely need to have a better handling of this several XMPP clients situation that Asterisk connects with.

I'll be working on that, thanks for the report!

By: phsultan (phsultan) 2008-03-19 13:23:04

Claude, here is a new patch that solves the issue on my side, even though I only tested the GoogleTalk client -> Asterisk call configuration.

What it does :
- the guest account is not tied to any of the configured XMPP clients so we must choose this client depending on who is called (or who is calling) ;
- fix the ast_aji_get_client function that was not able to retrieve an XMPP client from its JID.

Can you please test this new patch? Thanks!

By: phsultan (phsultan) 2008-04-17 08:59:15

Hi Claude,

did you have any chance to test the latest patch?

By: Digium Subversion (svnbot) 2008-06-02 09:26:23

Repository: asterisk
Revision: 119740

U   branches/1.4/channels/chan_gtalk.c
U   branches/1.4/res/res_jabber.c

------------------------------------------------------------------------
r119740 | phsultan | 2008-06-02 09:26:20 -0500 (Mon, 02 Jun 2008) | 10 lines

Do not link the guest account with any configured XMPP client (in
jabber.conf). The actual connection is made when a call comes in
Asterisk.

Fix the ast_aji_get_client function that was not able to retrieve an
XMPP client from its JID.

(closes issue ASTERISK-11526)
Reported by: junky
Tested by: phsultan
------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=119740

By: Digium Subversion (svnbot) 2008-06-02 09:29:08

Repository: asterisk
Revision: 119741

U   trunk/channels/chan_gtalk.c
U   trunk/channels/chan_jingle.c
U   trunk/res/res_jabber.c

------------------------------------------------------------------------
r119741 | phsultan | 2008-06-02 09:28:54 -0500 (Mon, 02 Jun 2008) | 13 lines

Do not link the guest account with any configured XMPP client (in
jabber.conf). The actual connection is made when a call comes in
Asterisk.

Apply this fix to Jingle too.

Fix the ast_aji_get_client function that was not able to retrieve an
XMPP client from its JID.

(closes issue ASTERISK-11526)
Reported by: junky
Tested by: phsultan

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=119741

By: Digium Subversion (svnbot) 2008-06-02 09:34:29

Repository: asterisk
Revision: 119743

_U  branches/1.6.0/
U   branches/1.6.0/channels/chan_gtalk.c
U   branches/1.6.0/channels/chan_jingle.c
U   branches/1.6.0/res/res_jabber.c

------------------------------------------------------------------------
r119743 | phsultan | 2008-06-02 09:34:23 -0500 (Mon, 02 Jun 2008) | 21 lines

Merged revisions 119741 via svnmerge from
https://origsvn.digium.com/svn/asterisk/trunk

........
r119741 | phsultan | 2008-06-02 16:35:24 +0200 (Mon, 02 Jun 2008) | 13 lines

Do not link the guest account with any configured XMPP client (in
jabber.conf). The actual connection is made when a call comes in
Asterisk.

Apply this fix to Jingle too.

Fix the ast_aji_get_client function that was not able to retrieve an
XMPP client from its JID.

(closes issue ASTERISK-11526)
Reported by: junky
Tested by: phsultan

........

------------------------------------------------------------------------

http://svn.digium.com/view/asterisk?view=rev&revision=119743