Hi Roger,
There is no easy response to your question! The 200 ok and ACK
in rfc3261 are handled independantly of the osip_transaction_t. This
is very important because many 200 ok (with different tag, route, contact,
dialog information) can be received for one INVITE being sent.
That means that even if you receive a 200 ok and prepare one ACK
for it, you also need to be prepared to receiving other 200 ok and send
other ACK. For each of those 200 ok/ACK, you need to handle retransmission
if required, as you described.
I'm in the process of looking at a patch that I received last week: this patch
propose to implement inside osip, the newer rfc6026 which discuss this
topic and propose some additionnal finite state machine for handling 200ok/ACK:
http://sip.antisip.com/0007-Implement-rfc6026-Correct-Transaction-Handling-for-2.patch
I have not yet read the patch//I'm busy until march... but this is a patch I intend
to integrate for later version. It might be a reason to create osip 5.0 within the
next month or 2!
eXosip layer already does all job in a different way. rfc6026 is an alternative
way to make it easier.
Answer is basically yes: you need to call yourself cb_send_message()
you can check how I did in exosip (starting from) _eXosip_snd_message.
In theory, all 200ok needs to be sent to the same IP:PORT, and all ACK
needs to be sent to the same IP:PORT. (so you should not look at via the
second time, but instead, you need to re-use the exact ip:port you used
for first one)
Either the cb_send_message is taking care of this (as in exosip, mostly)
or your upper layer byu deciding the argument for cb_send_message...
Regards
Aymeric