The above combination works well for a while. When I leave the system in idle for a while (for abour few minutes) and press the pushbutton again, it wakes up and tries to send the message as expected (I can clearly see this on the terminal as debug messages). However, this time transmit errors are reported by the API. When I press the button for a few more times, the transmitter magically seems to recover and starts to operate exactly as intended. This error is reproducable by the way.
Maybe it is due to a setup time which the XBee modules need before sending messages. If you switch the module on after being off, you'll find out some delay until it works ok. How much time are we talking about? Try not to switch off the XBee module and see if there is any difference.
This time is longer for XBee-ZB than other XBee modules. ZB needs more setup time than 802, Digimesh, etc.