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:
  - start|ROUTE_REG_REQUEST:
  - start|ROUTE_REG_HANDLE:
  - start|ROUTE_AUTH:
  - start|ROUTE_AUTH_HELPER:
  - return|ROUTE_AUTH_HELPER:
  - start|ROUTE_ADD_CALLINFO_REPLY:
  - return|ROUTE_ADD_CALLINFO_REPLY:
  - return|ROUTE_AUTH:
  - start|ROUTE_PREFERENCES:
  - start|ROUTE_CHECK_UA:
  - return|ROUTE_CHECK_UA:
  - start|ROUTE_EXIT:
  - start|ROUTE_RUNTIME:
  - return|ROUTE_RUNTIME:
  - exit|ROUTE_EXIT:
      $xavp(callee_dom_prefs): None
      $xavp(callee_peer_prefs): None
      $xavp(callee_real_prefs): None
      $xavp(callee_usr_prefs): None
      $xavp(caller_dom_prefs[0]=>dummy[*]):
        - caller
      $xavp(caller_peer_prefs): None
      $xavp(caller_real_prefs[0]=>ac[*]): [[% register_allowip_scenarios_test.testuser1003.ac %]]
      $xavp(caller_real_prefs[0]=>account_id): '\d+'
      $xavp(caller_real_prefs[0]=>allowed_ips_grp): '\d+'
      $xavp(caller_real_prefs[0]=>cc[*]): [[% register_allowip_scenarios_test.testuser1003.cc %]]
      $xavp(caller_real_prefs[0]=>cli[*]): [[% register_allowip_scenarios_test.testuser1003.phone_number %]]
      $xavp(caller_real_prefs[0]=>dummy[*]):
        - caller
      $xavp(caller_real_prefs[0]=>man_allowed_ips_grp[*]): [0]
      $xavp(caller_usr_prefs[0]=>ac[*]): [[% register_allowip_scenarios_test.testuser1003.ac %]]
      $xavp(caller_usr_prefs[0]=>account_id): '\d+'
      $xavp(caller_usr_prefs[0]=>allowed_ips_grp): '\d+'
      $xavp(caller_usr_prefs[0]=>cc[*]): [[% register_allowip_scenarios_test.testuser1003.cc %]]
      $xavp(caller_usr_prefs[0]=>cli[*]): [[% register_allowip_scenarios_test.testuser1003.phone_number %]]
      $xavp(caller_usr_prefs[0]=>dummy[*]):
        - caller
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 403 Unauthorized IP detected',
      'Content-Length: 0',
      'P-NGCP-Authorization: [% scenarios.0.username %]@',
      'P-NGCP-Authorized: 1'
    ]
