From 0a68c7befaa124be40b276a5b42da5c9ded98d6f Mon Sep 17 00:00:00 2001
From: Adhidarma Hadiwinoto <me@adhisimon.org>
Date: Fri, 6 Dec 2019 11:53:21 +0700
Subject: [PATCH] TRANSPORT sending to modem use prefix rules.

Can be bypass by config.ignore_prefix
---
 lib/transport.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/transport.js b/lib/transport.js
index 1956277..615e5da 100644
--- a/lib/transport.js
+++ b/lib/transport.js
@@ -92,7 +92,7 @@ exports.send = async (partner, msg) => {
         msg,
     });
 
-    const modem = modems.randomModem();
+    const modem = config.ignore_prefix ? modems.randomModem() : modems.randomModemByPrefix(partner);
     if (!modem) {
         logger.warn('TRANSPORT: Not sending message to EVO-CP because of no available modem', {
             xid,
-- 
1.9.0