flow:
  - start|DEFAULT_ROUTE:
  - start|ROUTE_ENTRY:
  - return|ROUTE_ENTRY:
  - start|ROUTE_NET_INFO:
  - return|ROUTE_NET_INFO:
  - start|ROUTE_PRX_REQUEST:
  - start|ROUTE_INITVARS:
  - return|ROUTE_INITVARS:
  - start|ROUTE_INVITE:
  - start|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
  - start|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
  - return|ROUTE_CLEAR_CALLEE_DOMAIN_PREF:
  - return|ROUTE_LOAD_CALLEE_DOMAIN_PREF:
  - start|ROUTE_FIND_CALLER:
  - start|ROUTE_CONSUME_CF_HDRS:
  - return|ROUTE_CONSUME_CF_HDRS:
  - return|ROUTE_FIND_CALLER:
  - start|ROUTE_LOAD_CALLER_PREF:
  - start|ROUTE_CLEAR_CALLER_PREF:
  - return|ROUTE_CLEAR_CALLER_PREF:
  - start|ROUTE_CHECK_UA:
  - return|ROUTE_CHECK_UA:
  - start|ROUTE_LOAD_CALLER_CONTRACT_PREF:
  - return|ROUTE_LOAD_CALLER_CONTRACT_PREF:
  - return|ROUTE_LOAD_CALLER_PREF:
  - start|ROUTE_GET_FORWARDER_CLI:
  - return|ROUTE_GET_FORWARDER_CLI:
  - start|ROUTE_CHECK_USERPROV_CLI:
  - start|ROUTE_CHECK_CLI_ALLOWED:
  - return|ROUTE_CHECK_CLI_ALLOWED:
  - return|ROUTE_CHECK_USERPROV_CLI:
  - start|ROUTE_CHECK_USERPROV_CLI:
  - start|ROUTE_CHECK_CLI_ALLOWED:
  - return|ROUTE_CHECK_CLI_ALLOWED:
  - return|ROUTE_CHECK_USERPROV_CLI:
  - start|ROUTE_CLIR:
  - return|ROUTE_CLIR:
  - start|ROUTE_FIND_CALLEE:
      $var(cf_loop): 1
      $var(forward): 0
      $xavp(caller_real_prefs[0]=>lock[*]): [5]
  - start|ROUTE_CLEAR_CALLEE_PREF:
  - return|ROUTE_CLEAR_CALLEE_PREF:
  - start|ROUTE_LOAD_CALLEE_PREF:
  - start|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
  - return|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
  - start|ROUTE_SET_CALLEE_DIALOG:
  - start|ROUTE_CNT_DLG_CHECK:
  - start|ROUTE_DLG_MANAGE:
  - return|ROUTE_DLG_MANAGE:
  - return|ROUTE_CNT_DLG_CHECK:
  - return|ROUTE_SET_CALLEE_DIALOG:
      $avp(lua_dlg_profile): [
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% spce_test.testuser1003.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% spce_test.testuser1003.uuid %]"
      ]
  - start|ROUTE_BLOCK_IN:
  - return|ROUTE_BLOCK_IN:
  - start|ROUTE_ORDER_CF_MAP_ID:
  - return|ROUTE_ORDER_CF_MAP_ID:
  - return|ROUTE_LOAD_CALLEE_PREF:
  - start|ROUTE_NCOS_CHECK:
  - start|ROUTE_NCOS:
  - return|ROUTE_NCOS:
  - start|ROUTE_NCOS:
  - return|ROUTE_NCOS:
  - start|ROUTE_NCOS:
  - return|ROUTE_NCOS:
  - start|ROUTE_NCOS:
  - return|ROUTE_NCOS:
  - start|ROUTE_NCOS:
  - return|ROUTE_NCOS:
  - return|ROUTE_NCOS_CHECK:
  - start|ROUTE_BLOCK_OUT:
  - return|ROUTE_BLOCK_OUT:
  - start|ROUTE_CHECK_PBX:
  - return|ROUTE_CHECK_PBX:
  - start|ROUTE_CALLEE_DISPATCH:
  - start|ROUTE_INVITE_TO_INT:
  - start|ROUTE_CF_CFU:
  - return|ROUTE_CF_CFU:
  - start|ROUTE_CNT_DLG_CHECK:
  - return|ROUTE_CNT_DLG_CHECK:
  - start|ROUTE_OUTBOUND:
  - start|ROUTE_SET_CALLER_DIALOG:
      $avp(lua_dlg_profile): [
        "local",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% spce_test.testuser1003.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% spce_test.testuser1003.uuid %]"
      ]
  - start|ROUTE_CNT_DLG_CHECK:
  - return|ROUTE_CNT_DLG_CHECK:
  - return|ROUTE_SET_CALLER_DIALOG:
      $avp(lua_dlg_profile): [
        "accountout:[% customer_test.id %]",
        "userout:[% spce_test.testuser1001.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% spce_test.testuser1001.uuid %]",
        "totalaccountout:[% customer_test.id %]",
        "totaluserout:[% spce_test.testuser1001.uuid %]",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% spce_test.testuser1001.uuid %]",
        "local",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% spce_test.testuser1003.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% spce_test.testuser1003.uuid %]"
      ]
  - start|ROUTE_ACC_CALLER:
  - return|ROUTE_ACC_CALLER:
  - start|ROUTE_ACC_CALLEE:
  - return|ROUTE_ACC_CALLEE:
  - start|BRANCH_ROUTE_SBC:
  - start|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
  - return|ROUTE_LOAD_CALLEE_CONTRACT_PREF:
  - start|ROUTE_SET_CALLEE_DIALOG:
  - start|ROUTE_CNT_DLG_CHECK:
  - return|ROUTE_CNT_DLG_CHECK:
  - return|ROUTE_SET_CALLEE_DIALOG:
  - start|ROUTE_BRANCH_ACC_RTP:
  - return|ROUTE_BRANCH_ACC_RTP:
  - 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_FILTER_PRACK:
  - return|ROUTE_FILTER_PRACK:
  - start|ROUTE_PREPARE_SST:
  - 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:
  - 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:
  - return|BRANCH_ROUTE_SBC:
  - return|BRANCH_ROUTE_SBC:
  - start|ROUTE_EXIT:
  - start|ROUTE_RUNTIME:
  - return|ROUTE_RUNTIME:
  - exit|ROUTE_EXIT:
      $avp(lua_dlg_profile): [
        "accountout:[% customer_test.id %]",
        "userout:[% spce_test.testuser1001.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% spce_test.testuser1001.uuid %]",
        "totalaccountout:[% customer_test.id %]",
        "totaluserout:[% spce_test.testuser1001.uuid %]",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% spce_test.testuser1001.uuid %]",
        "local",
        "totalaccount:[% customer_test.id %]",
        "totaluser:[% spce_test.testuser1003.uuid %]",
        "account:[% customer_test.id %]",
        "user:[% spce_test.testuser1003.uuid %]"
      ]
sip_in:
  - '^INVITE sip:4311003@'
  - 'Contact: <sip:127.0.0.1:5080'
  - 'CSeq: \d+ INVITE'
  - 'Content-Type: application/sdp'
  - 'P-Caller-UUID: [% spce_test.testuser1001.uuid %]'
  - 'P-First-Caller-UPN: 4311002'
  - 'P-First-Caller-NPN: 4311002'
  - 'P-Acc-Caller-User: testuser1001'
  - 'P-Acc-State: cfu'
  - 'P-From-Peer: 0'
  - 'P-CF-Depth: 1'
sip_out:
  - [
      '^SIP/2.0 100 Trying',
      'CSeq: \d+ INVITE',
      'From: <sip:testuser1002@',
      'To: <sip:testuser1001@'
    ]
  - [
      '^INVITE sip:testuser1003@',
      'CSeq: \d+ INVITE',
      'From: <sip:4311002@',
      'Contact: <sip:127.0.0.1:5080(;transport=udp)?>',
      'To: <sip:testuser1001@',
      'Content-Type: application/sdp',
      'P-Callee-UUID: [% spce_test.testuser1003.uuid %]',
      'P-Asserted-Identity: <sip:4311002@',
      'P-Called-Party-ID: <sip:testuser1003@',
      'P-App-Name: sbc',
      'P-NGCP-Caller-Info: <sip:testuser1001@',
      'P-NGCP-Callee-Info: <sip:4311003@'
    ]
