Hi Everyone
I am manually processing sdp and handling media so I want to repond to ACK myself instead of forwarding on for media server.
I catch the method=="ACK" condition. From within this condition how do I retrieve avp variables that were set in the INVITE. Requesting $avp("myvar") comes out as null.
Also what function can I run so the ACK is replied to properly so it stops resending 200 OK of the Invite.
Hello,
I think you may be missing a couple of key fundamentals of SIP protocol mechanics:
1) By definition, one cannot respond to an ACK; an ACK garners no responses.
2) End-to-end ACKs for 2xx INVITE responses are generated by a SIP UA; a proxy simply cannot behave as though it were an endpoint since it has no hand in SDP negotiation.
So, you really have no choice but to forward an end-to-end ACK to the destination for which it is intended. If you intercepted it at the proxy and absorbed it somehow, the UA that is waiting for it (the callee) would eventually end the dialog because it remains in established-nonconfirmed state.
Now, as far as Kamailio goes: an ACK is a separate transaction from the INVITE to which it corresponds, and accordingly, does not have access to transaction-persistent variables associated with that INVITE. There are two or three ways to maintain dialog-persistent variables:
1) Stuff them into Record-Route parameters.
2) Put them in htable entries.
3) Use $dlg_var():
http://www.kamailio.org/wiki/cookbooks/4.3.x/pseudovariables#dlg_var_key
However, whatever you're trying to do here, it doesn't sound like it's going to work. I would encourage you to acquire a deeper understanding of SIP before proceeding further.
-- Alex
Well technically there could be SDP in ACK as well, in the body-less INVITE scenario. I am not sure if it's the case here, though. Other than that, it's correct, final positive ACK in RFC3261 is end-to-end, so that proxy is just passive retranslator for that. On Mar 9, 2016 5:07 PM, "Alex Balashov" abalashov@evaristesys.com wrote:
Hello,
I think you may be missing a couple of key fundamentals of SIP protocol mechanics:
- By definition, one cannot respond to an ACK; an ACK garners no
responses.
- End-to-end ACKs for 2xx INVITE responses are generated by a SIP UA; a
proxy simply cannot behave as though it were an endpoint since it has no hand in SDP negotiation.
So, you really have no choice but to forward an end-to-end ACK to the destination for which it is intended. If you intercepted it at the proxy and absorbed it somehow, the UA that is waiting for it (the callee) would eventually end the dialog because it remains in established-nonconfirmed state.
Now, as far as Kamailio goes: an ACK is a separate transaction from the INVITE to which it corresponds, and accordingly, does not have access to transaction-persistent variables associated with that INVITE. There are two or three ways to maintain dialog-persistent variables:
Stuff them into Record-Route parameters.
Put them in htable entries.
Use $dlg_var():
http://www.kamailio.org/wiki/cookbooks/4.3.x/pseudovariables#dlg_var_key
However, whatever you're trying to do here, it doesn't sound like it's going to work. I would encourage you to acquire a deeper understanding of SIP before proceeding further.
-- Alex
-- Alex Balashov | Principal | Evariste Systems LLC 1447 Peachtree Street NE, Suite 700 Atlanta, GA 30309 United States
Tel: +1-800-250-5920 (toll-free) / +1-678-954-0671 (direct) Web: http://www.evaristesys.com/, http://www.csrpswitch.com/
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello,
On 10/03/16 02:00, jaflong jaflong wrote:
[...]
Also what function can I run so the ACK is replied to properly so it stops resending 200 OK of the Invite.
to get the 200 OK retransmission stopped, you have to forward the ACK, because the 200ok is generated by the party expecting to receive the ACK.
Cheers, Daniel
Hi,
Is your question related to t_newtran() and t_reply("200", "OK")? (http://lists.sip-router.org/pipermail/sr-users/2016-March/092123.html) Then you should be able to drop the ACK using "exit;" tm module should see the ACK is related to the "200 OK".
Do you see retransmissions from kamailio?
Regards, Kristian Høgh Uni-tel A/S
On Thursday 10 March 2016 04:00:24 jaflong jaflong wrote:
Hi Everyone
I am manually processing sdp and handling media so I want to repond to ACK myself instead of forwarding on for media server.
I catch the method=="ACK" condition. From within this condition how do I retrieve avp variables that were set in the INVITE. Requesting $avp("myvar") comes out as null.
Also what function can I run so the ACK is replied to properly so it stops resending 200 OK of the Invite.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
*Kristian Høgh*
Telefon: 4422 8822 support@uni-tel.dk[1]
Gydevang 19 | 3450 Allerød www.uni-tel.dk [2]
-------- [1] mailto:support@uni-tel.dk [2] http://www.uni-tel.dk
On 10/03/16 15:10, jaflong jaflong wrote:
Yes it is related to my earlier question and your information helped me.
Again you have pointed me in the right direction. I did see retransmissons from kamailio. Doing a 't' action in the ACK ceased resending of the 200 OK i used t_relay it resolved my issue and this is convenient as as I can send to my media service and parse data from it.
The only thing I still need to work out is how to get data set on the INVITE sdp (rtp media ports). I will experiment with the dlg_vars as suggested
Just to complete along dlg vars and mention htable module -- it comes very handy sometimes to store data in it that needs to be shared across all kamailio processes for an interval of time. You can build keys using variables such as $ci which have values specific per call.
Cheers, Daniel