How to route calls

I have 2 contractors - A and B.
Contractor A should send call to Contractor B. I passed through the quick start documentation twice but simulation routing function still say ‘0.404 no routes’.

log:

WARNING: Adding LNP resolvers sockets: <NULL>. Resolver timeout: 1000ms
1.442 ms -> Execution start
1.442 ms -> Got originator address "ContractorA:10000, proto: 1" from switch leg info
1.772 ms -> AUTH. lookup started
2.162 ms -> AUTH. found: {"id":9, "customers_auth_id":20086, "customer_id":1, "rateplan_id":15, "enabled":true, "ip":"ContractorA", "account_id":20, "gateway_id":18, "src_rewrite_rule":"", "src_rewrite_result":"", "dst_rewrite_rule":"", "dst_rewrite_result":"", "src_prefix":"", "dst_prefix":"", "x_yeti_auth":null, "name":"hurtownia_PL", "dump_level_id":0, "capacity":null, "pop_id":null, "uri_domain":null, "src_name_rewrite_rule":"", "src_name_rewrite_result":"", "diversion_policy_id":1, "diversion_rewrite_rule":"", "diversion_rewrite_result":"", "dst_numberlist_id":null, "src_numberlist_id":null, "routing_plan_id":2, "allow_receive_rate_limit":false, "send_billing_information":false, "radius_auth_profile_id":null, "enable_audio_recording":false, "src_number_radius_rewrite_rule":"", "src_number_radius_rewrite_result":"", "dst_number_radius_rewrite_rule":"", "dst_number_radius_rewrite_result":"", "radius_accounting_profile_id":null, "from_domain":null, "to_domain":null, "transport_protocol_id":1, "dst_number_min_length":0, "dst_number_max_length":100, "check_account_balance":false, "require_incoming_auth":false, "tag_action_id":null, "tag_action_value":[], "external_id":null, "reject_calls":false, "src_number_max_length":100, "src_number_min_length":0, "lua_script_id":null, "src_number_field_id":1, "src_name_field_id":1, "dst_number_field_id":1}
2.56 ms -> AUTH. Before rewrite src_prefix: 48321321321 , dst_prefix: 48123123123
2.711 ms -> AUTH. After rewrite src_prefix: 48321321321 , dst_prefix: 48123123123
2.828 ms -> SRC Area found: 1
2.93 ms -> DST Area found: 1
3.087 ms -> Routing tag detected: {}
3.14 ms -> Routing plan search start
3.254 ms -> DST. search start. Routing key: 48123123123. Routing tags: {}, Rate limit: Infinity
3.794 ms -> DST. found: {"id":4201532, "enabled":true, "prefix":"48", "rate_group_id":2, "next_rate":1.5, "connect_fee":0.0, "initial_interval":1, "next_interval":1, "dp_margin_fixed":0, "dp_margin_percent":0, "rate_policy_id":1, "initial_rate":3.0, "reject_calls":false, "use_dp_intervals":false, "valid_from":"2021-12-22T12:55:00+00:00", "valid_till":"2026-12-22T12:55:00+00:00", "profit_control_mode_id":null, "network_prefix_id":14076, "external_id":null, "asr_limit":0, "acd_limit":0, "short_calls_limit":0, "quality_alarm":false, "uuid":"906fd648-6326-11ec-a6c1-96d30be6ff75", "dst_number_min_length":0, "dst_number_max_length":100, "reverse_billing":false, "routing_tag_ids":[], "routing_tag_mode_id":0}
3.939 ms -> DP. search start. Routing key: 48123123123. Rate limit: Infinity. Routing tag: {}
4.79 ms -> process-DP. Found dialpeer: {"id":1376786, "enabled":true, "prefix":"48", "src_rewrite_rule":"", "dst_rewrite_rule":"", "acd_limit":0, "asr_limit":0, "gateway_id":19, "routing_group_id":23, "next_rate":0.0, "connect_fee":0.0, "vendor_id":2, "account_id":21, "src_rewrite_result":"", "dst_rewrite_result":"", "locked":false, "priority":100, "capacity":null, "lcr_rate_multiplier":1, "initial_rate":0.0, "initial_interval":1, "next_interval":1, "valid_from":"2021-12-22T12:53:00+00:00", "valid_till":"2026-12-22T12:53:00+00:00", "gateway_group_id":null, "force_hit_rate":null, "network_prefix_id":14076, "created_at":"2021-12-22T12:54:09.793828+00:00", "short_calls_limit":1, "current_rate_id":null, "external_id":null, "src_name_rewrite_rule":"", "src_name_rewrite_result":"", "exclusive_route":false, "dst_number_min_length":0, "dst_number_max_length":100, "reverse_billing":false, "routing_tag_ids":[], "routing_tag_mode_id":0, "routeset_discriminator_id":1}
5.238 ms -> DP. Found dialpeer: {"id":1376786, "enabled":true, "prefix":"48", "src_rewrite_rule":"", "dst_rewrite_rule":"", "acd_limit":0, "asr_limit":0, "gateway_id":19, "routing_group_id":23, "next_rate":0.0, "connect_fee":0.0, "vendor_id":2, "account_id":21, "src_rewrite_result":"", "dst_rewrite_result":"", "locked":false, "priority":100, "capacity":null, "lcr_rate_multiplier":1, "initial_rate":0.0, "initial_interval":1, "next_interval":1, "valid_from":"2021-12-22T12:53:00+00:00", "valid_till":"2026-12-22T12:53:00+00:00", "gateway_group_id":null, "force_hit_rate":null, "network_prefix_id":14076, "created_at":"2021-12-22T12:54:09.793828+00:00", "short_calls_limit":1, "current_rate_id":null, "external_id":null, "src_name_rewrite_rule":"", "src_name_rewrite_result":"", "exclusive_route":false, "dst_number_min_length":0, "dst_number_max_length":100, "reverse_billing":false, "routing_tag_ids":[], "routing_tag_mode_id":0, "routeset_discriminator_id":1}
5.365 ms -> DP. Before rewrite src_prefix: 48321321321 , dst_prefix: 48123123123
5.428 ms -> DP. After rewrite src_prefix: 48321321321 , dst_prefix: 48123123123
5.467 ms -> GW. Before numberlist processing src_prefix: 48321321321 , dst_prefix: 48123123123
5.502 ms -> GW. Before rewrite src_prefix: 48321321321 , dst_prefix: 48123123123
5.542 ms -> GW. After rewrite src_prefix: 48321321321 , dst_prefix: 48123123123
5.719 ms -> DP. Finished: {"ruri":"sip:48123123123@ContractorB:5060", "bleg_transport_protocol_id":1, "from":"from_name <sip:48321321321@$Oi>", "to":"<sip:48123123123@ContractorB:5060>", "call_id":"", "dlg_nat_handling":true, "force_outbound_proxy":false, "outbound_proxy":null, "bleg_outbound_proxy_transport_protocol_id":null, "aleg_force_outbound_proxy":false, "aleg_outbound_proxy":null, "aleg_outbound_proxy_transport_protocol_id":null, "next_hop":null, "next_hop_1st_req":false, "aleg_next_hop":"", "sdp_filter_type_id":0, "sdp_filter_list":"", "sdp_alines_filter_type_id":0, "sdp_alines_filter_list":"", "enable_session_timer":false, "enable_aleg_session_timer":false, "session_expires":50, "minimum_timer":50, "maximum_timer":50, "session_refresh_method_id":3, "accept_501_reply":"true", "aleg_session_expires":50, "aleg_minimum_timer":50, "aleg_maximum_timer":50, "aleg_session_refresh_method_id":3, "aleg_accept_501_reply":"true", "enable_auth":false, "auth_user":"", "auth_pwd":"", "enable_aleg_auth":false, "auth_aleg_user":"", "auth_aleg_pwd":"", "append_headers":null, "append_headers_req":"", "aleg_append_headers_req":"", "disconnect_code_id":null, "enable_rtprelay":true, "rtprelay_interface":"", "aleg_rtprelay_interface":"", "outbound_interface":"", "aleg_outbound_interface":"", "contact_displayname":null, "contact_user":null, "contact_host":null, "contact_port":null, "try_avoid_transcoding":false, "rtprelay_dtmf_filtering":true, "rtprelay_dtmf_detection":true, "dump_level_id":0, "time_limit":519, "resources":"", "cache_time":10, "reply_translations":"", "aleg_policy_id":null, "bleg_policy_id":null, "aleg_codecs_group_id":12, "bleg_codecs_group_id":12, "aleg_single_codec_in_200ok":false, "bleg_single_codec_in_200ok":false, "ringing_timeout":null, "global_tag":null, "patch_ruri_next_hop":false, "rtprelay_force_dtmf_relay":false, "aleg_force_symmetric_rtp":true, "bleg_force_symmetric_rtp":true, "aleg_symmetric_rtp_nonstop":false, "bleg_symmetric_rtp_nonstop":false, "aleg_symmetric_rtp_ignore_rtcp":false, "bleg_symmetric_rtp_ignore_rtcp":false, "aleg_rtp_ping":false, "bleg_rtp_ping":false, "aleg_relay_options":false, "bleg_relay_options":false, "filter_noaudio_streams":false, "aleg_relay_reinvite":false, "bleg_relay_reinvite":false, "aleg_relay_hold":false, "bleg_relay_hold":false, "aleg_relay_prack":false, "bleg_relay_prack":false, "aleg_sdp_c_location_id":2, "bleg_sdp_c_location_id":2, "trusted_hdrs_gw":false, "aleg_append_headers_reply":null, "bleg_sdp_alines_filter_list":"", "bleg_sdp_alines_filter_type_id":0, "dead_rtp_time":30, "rtp_relay_timestamp_aligning":false, "allow_1xx_wo2tag":false, "invite_timeout":8000, "srv_failover_timeout":2000, "rtp_force_relay_cn":true, "aleg_sensor_id":null, "aleg_sensor_level_id":1, "bleg_sensor_id":null, "bleg_sensor_level_id":1, "aleg_dtmf_send_mode_id":1, "bleg_dtmf_send_mode_id":1, "aleg_dtmf_recv_modes":1, "bleg_dtmf_recv_modes":1, "suppress_early_media":false, "aleg_relay_update":false, "bleg_relay_update":false, "force_one_way_early_media":false, "radius_auth_profile_id":null, "record_audio":false, "aleg_radius_acc_profile_id":null, "bleg_radius_acc_profile_id":null, "transit_headers_a2b":";", "transit_headers_b2a":";", "src_number_radius":"48321321321", "dst_number_radius":"48123123123", "orig_gw_name":"gw-hurtownia", "customer_auth_name":"hurtownia_PL", "customer_name":"NameA", "customer_account_name":"hurtownia", "term_gw_name":"gw-karcianka", "fake_180_timer":null, "aleg_rel100_mode_id":4, "bleg_rel100_mode_id":4, "bleg_max_30x_redirects":0, "bleg_max_transfers":0, "aleg_auth_required":null, "aleg_rtp_filter_inband_dtmf":false, "bleg_rtp_filter_inband_dtmf":false, "bleg_protocol_priority_id":0, "aleg_media_encryption_mode_id":0, "bleg_media_encryption_mode_id":0, "aleg_sip_acl":null, "aleg_rtp_acl":null, "bleg_sip_acl":null, "bleg_rtp_acl":null, "registered_aor_id":null, "customer_id":1, "vendor_id":2, "customer_acc_id":20, "vendor_acc_id":21, "customer_auth_id":20086, "destination_id":4201532, "destination_prefix":"48", "dialpeer_id":1376786, "dialpeer_prefix":"48", "orig_gw_id":18, "term_gw_id":19, "routing_group_id":23, "rateplan_id":15, "destination_initial_rate":3.0, "destination_next_rate":1.5, "destination_initial_interval":1, "destination_next_interval":1, "destination_rate_policy_id":1, "dialpeer_initial_interval":1, "dialpeer_next_interval":1, "dialpeer_next_rate":0.0, "destination_fee":0.0, "dialpeer_initial_rate":0.0, "dialpeer_fee":0.0, "dst_prefix_in":"48123123123", "dst_prefix_out":"48123123123", "src_prefix_in":"48321321321", "src_prefix_out":"48321321321", "src_name_in":"from_name", "src_name_out":"from_name", "diversion_in":null, "diversion_out":null, "auth_orig_protocol_id":1, "auth_orig_ip":"ContractorA", "auth_orig_port":10000, "src_network_id":1187, "src_country_id":171, "dst_country_id":171, "dst_network_id":1187, "dst_prefix_routing":"48123123123", "src_prefix_routing":"48321321321", "routing_plan_id":2, "lrn":null, "lnp_database_id":null, "from_domain":"", "to_domain":"", "ruri_domain":"", "src_area_id":1, "dst_area_id":1, "routing_tag_ids":[], "pai_in":"", "ppi_in":"", "privacy_in":"", "rpid_in":"", "rpid_privacy_in":"", "pai_out":null, "ppi_out":null, "privacy_out":null, "rpid_out":null, "rpid_privacy_out":null, "customer_acc_check_balance":false, "destination_reverse_billing":false, "dialpeer_reverse_billing":false, "customer_auth_external_id":null, "customer_external_id":null, "vendor_external_id":null, "customer_acc_external_id":null, "vendor_acc_external_id":null, "orig_gw_external_id":null, "term_gw_external_id":null, "customer_acc_vat":0}
5.978 ms -> Dialpeer search done
6.034 ms -> DONE.

/etc/sems/sems.conf:

Dec 22 15:07:08 yeti-routing sems[11629]: [11633/core/AmBasicSipDialog.cpp:293] ERROR: Could not find a local interface for resolved local IP (local_tag='1-02A0400F-61C3310C00006171-2EA9B700';local_ip='192.168.1.17')
Dec 22 15:07:08 yeti-routing sems[11629]: [11633/core/sip/udp_trsp.cpp:208] ERROR: sendto(17;ContractorB_IP:5060): Invalid argument

192.168.1.17 is my local machine IP, on front I have router which forward 5060 and RTP to 192.168.1.17

after taking a breath from the problem, I started solving my problem again.

in the /etc/sems/sems.conf file in the signaling-interfaces section, I had a wrong IP address entered.

In your routing simulation everything is normal. Last route with 404 No routes code is internal stuff, but there is other route(on top), so routing was successful.

@przeqpiciel
Could you show your incorrect config? Looks like we have to add more config validation because it allows to enter wrong IP address.

It was like that

general {
    daemon = yes
    stderr = no
    syslog_loglevel = 2
    syslog_facility = LOCAL0

    node_id = 1

    shutdown_mode {
        code = 508
        reason = "Yeti node in shutdown mode"
        allow_uac = true
    }


    media_processor_threads = 1
    rtp_receiver_threads = 1
    session_processor_threads = 1
    sip_udp_server_threads = 1
    sip_tcp_server_threads = 1

    dead_rtp_time=30

    default_bl_ttl=0

    symmetric_rtp_mode = packets
    symmetric_rtp_packets = 20
}

signaling-interfaces {
    interface internal {
        default-media-interface = internal
        ip4 {
            sip-udp {
                address = 127.0.0.1
                port = 5062
                use-raw-sockets = off
            }
                    }
    }
}

media-interfaces {
    interface internal {
        ip4 {
            rtp {
                address = 127.0.0.1
                low-port = 10000
                high-port = 20000
                dscp = 46
                use-raw-sockets = off
            }
        }
    }
}

modules {
    module "di_log" {}
    module "mp3" {}
    module "opus" {}
    module "wav" {}
    module "gsm" {}
    module "ilbc" {}
    module "adpcm" {}
    module "l16" {}
    module "g722" {}

    module "registrar_client" {}
    module "sctp_bus" {}
    module "session_timer" {}
    module "jsonrpc" {
        listen{
            address = 0.0.0.0
            port = 7080
        }
        server_threads=1
    }

    module "http_client" {}

    module-global "uac_auth" {}
    module "options_prober" {}

    module "radius_client" {}

    module "yeti" {
        pop_id = 1
        lega_cdr_headers {
            header(p-charge-info, string)
            header(diversion, array)
        }

        auth {
            realm = 127.0.0.1
        }

        msg_logger_dir = /var/spool/sems/dump
        log_dir = /var/spool/sems/logdump
        audio_recorder_dir = /var/spool/sems/records
        audio_recorder_compress = true
        routing {
            schema = switch19
            function = route_release
            init = init
            master_pool {
                host = 127.0.0.1
                port = 5432
                name = routing
                user = yeti
                pass = 0987654321
                size = 4
                check_interval = 10
                max_exceptions = 0
                statement_timeout=3000
            }
            failover_to_slave = false
            slave_pool {
                host = 127.0.0.1
                port = 5432
                name = routing
                user = yeti
                pass = 0987654321
                size = 4
                check_interval = 10
                max_exceptions = 0
                statement_timeout=3000
            }
            cache {
                enabled = false
                check_interval = 60
                buckets = 100000
            }
        }
        cdr {
            dir = /var/spool/sems/cdrs
            completed_dir = /var/spool/sems/cdrs/completed
            pool_size = 2
            schema = switch
            function = writecdr
            master {
                host = 127.0.0.1
                port = 5432
                name = cdr
                user = cdr
                pass = 123239283923
            }
            failover_to_slave = false
            slave {
                host = 127.0.0.1
                port = 5432
                name = cdr
                user = cdr
                pass = somepassword
            }
            failover_requeue = true
            failover_to_file = false
            serialize_dynamic_fields = true
            batch_size = 1
            batch_timeout = 5000
        }
        resources {
            reject_on_error = false
            write {
                host = 127.0.0.1
                port = 6379
                size = 2
                timeout = 500
            }
            read {
                host = 127.0.0.1
                port = 6379
                size = 2
                timeout = 1000
            }
        }
        registrations {
            check_interval = 5000
        }
        registrar {
            enabled = true
            redis {
                host = 127.0.0.1
                port = 6379
            }
        }
        rpc {
            calls_show_limit = 10000
        }
        core_options_handling = yes
    }
}

routing {
    application = yeti
}

The signaling-interfaces > interface internal > ip4 > sip-udp > address
and media-interfaces > interface internal > ip4 > rtp > address
Both should be your PUBLIC IP Addresses if not using Kamalio LB

OK, that is what I know. But how to configure it with Kamailio ? I used GitHub - yeti-switch/yeti-lb: Kamailio configuration for yeti.

EDIT:
There is no question. I solved this by other post. Routing. Customers Auths. Match conditions issue - #5 by przeqpiciel