mirror of
https://github.com/jambonz/sbc-outbound.git
synced 2026-10-31 07:34:21 +00:00
bugfix: calls in K8S may have request-uri like sip:<num>:sbc-sip and that's ok
This commit is contained in:
1 parent
a553105e55
commit
dbb93732bf
3 files changed
+98
-3
No files matched your search
+2
-2
@@ -194,8 +194,8 @@ module.exports = (srf, logger, opts) => {
|
||||
logger.info(`received outbound INVITE to ${req.uri} from server at ${req.server.hostport}`);
|
||||
const uri = parseUri(req.uri);
|
||||
const desiredRouting = req.get('X-Jambonz-Routing');
|
||||
|
||||
if (!uri || !uri.user || !uri.host) {
|
||||
const validUri = uri && uri.user && uri.host;
|
||||
if (['user', 'sip'].includes(desiredRouting) && !validUri) {
|
||||
logger.info({uri: req.uri}, 'invalid request-uri on outbound call, rejecting');
|
||||
res.send(400, {
|
||||
headers: {
|
||||
|
||||
Reference in new issue
Block a user