flow:
  - start|DEFAULT_ROUTE:
  - start|ROUTE_ENTRY:
  - return|ROUTE_ENTRY:
  - start|ROUTE_NET_INFO:
      $x_hdr(From): sip:[% scenarios.2.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:
      $x_hdr(From): register-bria.scenarios.test
      $var(realm_user): [% scenarios.2.username %]
      $var(realm_domain): register-bria.scenarios.test
  - return|ROUTE_AUTH_HELPER:
      $avp(orig_acc_caller_user): ['[% scenarios.2.username %]']
      $avp(orig_acc_caller_domain): ['register-bria.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:
  - start|ROUTE_EXIT:
  - start|ROUTE_RUNTIME:
  - return|ROUTE_RUNTIME:
  - exit|ROUTE_EXIT:
sip_in:
  - '^REGISTER'
  - 'Contact: "TestBria" <sip:[% scenarios.2.username %]@[% scenarios.2.ip %]:[% scenarios.2.port %];ob>;reg-id=1;\+sip.instance="<urn:uuid:C3DD6013-20E8-40E3-8EA2-5849B02ED0C4>"'
  - 'Contact: "TestBria" <sip:[% scenarios.1.username %]@[% scenarios.2.ip %]:6666;ob>;expires=0'
  - 'Content-Length: 0'
  - 'Expires: 600'
  - 'Authorization: Digest username="[% scenarios.2.username %]"'
sip_out:
  - [
      '^SIP/2.0 100 Trying',
      'Content-Length: 0'
    ]
  - [
      '^SIP/2.0 200 OK',
      'Contact: <sip:[% scenarios.2.username %]@[% scenarios.2.ip %]:[% scenarios.2.port %];ob>;expires=\d{3};(received="sip:[% scenarios.2.ip %]:[% scenarios.2.port %]";)?\+sip.instance="<urn:uuid:C3DD6013-20E8-40E3-8EA2-5849B02ED0C4>";reg-id=1',
      '_:NOT:_Contact: <sip:[% scenarios.1.username %]@[% scenarios.2.ip %]:6666;ob>;expires=\d+',
      'Content-Length: 0',
      'P-NGCP-Authorization: [% scenarios.2.username %]@',
      'P-NGCP-Authorized: 1'
    ]
