daniel,
i tried imc module, but got into problems, because i'm not able to specify any extra headers the messages send by imc server.
it is ok if i try to add extra_hdrs param to imc module like msilo module has?
-- juha
3.5. extra_hdrs (string)
Extra headers (each ending with \r\n) to be added in messages sent from silo by m_dump. It can contain pseudo-variables
Hello,
On 03.09.2009 18:35 Uhr, Juha Heinanen wrote:
daniel,
i tried imc module, but got into problems, because i'm not able to specify any extra headers the messages send by imc server.
it is ok if i try to add extra_hdrs param to imc module like msilo module has?
sure, go ahead.
Daniel
-- juha
3.5. extra_hdrs (string)
Extra headers (each ending with \r\n) to be added in messages sent from silo by m_dump. It can contain pseudo-variables
sr-dev mailing list sr-dev@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev
i added extra_hdrs param to imc module (not committed yet) and when tried a test with request
MESSAGE sip:room@test.fi SIP/2.0 From: "Juha Heinanen" sip:jh@test.fi;tag=vubpq To: sip:room@test.fi ... Content-Length: 5
with body
#join
i see in syslog an error:
Sep 3 20:45:22 localhost /usr/sbin/sip-router[24817]: ERROR: imc [imc_cmd.c:146]: command: [join]
wireshark shows that in spite of the error imc server is sending to sip:jh@test.fi a message with body
*** sip:jh@test.fi has joined the room
BUT it never replies with 200 ok to the message that sip:jh@test.fi sent.
when i look at the code, where the error message comes, it seems that perhaps imc_parse_cmd does not like body terminating without crlf or something. i don't know what the rfcs say about that.
-- juha
it looks to me that
LM_ERR("command: [%.*s]\n", cmd->name.len, cmd->name.s);
should be changed to
LM_DBG("command: [%.*s]\n", cmd->name.len, cmd->name.s);
since it is printed every time when imc_parse_cmd is called successfully.
this does not still explain, why imc server does not send 200 ok response to the #join message.
-- juha
Juha Heinanen writes:
this does not still explain, why imc server does not send 200 ok response to the #join message.
or is the idea, that 200 ok or an error response is sent from the script?
if so, then i would suggests that it is mentioned in the description of the function and shown in the example:
http://sip-router.org/docbook/sip-router/branch/master/modules_k/imc/imc.htm...
-- juha
Juha Heinanen writes:
this does not still explain, why imc server does not send 200 ok response to the #join message.
or is the idea, that 200 ok or an error response is sent from the script?
i added sending of 200 ok or 404 not found from script and got imc_manager() working. at least it APPEARS to work, because README does not suggest that i should be doing anything like that.
so i still don't know if there is a bug in icm code that i have just hacked around. if there is no bug in code, then README definitely should be fixed.
-- juha
On 09.09.2009 10:54 Uhr, Juha Heinanen wrote:
Juha Heinanen writes:
this does not still explain, why imc server does not send 200 ok response to the #join message.
or is the idea, that 200 ok or an error response is sent from the script?
i added sending of 200 ok or 404 not found from script and got imc_manager() working. at least it APPEARS to work, because README does not suggest that i should be doing anything like that.
i have to check the sources to be sure, but I think the idea behind was to let admin return custom reply code as he/she wishes, depending on return code of imc_manager(). So what you did is ok ad the readme needs to be updated.
Cheers, Daniel
so i still don't know if there is a bug in icm code that i have just hacked around. if there is no bug in code, then README definitely should be fixed.
-- juha
Daniel-Constantin Mierla writes:
i have to check the sources to be sure, but I think the idea behind was to let admin return custom reply code as he/she wishes, depending on return code of imc_manager().
in that case, it would be nice if error return code would be different than, for example, "room does not exit" return code.
-- juha