flow:
  - start|DEFAULT_ONREPLY:
  - start|REPLY_ROUTE_NAT:
  - start|ROUTE_ENTRY:
  - return|ROUTE_ENTRY:
  - start|ROUTE_APPLY_HEADER_RULES:
  - return|ROUTE_APPLY_HEADER_RULES:
      $avp(lua_dlg_profile): [
        "accountout:[% customer_test.id %]",
        "userout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccountout:[% customer_test.id %]",
        "totaluserout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "total",
        "relay",
        "peerout:[% peer_02_invite_peerout_failover_host0.id %]",
        "peer:[% peer_02_invite_peerout_failover_host0.id %]",
        "outgoing"
      ]
  - start|ROUTE_PREPARE_UA:
  - return|ROUTE_PREPARE_UA:
  - start|REPLY_ROUTE_NAT_CONTINUE:
  - start|ROUTE_EXIT:
  - start|ROUTE_RUNTIME:
  - return|ROUTE_RUNTIME:
  - exit|ROUTE_EXIT:
  - start|FAILURE_ROUTE_PSTN:
  - start|ROUTE_INITVARS:
  - return|ROUTE_INITVARS:
  - start|ROUTE_FILTER_FAILOVER:
  - return|ROUTE_FILTER_FAILOVER:
  - start|ROUTE_PSTN_SELECT_PEER_FAILURE:
  - start|ROUTE_CHECK_PEER_PROBE:
  - return|ROUTE_CHECK_PEER_PROBE:
  - start|ROUTE_CLEAR_PEER_OUT_PREF:
  - return|ROUTE_CLEAR_PEER_OUT_PREF:
  - start|ROUTE_LOAD_PEER_OUT_PREF:
  - return|ROUTE_LOAD_PEER_OUT_PREF:
  - return|ROUTE_PSTN_SELECT_PEER_FAILURE:
      $avp(lua_dlg_profile): [
        "accountout:[% customer_test.id %]",
        "userout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccountout:[% customer_test.id %]",
        "totaluserout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "total",
        "outgoing"
      ]
  - start|ROUTE_PSTN_SELECT_PEER_FAILURE:
  - start|ROUTE_CHECK_PEER_PROBE:
  - return|ROUTE_CHECK_PEER_PROBE:
  - start|ROUTE_CLEAR_PEER_OUT_PREF:
  - return|ROUTE_CLEAR_PEER_OUT_PREF:
  - start|ROUTE_LOAD_PEER_OUT_PREF:
  - return|ROUTE_LOAD_PEER_OUT_PREF:
  - return|ROUTE_PSTN_SELECT_PEER_FAILURE:
      $avp(lua_dlg_profile): [
        "accountout:[% customer_test.id %]",
        "userout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccountout:[% customer_test.id %]",
        "totaluserout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "total",
        "outgoing"
      ]
  - start|ROUTE_OUTBOUND:
      $avp(lua_dlg_profile): [
        "relay",
        "peerout:[% peer_00_invite_peerout_failover_host0.id %]",
        "peer:[% peer_00_invite_peerout_failover_host0.id %]",
        "accountout:[% customer_test.id %]",
        "userout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccountout:[% customer_test.id %]",
        "totaluserout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "total",
        "outgoing"
      ]
  - start|ROUTE_ADD_AOC_HEADER:
  - return|ROUTE_ADD_AOC_HEADER:
  - start|BRANCH_ROUTE_SBC:
  - start|ROUTE_ACC_CALLEE:
  - start|ROUTE_SET_ACC_CALLEE_CALL_COUNTERS:
  - return|ROUTE_SET_ACC_CALLEE_CALL_COUNTERS:
  - return|ROUTE_ACC_CALLEE:
  - start|ROUTE_SET_BRANCH_HDRS:
  - start|ROUTE_PREPARE_UA:
  - return|ROUTE_PREPARE_UA:
  - return|ROUTE_SET_BRANCH_HDRS:
  - start|ROUTE_SET_RUSER:
  - return|ROUTE_SET_RUSER:
  - start|ROUTE_BRANCH_ACC_RTP:
  - return|ROUTE_BRANCH_ACC_RTP:
  - start|ROUTE_FILTER_PRACK:
  - return|ROUTE_FILTER_PRACK:
  - start|ROUTE_PREPARE_SST:
  - start|ROUTE_REMOVE_TIMER_SUPP_REQ:
  - return|ROUTE_REMOVE_TIMER_SUPP_REQ:
  - return|ROUTE_PREPARE_SST:
  - start|ROUTE_PREPARE_MOH:
  - return|ROUTE_PREPARE_MOH:
  - start|ROUTE_SET_CALLER_CLI:
  - start|ROUTE_PREPARE_CALLER_CLI:
  - return|ROUTE_PREPARE_CALLER_CLI:
  - start|ROUTE_PREPARE_CALLER_CLI:
  - return|ROUTE_PREPARE_CALLER_CLI:
  - start|ROUTE_PREPARE_CALLER_CLI:
  - return|ROUTE_PREPARE_CALLER_CLI:
  - start|ROUTE_PREPARE_CALLER_CLI:
  - return|ROUTE_PREPARE_CALLER_CLI:
  - start|ROUTE_PREPARE_CALLER_CLI:
  - return|ROUTE_PREPARE_CALLER_CLI:
  - start|ROUTE_PREPARE_CALLER_CLI:
  - return|ROUTE_PREPARE_CALLER_CLI:
  - return|ROUTE_SET_CALLER_CLI:
  - start|ROUTE_SET_CALLEE:
  - return|ROUTE_SET_CALLEE:
  - start|ROUTE_ADD_CALLINFO:
  - start|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
  - return|ROUTE_ADD_CALLINFO_CALLER_PRIMARY:
  - start|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
  - return|ROUTE_ADD_CALLINFO_CALLEE_PRIMARY:
  - return|ROUTE_ADD_CALLINFO:
  - start|ROUTE_APPLY_HEADER_RULES:
  - return|ROUTE_APPLY_HEADER_RULES:
  - return|BRANCH_ROUTE_SBC:
  - start|DEFAULT_SEND:
  - exit|DEFAULT_SEND:
  - exit|DEFAULT_SEND:
  - start|ROUTE_EXIT:
  - start|ROUTE_RUNTIME:
  - return|ROUTE_RUNTIME:
  - exit|ROUTE_EXIT:
      $avp(lua_dlg_profile): [
        "relay",
        "peerout:[% peer_00_invite_peerout_failover_host0.id %]",
        "peer:[% peer_00_invite_peerout_failover_host0.id %]",
        "accountout:[% customer_test.id %]",
        "userout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccountout:[% customer_test.id %]",
        "totaluserout:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% invite_peerout_failover_scenarios_test.testuser1002.uuid %]",
        "total",
        "outgoing"
      ]
  - exit|ROUTE_EXIT:
"sip_in":
  - '^SIP/2.0 408 Timeout'
"sip_out":
  - [
      '^ACK sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]:\d+;transport=udp SIP/2.0',
      'From: <sip:[% invite_peerout_failover_scenarios_test.testuser1002.phone_number %]@invite-peerout-failover.scenarios.test>;tag=',
      'To: <sip:[% scenarios.0.responders.0.username %]@invite-peerout-failover.scenarios.test>;tag=',
      'CSeq: 2 ACK',
      'Content-Length: 0'
    ]
  - [
      '^INVITE sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]:\d+;transport=udp SIP/2.0',
      'From: <sip:[% invite_peerout_failover_scenarios_test.testuser1002.phone_number %]@invite-peerout-failover.scenarios.test>;tag=',
      'To: <sip:[% scenarios.0.responders.0.username %]@invite-peerout-failover.scenarios.test>',
      'CSeq: 2 INVITE',
      'Contact: <sip:[% scenarios.0.username %]@[% scenarios.0.ip %]:[% scenarios.0.port %](;[^>]+)?>',
      'Content-Type: application/sdp',
      'P-Caller-UUID: [% invite_peerout_failover_scenarios_test.testuser1002.uuid %]',
      'P-Callee-UUID: [% invite_peerout_failover_scenarios_test.testuser1001.uuid %]',
      'P-Asserted-Identity: <sip:[% invite_peerout_failover_scenarios_test.testuser1002.phone_number %]@invite-peerout-failover.scenarios.test>',
      'P-Called-Party-ID: <sip:[% scenarios.0.responders.0.username %]@[% scenarios.0.responders.0.ip %]>',
      'P-App-Param: ;calltimer=21600;aleg_sst_enable=no;sst_enable=no',
      'P-App-Name: sbc',
      'P-NGCP-Caller-Info: <sip:[% scenarios.0.username %]@invite-peerout-failover.scenarios.test>;ip=[% scenarios.0.ip %];port=[% scenarios.0.port %];primary=[% invite_peerout_failover_scenarios_test.testuser1002.phone_number %]',
      'P-NGCP-Callee-Info: <sip:[% scenarios.0.responders.0.username %]@invite-peerout-failover.scenarios.test>;ip=[% scenarios.0.responders.2.ip %];port=[% scenarios.0.responders.2.port %]',
      'P-D-Uri: sip:127.0.0.1:5060;received=',
    ]
