Hi all,
I see this discussion about mediaproxy and it's the same what happens to me http://opensips.org/pipermail/users/2010-August/013997.html
Indeed in my kamailio.cfg, I call twice end_media_session on "bye" and on "cancel" route[CANCEL] { if (is_method("CANCEL")) { end_media_session(); if (t_check_trans()) t_relay(); exit; } }
and route[WITHINDLG] { if (has_totag()) { # sequential request withing a dialog should # take the path determined by record-routing if (loose_route()) { if (is_method("BYE")) { end_media_session(); setflag(FLT_ACC); # do accounting ... setflag(FLT_ACCFAILED); # ... even if the transaction fails $avp(s:can_uri) = $ru; } if ( is_method("ACK") ) { # ACK is forwarded statelessy route(NATMANAGE); } route(RELAY); } else { ...
I thought both are necessary, so can I make something like this at route[WITHINDLG] ? ... if (is_method("BYE|CANCEL")) { end_media_session(); setflag(FLT_ACC); # do accounting ... setflag(FLT_ACCFAILED); # ... even if the transaction fails $avp(s:can_uri) = $ru; } ...
and then remove end_media_session at route[CANCEL] ?
Regards.
On 16/12/13 16:51, Teddy Rabary wrote:
[...]
and then remove end_media_session at route[CANCEL] ?
CANCEL is not a request within dialog and will not get in route[WITHINDLG]. Maybe you have an end of media session call in failure route. A CANCEL results in a 487 reply for INVITE.
Cheers, Daniel