[Kamailio-Users] 404 sparks next gw and 503

Iñaki Baz Castillo ibc at aliax.net
Tue Nov 3 15:54:51 CET 2009

El Martes, 3 de Noviembre de 2009, Anders escribió:
> Hi,
> This list becomes a mix of high-level tech and low-level beginner
> questions... - and I'm in the latter group. Making two lists might be
> over-kill, though.
> Here's my issue:
> My call termination provider is rightfully returning a 404 for a call
> to a number that doesn't exist. This currently seems to spark Kamailio
> to look for the next gw, but in this case there is no next gw set up
> in the lcr/gw - so it returns a 503 to the caller. If I'm confident
> that my provider is right that there is no such number, and 404 is the
> correct answer, wouldn't it be better to return a 404 to the caller
> rather than a 503? With 503 stats also get screwed up, because my
> client can just see a bunch of 503s, which is not a very detailed
> picture of the real situation.
> If I should return a 404, how would I go about this? What would I do
> in cfg to ensure that a 404 return does not spark it to look for a
> next gw, but sends 404 back to the caller?
> Alternatively, I could try to figure out how to get the return from my
> provider saved to the acc table on the INVITE record, and I'd have
> something more detailed to run stats on. Does that make sense?

You are using lcr module, right?
Then you must not call "next_gw()" if the reply is 404 (as it's a correct 
response), and instead just forward the response.

Iñaki Baz Castillo <ibc at aliax.net>

More information about the Users mailing list