Hi,
I'm experimenting "onsend_route" with "onsend_route_reply=yes" to improve my logs.
I was surprised to see that "onsend_route" doesn't always display the "forwarded" answer after negative final answers. The documentation seems to indicate that this route will execute only if "the received reply is sent out". -as I'm forking, the final 6xx answer is not "forwarded" immediatly... and I guess this is the reason it doesn't show.
Here comes a real strange use-case:
With forking enabled, only the last answer will appear in the "onsend_route", however, in some case, this is NOT the answer being forwarded.
Example: 1/ receive 603 decline from branch1 2/ a CANCEL is sent on branch2 3/ a 487 Request Terminated is received on branch2
What happens: 1/ onsend_route is showing "487 Request Terminated" 2/ 603 Decline is forwarded (as expected)
The documenation say: "If set to 1 (yes, on), onsend_route block is executed for received replies that are sent out. Default is 0."
This doesn't look to be correct. (either the doc, or the code?)
Is there any possibility to install a log in the script that would log ALL *exact* replies being sent: 1/ the real forwarded ones 2/ and also the ones sent by kamailio directly.
May be this is possible with some "event_route"?
Tks a lot! Aymeric