osip-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [osip-dev] How to resend final response?


From: Aymeric Moizard
Subject: Re: [osip-dev] How to resend final response?
Date: Mon, 16 Feb 2015 23:28:52 +0100

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


2015-02-16 21:23 GMT+01:00 Roger Schreiter <address@hidden>:
Hello,

osip closes imho an IST as soon, as osip sends a
final response, e.g. 200 Ok.

In order to test, whether the client is sending the ACK,
I'm not removing the transaction immediately, when the
cb_kill_transaction is called, but I'm keeping the transaction
still for some seconds. When the ACK arrives, I look for the
matching transaction, remove it, and everythig is fine.

When the ACK is not arriving whithin half a second, imho I
should resend my last answer. osip_transaction_t is very useful for
that and storing my last answer. Thus most of the work is already done.

My problem is, how to send the response again?

Is there a function in osip, doing it?
(Imho, I cannot add a new event to the transaction for that task.)

Should I call my cb_send_message(), as I already did for sending
the ACK? In that case, I only would need a mean to figure out
the host and the port.
I wonder, if in osip_transaction_t "top_via" is indicating it.

Regards,
Roger.

_______________________________________________
osip-dev mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/osip-dev



--
Antisip - http://www.antisip.com

reply via email to

[Prev in Thread] Current Thread [Next in Thread]