[Home]

Summary:ASTERISK-13502: Asterisk login issue due to, unavailability of handling unicode status messages in agi_handle_presence method of res_jabber.c
Reporter:vijayendra chauhan (vijayendra)Labels:
Date Opened:2009-02-03 00:25:00.000-0600Date Closed:2009-05-20 08:52:40
Priority:MajorRegression?No
Status:Closed/CompleteComponents:Resources/res_jabber
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:
Description:Dear All,

I have been testing and using asterisk 1.4.22 version from last 2 months and learned allot about Asterisk features and also implemented mosts of them. I come across with a serious issue.
Asterisk is unable to login to gmail accounts. Its keep on connecting and disconnected. It seems like it have been stuck somewhere in while loop case.
Then i tracks the asterisk source code and logs generated in asterisk CLI. And found that asterisk is unable to parse presence packets having the status as some unicode message in res_jabber.c (function agi_handle_presence).

I temporarilly fixes the problem. But will stuck asterisk in future.

Go through the below logs:
JABBER: asterisk OUTGOING: <presence type='subscribe' to='xxxxxx@gmail.com'><status>Greetings I am the Asterisk Open Source PBX and I want to subscribe to your presence
</status></presence>
asterisk*CLI>
JABBER: asterisk OUTGOING: <presence type='subscribe' to='xxxxxxx@gmail.com'><status>Greetings I am the Asterisk Open Source PBX and I want to subscribe to your presence
</status></presenceasterisk*CLI>
JABBER: asterisk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gmail.com' version='1.0'>
asterisk*CLI>
JABBER: asterisk INCOMING: <?xml version="1.0" encoding="UTF-8"?><stream:stream from="gmail.com" id="D66F8AAFA2A52B80" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
asterisk*CLI>
JABBER: asterisk INCOMING: <stream:features><mechanisms xmlns="urn:ietf:params:xml:ns:xmpp-sasl"><mechanism>PLAIN</mechanism><mechanism>X-GOOGLE-TOKEN</mechanism></mechanisms></stream:features>
asterisk*CLI>
JABBER: asterisk OUTGOING: <auth xmlns='urn:ietf:params:xml:ns:xmpp-sasl' mechanism='PLAIN'>AGFhc2hpbS4wMDcAdGF1cnVzMTk4Mw==</auth>
asterisk*CLI>
JABBER: asterisk INCOMING: <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl"/>
asterisk*CLI>
JABBER: asterisk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gmail.com' version='1.0'>
asterisk*CLI>
JABBER: asterisk INCOMING: <?xml version="1.0" encoding="UTF-8"?><stream:stream from="gmail.com" id="17ADD87DAD30606F" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
asterisk*CLI>
JABBER: asterisk INCOMING: <stream:features><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"/><session xmlns="urn:ietf:params:xml:ns:xmpp-session"/></stream:features>
asterisk*CLI>
JABBER: asterisk OUTGOING: <iq type='set' id='aaaae'><bind xmlns='urn:ietf:params:xml:ns:xmpp-bind'><resource>Talk03EBA391</resource></bind></iq>
asterisk*CLI>
JABBER: asterisk OUTGOING: <iq type='set' id='auth'><session xmlns='urn:ietf:params:xml:ns:xmpp-session'/></iq>
asterisk*CLI>
JABBER: asterisk INCOMING: <iq id="aaaae" type="result"><bind xmlns="urn:ietf:params:xml:ns:xmpp-bind"><jid>aaaaa@gmail.com/Talk03EBA391</jid></bind></iq>
asterisk*CLI>
JABBER: asterisk OUTGOING: <presence from='aaaaa@gmail.com/Talk03EBA391'><status>"Cellebrum Talk To Pandit Service"</status><c node='http://www.asterisk.org/xmpp/client/caps' ver='asterisk-xmpp' ext='voice-v1' xmlns='http://jabber.org/protocol/caps'/></presence>
asterisk*CLI>
JABBER: asterisk OUTGOING: <iq type='get' id='roster'><query xmlns='jabber:iq:roster'/></iq>
asterisk*CLI>
JABBER: asterisk INCOMING:
asterisk*CLI>
JABBER: asterisk INCOMING: <iq type="result" id="auth"/>
asterisk*CLI>
JABBER: asterisk INCOMING: <iq to="aaa@gmail.com/Talk03EBA391" id="roster" type="result"><query xmlns="jabber:iq:roster"><item jid="" subscription="both"/><item jid="" subscription="both"/><item jid="neha18@neha.com" subscription="none" ask="subscribe" name="Neha Sharma> Love hurts alot> M**U"/><item jid="" subscription="none" ask="subscribe"/><item jid="" subscription="both" name=""/><item jid="" subscription="both" name="BHAWNA..... B< 2 >QU@RE 1"/><item jid="" subscription="both"/><item jid="" subscription="none" ask="subscribe" name="GoÏιkα ~RÑÏâα¢ιη Ð¼Ñ Ïαιη ÏιÑн ÑÏмÑнιη ηÏмв.!!"/><item jid="" subscription="both"/><item jid="" subscription="both"/><item jid="
asterisk*CLI>
JABBER: asterisk INCOMING: " subscription="none" ask="subscribe" name="мÑÑÑÑâÑιηÑιâÑ3.0 à¹Ñ รà¹à¸Ð³tÑà¹! à¹Ñ à¹à¸ Å¦à¹Ð³à¹Ñà¹!"/><item jid="" subscription="both" name="MEHR: M!$$ EXTR@ HOT R@TE>\
D!!"/><item jid="" subscription="both" name="!!~!!Poonam!!~!! I love MY INDIA"/><item jid="" subscription="none" ask="subscribe"/><item jid="" subscription="none" ask="subscribe"/><item jid="" subscription="both" name="BABA"/><item jid="" subscription="both"/><item jid="" subscription="both"/><item jid="" subscription="both"/><item jid="" subscription="none" ask="subscribe" name="urmi!a~~~~ foreva n alwyz~~"/><item jid="" subscription="both" name="
******************Point of Error ****************** ************
******************Asterisk stucks at this point as it is not able to handle unicode data packets ***********************************************
*******
asterisk*CLI>
JABBER: asterisk OUTGOING: <?xml version='1.0'?><stream:stream xmlns:stream='http://etherx.jabber.org/streams' xmlns='jabber:client' to='gmail.com' version='1.0'>
asterisk*CLI>
JABBER: asterisk INCOMING: <?xml version="1.0" encoding="UTF-8"?><stream:stream from="gmail.com" id="A8F99601D6B2324F" version="1.0" xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client">
asterisk*CLI>
JABBER: asterisk OUTGOING: <starttls xmlns='urn:ietf:params:xml:ns:xmpp-tls'/>


There is no error message displayed by asterisk. But it stucks.

regards,
chauhan


Comments:By: phsultan (phsultan) 2009-02-03 10:33:25.000-0600

Interesting. Do you have a workaround or patch? If so, please post it here, after having filed your license agreement, so we can fix this problem.

Thanks!

By: vijayendra chauhan (vijayendra) 2009-02-04 05:35:02.000-0600

I dont have a patch , I mannually managed the error. If some user keeps his status message in some unicode message form. Asterisk is unable to undersatnd the same.

thanks!

By: vijayendra chauhan (vijayendra) 2009-02-04 05:38:28.000-0600

I am unable to locate the issue as its not providing any error message or exception. Its smply keeps on connecting and disconnecting google account.

I have tried to make some changes in res_jabber.c's aji_handle_presence() method. But it didn't effect the case.

Thanks!

By: Leif Madsen (lmadsen) 2009-05-20 07:53:55

Pinging this issue. Is there anything we can do here to resolve this issue, or should we close it as "not able to reproduce" ?

By: phsultan (phsultan) 2009-05-20 08:22:46

Well, to be honest, I don't know how to solve this bug, nor was I able to reproduce it.

Leif, I think we can close the bug as nobody even posted a patch to fix it.

By: Leif Madsen (lmadsen) 2009-05-20 08:52:39

Closed due to an inability to reproduce. Please reopen if you have a patch or additional information that could move this issue forward. Thanks!