Iam
C → S {type: 'Iam', name: …, CID: …, OID: …, template: …, client: …}
Iam – register name: registers client on RTCgate server.
arguments:
- name - user's address
- CID - unique client ID, used to recognize multiple connections from same client and reconnect connections after breaks
- OID - webrtc object's ID (name), ”wrtc” by default
- template - wrtc template number to use for this client
- client - type of webrtc client used and operating system. It should preferably have format <client name> <version> (<wrtc_kit version>) / <web browser> <version> (<operating system>) for example “Ingate Exclient 1.2.13 (0.17.0)/chrome 51 (Win32)”
optional arguments:
- auth - authentication method:
- rtoken - client has a REST token it can present for authentication
- name_dn - user's descriptive name
- name_alias - user's secondary address
- devicetoken - push notification token as received from OS (deprecated, use registertoken instead)
- rtoken - REST authentication token as set by wrtc.setRESTtoken()
- workgroups - list of workgroups user is member of. If missing user is not member of any workgroups.
Server responds with unauthorised or welcome message.
name, CID, OID
Multiple registered clients can have same name.
Same or different CID tells if registrations are from same origin or not.
Different OID tells which connection on same client is used.
For example:
- name: foo, CID:A, OID:wrtc
- name: foo, CID:B, OID:wrtc
- name: foo, CID:B, OID:wrtc2
All three registrations are for same user foo, but registrations 2) and 3) are on a different machine than 1). (Different CID-s. Can though also be different tabs on same webclient.) Registration 3) usually exists while user is talking with someone on registration 2) to be able to receive incoming calls. Those calls is sent to registration 3) by RTCgate server using the CID:B, OID:wrtc2 combination.