How VOIP works in 2.0.7

2.0.7  is feature complete and I am testing for bugs. I hope to have it submitted to Apple in a week. This will be the first release with XMPP jingle VOIP enabled.   The voice calling is still not perfect so I have left the Beta label on the button.  At the moment it does not use STUN or do any NAT traversal. If both people are on the same network or not behind NAT it will work fine. I hope to fix this in 2.0.8.

The call button will only show up if the other client advertises XMPP jingle audio support.

2.0.7 and beyond

A quick peek behind the curtain. As  many people are curious about the progress of  the next release, this is my current task list.  The critical features are absolutely needed for 2.0.7 release. The nice to have ones might get added. Some are pretty low hanging fruit.  At the moment it looks like we are set for a late August/ early September release for 2.0.7 followed by 2.0.8 about a month later with much of the features that are in nice to have.


facebook account settings needs to prepopulate (regression)
facebook contacts dont load.
Replace mutable array with better circular buffer
own ver string is generated from algorithm (maybe generate and store  in app rather than on each run)
pass presence obj to DB layer functions
store ver string  in DB table as well
add ver string look up table
link ver string to  XMPP disco caps
accept legacy caps function
only show call button in the buddy info screen if there is an audio cap (ver or legacy)
link call screen to jingle
create screen to pick resource with jingle call
ipad version of call screen
tapping on a notificaiton message takes you to the conversation

Nice  to have  in 2.07 but may get pushed in to 2.08: 

fix  server obj to store server caps, various servers (proxy, search. MUC etc)
message Carbons (discover  server cap and implement)
buddy list buttons should be in will appear  function and not did appear (reduce flashing)
SSL oldstyle  on any port
when there is a login failure it should say specifically what caused it
offer to reconnect in 5 seconds
move MUC into better object/Object array
MUC session config screen
MUC should remember it is open
Search contacts
Sort contacts by status
Group contacts by group


2.0.7 is coming

2.0.7 changelog so far.
This is a major update that adds many features and fixes bugs.
1. Added XMPP jingle VOIP features.
2. Remains open in the background until you logout
3. major bugfixes to improve stability
4. several UI enhancements/cosmetic changes
5. Removed AIM support due to AOL turning off servers
6. added more retina graphics
7. added tap gesture to dismiss keyboard
4. added improved 2 pane iPad view in portrait mode

Let there be VOIP!

This is easily  most complicated things I’ve ever written since college.   Core audio on ios kicked my butt and took me days  to figure it out and a networking error with RTP drove me nuts for a few more days.   I’ve never worked with RTP or audio before, so the whole exercise was highly educational.

Monal 2.07 will support XMPP jingle VOIP using XMPP jingle.  It will remain open in the background and will not close after 10 min and you can also make  calls  to people on google talk!

Jingles and Tribulations

As many of you may know I have been working on adding XMPP Jingle to the next release. The last two nights ive been up all night trying to get a RTP packet to go from one host to another. Everything looked ok but for some reason VOIP wouldnt work.  I’ve been sniffing my network looking for packets  and kept gettin 100% loss.  Host is sending out but nothing comes in the other end.   I just  noticed what was wrong.    Look at this packet capture log. Notice something odd about the second IP address? It should be

Who ever runs the 45.x.x.x network has probably blacklisted me for blasting UDP packets at them all the time in the wee hours of the night
This i why you should ALWAYS make sure that when two computers talk the bye order is network byte order and not host byte order!

Possible end of AIM support [Update: Confirmed]

Update: AOL has informed me that TOC2 protocol has been shut off.  AIM will be removed from  Monal.


It appears that AOL has ended support for the TOC2 protocol that Monal and many other clients use to connect to AIM service. I am going to try to contact AOL about this. I have not had any luck getting AIM to work and it certainly looks like the server has been taken offline.

Technical stuff below.


Toc2 is the successor to the TOC protocol which stands for talk to oscar, oscar being the main closed source protocol. Toc was the open protocol that allowed 3rd party clients on the AIM network but had less features. This was why AIM in monal didnt have buddy icons.   I used TOC because it was well documented and easy to write from scratch. I do not have time to figure out the much more complicated Oscar.

When connecting to TOc2 i have tried two possible servers, neither work.  I believe it is dead.

Becoming Active

2012-07-27 20:36:53.832 Monal[798:3e03] -[AIMTOC2 connect] [Line 857] stream  created to  server: port: 9898

2012-07-27 20:36:53.835 Monal[798:3e03] -[AIMTOC2 connect] [Line 877] Connected to  host

2012-07-27 20:36:53.855 Monal[798:c07] -[buddylist viewDidAppear:] [Line 735] buddy list ddid  appear

2012-07-27 20:36:53.856 Monal[798:440f] -[AIMTOC2 initilize] [Line 926] beginning login procedures

2012-07-27 20:36:53.877 Monal[798:440f] -[AIMTOC2 talk:] [Line 650] ostream ok..

2012-07-27 20:36:53.878 Monal[798:440f] -[AIMTOC2 talk:] [Line 656] sending: FLAPON

second try:

Becoming Active

2012-07-27 20:34:31.828 Monal[767:3d07] -[AIMTOC2 connect] [Line 857] stream  created to  server: port: 9898

2012-07-27 20:34:31.829 Monal[767:3d07] -[AIMTOC2 connect] [Line 877] Connected to  host

2012-07-27 20:34:31.834 Monal[767:c07] -[buddylist viewDidAppear:] [Line 735] buddy list ddid  appear
2012-07-27 20:34:31.837 Monal[767:4903] -[AIMTOC2 initilize] [Line 926] beginning login procedures

2012-07-27 20:34:31.838 Monal[767:4903] -[AIMTOC2 talk:] [Line 650] ostream ok..
2012-07-27 20:34:31.838 Monal[767:4903] -[AIMTOC2 talk:] [Line 656] sending: FLAPON






End of iOS 3.x support

I promised to keep supporting iOS 3.x users as long as I could. The time has finally arrived where there are compelling enough technologies in newer versions that I can’t support 3.x users anymore.   The new minimum requirement will be ios4 and that should include everything but the original iPhone.

2.0.6 Coming

2.0.6 is almost done. I am currently bug testing. Barring any major bugs it should be out in before x-mas.  Still no jingle. That will be a huge update, probably Monal 2.1

2.0.6 changelog

This is a major update that adds many features and fixes significant bugs.

1. fixed bug where close all chats closed even when clicking no
2. Added ability to swipe between active chat windows (issue #15)
3. tapping on a sliding message notification will take you to the conversation
4. keyboard correctly resets from symbols after sending a message
5. Chatlog is now organized by day instead of a large flat list
6. Changed icon set to support retina display
7. improved compatibility with old style SSL
8. tested to work with Oracle Beehive servers
9. Fixed bug with SASL authentication
10. Resolved ios5 issues with SSL
11. Fixed problems connecting to cisco webex servers
12. Shows own full name properly when in chat window
13. Fixed xmpp bug with iq query on vcard request (issue #55)
14. Added a cancel button below progress indicator to cancel a login attempt. (issue #26)
15. enabled Gtalk connections on 443