i have in in-dialog part of config:
if (is_method("NOTIFY")) { xlog("L_INFO", "Calling set_forward_no_connect()\n"); set_forward_no_connect(); }; xlog("L_INFO", "Routing in-dialog $rm <$ru> from <$fu> to <$du>\n"); t_relay();
i.e., the idea is to avoid trying to set up a new tcp session for in-dialog notifys. then i restart sip proxy so that all tcp sessions are dead and issue a publish to presence server that causes in-dialog notify to be sent to watcher.
as result i get to syslog:
Oct 2 10:43:39 sip /usr/sbin/sip-proxy[14131]: INFO: Calling set_forward_no_connect() Oct 2 10:43:39 sip /usr/sbin/sip-proxy[14131]: INFO: Routing in-dialog NOTIFY sip:jh_test_fi@192.98.102.10:5074;transport=tcp from sip:test@test.fi to sip:192.98.102.10:47339;transport=tcp Oct 2 10:43:39 sip /usr/sbin/sip-proxy[14131]: ERROR: tm [../../forward.h:170]: msg_send: ERROR: tcp_send failed Oct 2 10:43:39 sip /usr/sbin/sip-proxy[14131]: ERROR: tm [t_fwd.c:1381]: ERROR: t_send_branch: sending request on branch 0 failed
what does the error message mean? did tm module try to setup tcp session even when i have told it not to do it or is tm spitting out the error messages even when it didn't actually try to send anything?
if the latter, i suggest turning the error messages to debug messages, since in config i have already accepted the fact that it is ok not to try to setup new tcp connection if one does not exit.
-- juha
Juha Heinanen writes:
what does the error message mean? did tm module try to setup tcp session even when i have told it not to do it or is tm spitting out the error messages even when it didn't actually try to send anything?
i checked from source and it turned out that msg_send() always spits out the same error message
msg_send: ERROR: tcp_send failed
it would be nice to have a more descriptive one when tcp connection has gone and new one cannot be established because of set_forward_no_connect() call.
-- juha
On 10/3/11 5:38 PM, Juha Heinanen wrote:
Juha Heinanen writes:
what does the error message mean? did tm module try to setup tcp session even when i have told it not to do it or is tm spitting out the error messages even when it didn't actually try to send anything?
i checked from source and it turned out that msg_send() always spits out the same error message
msg_send: ERROR: tcp_send failed
it would be nice to have a more descriptive one when tcp connection has gone and new one cannot be established because of set_forward_no_connect() call.
Some of error log messages can be printed under corelog level, which I added in order to be able to avoid getting syslog filled for some non-critical cases such as receiving invalid content:
http://sip-router.org/wiki/cookbooks/core-cookbook/devel?&#corelog
In the sources, just use:
LOG(cfg_get(core, core_cfg, corelog), "your log message ..." ...);
You can wrap this one in corelog if you feel it is better. I think some error messages should be printed at higher level only, by the caller of the core functions, where it is known more about the context of execution. Cheers, Daniel