# VoIP Plugin Error Code

# 1. The backend returns an error code

errCode describe
1 RoomId error
2 Device deviceId error
3 Voip_id error
4 VoipToken Error (Face Brush Mode)
5 Error generating voip room
7 OpenId error
8 OpenId Unauthorized (Face Brush Mode)
9 OpenId is an unauthorized device (hardware mode) or is not a userId associate (face swiping mode)
12 Weixin Mini Program Audio and video capability audit has not been completed, temporarily unavailable in the official version
13 Hardware device dialed WeChat, voipToken error
14 WeChat Dialing hardware device, voipToken error
15 to be in arrears
17 VoipToken corresponds to modelId error
19 OpenId does not match Weixin Mini Program appId. (The same user has different openId in different Mini Programs)
20 OpenId is invalid
22 Incoming chargeType is illegal
23 The current device license has expired
24 The current device does not activate the license

# 2. Internal error code for the plug-in

The latest version of the plugin is supported

errCode describe
1000 When registering the device with WMPF, deviceToken failed to get
1001 Voiptoken is empty or type error (only if passing in is required)
1002 CGI Request Failed
1003 CGI Return Value Parsing Failed
1004 Error in Interface Call Parameter
1005 The plugin is currently processing other calls
1006 The current interface must be used in the WMPF
1007 The current interface must be used on the WeChat Guest
1008 The call was interrupted, for specific reasons, see errMsg
1011 The current platform does not support this feature
2000 Join the room failed, specific reasons need to see errMsg
2001 Join Room Failure: There are currently other Weixin Mini Program VoIP calls in progress
2002 Join Room Failure: SDK Reset Failure
2003 Join Room Failure: Initial SDK Failure
2004 Join Room Failure: SDK Join Room Failure
2005 Join room failure: join callback failure
2006 Join room failure: talk callback failure
2007 Joining a room failed: failed to call audio and video equipment (e.g. failed to enable the microphone, etc.)
2008 Join Room Failure: Get sessionKey Failure
2009 Failed to join a room: Cancelled or Weixin Mini Program back
2010 Join room failed: join CGI request failed
2100 Join room failed: There are currently other WeChat friends VoIP or system calls in progress
2102 Joining a room failed: No permission to access audio and video devices (e.g. recording permission, etc.)
2103 Join Room Failure: No permission to call JSAPI
2104 Join Room Failure: Other CGI exception, see errMsg for specific reasons

# 3. Error class

Support needs to start with the plug-in version 2.4.0

# 3.1 VoipError

The plug-in throws an exception base class, inherits fromError, and adds the following properties:

Attribute Name type Introduction
errMsg string Error message
errCode number Error code
errno number The errno returned by the base library interface
cause unknown If the error itself is caused by another error, the original error object is included here

# 3.2 VoipCgiError

Background request failed error, inherited fromVoipError, type only, no new attributes.

# 3.3 VoipJoinError

Add room failure-related errors, inherited fromVoipError, and add the following properties:

Developers generally do not need to pay attention to these two attributes, only WeChat side troubleshooting problems need to

Attribute Name type Introduction
extErrMsg string Wx.joinVoipChatAdditional information in error reporting
errType number Wx.joinVoipChaterrType returned by error

# 3.4 VoipPluginError

Other types of errors in the plugin, inherited fromVoipError, type only, no new attributes.