Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ GEM
url
coderay (1.1.2)
concurrent-ruby (1.1.5)
countries (3.0.0)
i18n_data (~> 0.8.0)
countries (3.0.1)
i18n_data (~> 0.10.0)
sixarm_ruby_unaccent (~> 1.1)
unicode_utils (~> 1.4)
crack (0.4.3)
Expand Down Expand Up @@ -185,7 +185,7 @@ GEM
multi_xml (>= 0.5.2)
i18n (1.8.2)
concurrent-ruby (~> 1.0)
i18n_data (0.8.0)
i18n_data (0.10.0)
jaro_winkler (1.5.4)
jmespath (1.4.0)
json (2.3.0)
Expand Down Expand Up @@ -325,7 +325,7 @@ GEM
thor (1.0.1)
thread_safe (0.3.6)
tilt (2.0.10)
torasup (0.2.2)
torasup (0.2.3)
countries
deep_merge
phony
Expand Down
27 changes: 27 additions & 0 deletions config/torasup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,30 @@ so:
gateways:
default:
host: "41.78.73.242"
gh:
operators:
globacom:
metadata:
gateways:
default:
host: "154.160.70.82"
mtn:
metadata:
gateways:
default:
host: "154.160.70.82"
airtel_tigo:
metadata:
gateways:
default:
host: "154.160.70.82"
expresso:
metadata:
gateways:
default:
host: "154.160.70.82"
vodafone:
metadata:
gateways:
default:
host: "154.160.70.82"
60 changes: 60 additions & 0 deletions spec/models/call_router_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,66 @@
dial_string_path: "external/252642345678@41.78.73.242"
)

# Ghana (Globacom)
call_router.destination = "+233232437103"

result = call_router.routing_instructions

assert_routing_instructions!(
result,
source: "5555",
destination: "233232437103",
dial_string_path: "external/233232437103@154.160.70.82"
)

# Ghana (MTN)
call_router.destination = "+233242437103"

result = call_router.routing_instructions

assert_routing_instructions!(
result,
source: "5555",
destination: "233242437103",
dial_string_path: "external/233242437103@154.160.70.82"
)

# Ghana (AirtelTigo)
call_router.destination = "+233272437103"

result = call_router.routing_instructions

assert_routing_instructions!(
result,
source: "5555",
destination: "233272437103",
dial_string_path: "external/233272437103@154.160.70.82"
)

# Ghana (Expresso)
call_router.destination = "+233282437103"

result = call_router.routing_instructions

assert_routing_instructions!(
result,
source: "5555",
destination: "233282437103",
dial_string_path: "external/233282437103@154.160.70.82"
)

# Ghana (Vodaphone)
call_router.destination = "+233202437103"

result = call_router.routing_instructions

assert_routing_instructions!(
result,
source: "5555",
destination: "233202437103",
dial_string_path: "external/233202437103@154.160.70.82"
)

# Brazil
call_router.destination = "+5582999489999"

Expand Down