flow:
  - start|DEFAULT_ROUTE:
  - start|ROUTE_ENTRY:
  - return|ROUTE_ENTRY:
  - start|ROUTE_NET_INFO:
      $x_hdr(From): sip:[% scenarios.0.username %]@
  - return|ROUTE_NET_INFO:
  - start|ROUTE_CHECK_TEL_URI:
  - return|ROUTE_CHECK_TEL_URI:
      $avp(proto): ["tcp"]
  - start|ROUTE_REG_REQUEST:
  - start|ROUTE_REG_HANDLE:
  - start|ROUTE_AUTH:
  - start|ROUTE_AUTH_HELPER:
      $x_hdr(From): register-tcp.scenarios.test
      $var(realm_user): [% scenarios.0.username %]
      $var(realm_domain): register-tcp.scenarios.test
  - return|ROUTE_AUTH_HELPER:
      $avp(orig_acc_caller_user): ['[% scenarios.0.username %]']
      $avp(orig_acc_caller_domain): ['register-tcp.scenarios.test']
  - start|ROUTE_ADD_CALLINFO_REPLY:
  - return|ROUTE_ADD_CALLINFO_REPLY:
  - return|ROUTE_AUTH:
  - start|ROUTE_PREFERENCES:
  - start|ROUTE_CHECK_UA:
  - return|ROUTE_CHECK_UA:
  - return|ROUTE_PREFERENCES:
      $xavp(caller_dom_prefs[0]=>dummy[*]): ['caller']
      $xavp(caller_dom_prefs[0]=>ac[*]): None
      $xavp(caller_dom_prefs[0]=>cc[*]): None
      $xavp(caller_dom_prefs[0]=>cli[*]): None
      $xavp(caller_real_prefs[0]=>dummy[*]): ['caller']
      $xavp(caller_real_prefs[0]=>ac[*]): [[% register_tcp_scenarios_test.testuser1003.ac %]]
      $xavp(caller_real_prefs[0]=>cc[*]): [[% register_tcp_scenarios_test.testuser1003.cc %]]
      $xavp(caller_real_prefs[0]=>cli[*]): [[% register_tcp_scenarios_test.testuser1003.phone_number %]]
      $xavp(caller_usr_prefs[0]=>dummy[*]): ['caller']
      $xavp(caller_usr_prefs[0]=>ac[*]): [[% register_tcp_scenarios_test.testuser1003.ac %]]
      $xavp(caller_usr_prefs[0]=>cc[*]): [[% register_tcp_scenarios_test.testuser1003.cc %]]
      $xavp(caller_usr_prefs[0]=>cli[*]): [[% register_tcp_scenarios_test.testuser1003.phone_number %]]
  - start|ROUTE_EXIT:
  - start|ROUTE_RUNTIME:
  - return|ROUTE_RUNTIME:
  - exit|ROUTE_EXIT:
sip_in:
  - '^REGISTER'
  - 'Contact: <sip:[% scenarios.0.username %]@[% scenarios.0.ip %]:[% scenarios.0.port %](;[^>]+)?>'
  - 'Content-Length: 0'
  - 'Expires: 600'
  - 'Authorization: Digest username="[% scenarios.0.username %]"'
sip_out:
  - [
      '^SIP/2.0 100 Trying',
      'Content-Length: 0'
    ]
  - [
      '^SIP/2.0 200 OK',
      'Content-Length: 0',
      'P-NGCP-Authorization: [% scenarios.0.username %]@',
      'P-NGCP-Authorized: 1'
    ]
