THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#237 - Kamailio does not handle HTTP Via: headers in requests and responses
User who did this - Daniel-Constantin Mierla (miconda)
----------
OK, so if there is no special handling required, avoiding the parsing error should be easy. Search for '\nVia:' and if found, replace it with something that won't break the buffer, like '\nXia:', before going to the parser - I think this part is all in the xhttp module.
Not generating Via header has some existing mechanism, used by msg_apply_changes(), but it is for requests. Perhaps same approach can be used for replies to say the via should not be added. I guess, there has to be added a new kind of reply function to be used internally between modules, iirc, xhttp_reply() binds to sl module.
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=237#comment696
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#237 - Kamailio does not handle HTTP Via: headers in requests and responses
User who did this - Peter Dunkley (pd)
----------
Unfortunately there is no way to enforce direct client-server communication. Some networks only allow HTTP through a network proxy and others have in-line (and unavoidable) proxies as part of their Internet routing.
I don't believe Kamailio needs to do anything clever with an HTTP Via: (it is just added by gateways and proxies for their use). I think that Kamailio needs to:
- not generate a parser error it receives an HTTP Via:, and
- not put Via: headers into HTTP responses at all
>From RFC 2616:
The Via general-header field MUST be used by gateways and proxies to
indicate the intermediate protocols and recipients between the user
agent and the server on requests, and between the origin server and
the client on responses. It is analogous to the "Received" field of
RFC 822 [9] and is intended to be used for tracking message forwards,
avoiding request loops, and identifying the protocol capabilities of
all senders along the request/response chain.
I'm not sure how easy this is to do (particularly the not putting Via: headers into responses part).
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=237#comment695
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#237 - Kamailio does not handle HTTP Via: headers in requests and responses
User who did this - Daniel-Constantin Mierla (miconda)
----------
Indeed the embedded http handling is designed for direct client-server communication. I haven't read the specs, is http via requiring special processing in terms of routing? Or is just for informational purposes?
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=237#comment694
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
The following task has a new comment added:
FS#237 - Kamailio does not handle HTTP Via: headers in requests and responses
User who did this - Peter Dunkley (pd)
----------
Correction: HTTP Via: headers are defined in RFC 2616 section 14.45
----------
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=237#comment693
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
THIS IS AN AUTOMATED MESSAGE, DO NOT REPLY.
A new Flyspray task has been opened. Details are below.
User who did this - Peter Dunkley (pd)
Attached to Project - sip-router
Summary - Kamailio does not handle HTTP Via: headers in requests and responses
Task Type - Bug Report
Category - Core
Status - Unconfirmed
Assigned To -
Operating System - All
Severity - Low
Priority - Normal
Reported Version - 3.2
Due in Version - Undecided
Due Date - Undecided
Details - Via: is a valid HTTP header (RFC 2616 section 14.5) in requests and responses. Unfortunately, the format of an HTTP Via: and a SIP Via: is different.
This means that if you are handling HTTP (for example, for XCAP) on Kamailio and receive a valid HTTP request with a correctly formed HTTP Via: header you get a parser error and the request is not handled.
Similarly, each HTTP response sent by Kamailio contains a SIP Via: header (which is not a valid HTTP Via: header) and this can cause problems with HTTP clients and proxies.
This issue was observed when the XCAP client was on a network that used a Squid HTTP proxy for all HTTP traffic. The Squid proxy was inserting and processing HTTP Via: headers.
More information can be found at the following URL:
http://sip-router.org/tracker/index.php?do=details&task_id=237
You are receiving this message because you have requested it from the Flyspray bugtracking system. If you did not expect this message or don't want to receive mails in future, you can change your notification settings at the URL shown above.
Hi guys,
since tm is a bit, er, complex and breakage is not immediately obvious,
I'd rather ask: Is it safe to call t_suspend() from the TMCB_ON_FAILURE
callback?
The idea is to always delay the transaction until there either is a 200
OK or it times out.
In other words, does this work:
static void
failure_handler(struct cell *t, int type, struct tmcb_params *params)
{
if (params->repl != FAKED_REPLY) {
tmb.t_suspend(params->req, &t->tindex, &t->tlabel);
}
}
If it doesn't work, any better idea?
Regards,
Martin
Hi all,
We ran into an issue with dialplan in regex mode when we leave the
repl_exp empty. Consider this scenario:
if(dp_translate("1", "$rU/$var(out)") {
# translation successful
$rU = $var(out);
}
If the dialplan entry has match_exp="^999" and subst_exp="^999" and
repl_exp="" and my $rU is "999123", I'd expect $var(out) to be "123",
because an empty replacement part is perfectly valid for a regex. The
result however is that $var(out) is untouched, so whatever $var(out) was
before the function call, will end up in $rU in this case. That's not
what I'd expect if dp_translate returns success.
It should be fairly easy to fix and we can provide a patch for that, I'd
just want to get some feedback if you agree on changing dp_translate
behavior in such a case, as it might break existing scripts if you rely
on the current way of working.
Comments?
Andreas