diff --git a/Gemfile.lock b/Gemfile.lock index 433e3944c6..90e389f8fc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -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 diff --git a/config/torasup.yml b/config/torasup.yml index 9730845d2c..6d8df289eb 100644 --- a/config/torasup.yml +++ b/config/torasup.yml @@ -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" diff --git a/spec/models/call_router_spec.rb b/spec/models/call_router_spec.rb index 21eaae3e4d..6691584940 100644 --- a/spec/models/call_router_spec.rb +++ b/spec/models/call_router_spec.rb @@ -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"