next_gw() always prefixes the rewritten host-part with
an '@' sign, which breaks requests not containing a
user-part (like REGISTER).
Thus for example the R-URI sip:some.host.com is
rewritten to sip:@127.0.0.1:5080, resulting in an error
when relaying.
Logged In: NO
next_gw() function has been designed to handle dialog
initiating requests bound to pstn gateways. register
request is not such a request. i cannot imagine, how pstn
gateway could handle an intial request, whose destination is
not a telephone number.
Suppress '@' if no user-part in R-URI
Logged In: YES
user_id=825350
I don't think it's a good idea to restrict the usage of the
module "by design". People use it for load-balancing
requests to different kind of UAs, not only PSTN gateways,
and this may require also the proper routing of requests
without a user-part.
Attached you can find a patch. It's just a minor tweak to
fix this issue.
Logged In: YES
user_id=1275325
any consent on the topic? In both situations we need to fix
the code; as it is now, the output is a bogus RURI.
1) if the code is not supposed to accept RURI without
username, the module must generate er if no username found.
2) if it should accept RURI without username, '@' is to be
added only if username is present.
My personal opinion is to go for fix number 2: even if this
scenario wasn't included in the original specs of the
module, I see no reason not to enlarge the module's
applicability, especially when is about some small fix and
no other thinks are broken or altered.
regards,
bogdan
Logged In: YES
user_id=825350
The attached patch fixes the problem according to suggestion #2.
Logged In: YES
user_id=1332122
Fixed.