ringcentral-softphone 1.1.4 → 1.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -26
- package/dist/cjs/call-session/index.js +1 -1
- package/dist/cjs/index.js +2 -4
- package/dist/esm/call-session/index.js +1 -1
- package/dist/esm/index.js +2 -4
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -57,31 +57,6 @@ The credentials data returned by that API is like this:
|
|
|
57
57
|
"proxy": "sip71.ringcentral.com:5090",
|
|
58
58
|
"proxyTLS": "sip71.ringcentral.com:5096"
|
|
59
59
|
},
|
|
60
|
-
{
|
|
61
|
-
"region": "APAC",
|
|
62
|
-
"proxy": "sip60.ringcentral.com:5090",
|
|
63
|
-
"proxyTLS": "sip60.ringcentral.com:5096"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
"region": "EMEA",
|
|
67
|
-
"proxy": "sip30.ringcentral.com:5090",
|
|
68
|
-
"proxyTLS": "sip30.ringcentral.com:5096"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
"region": "APAC",
|
|
72
|
-
"proxy": "sip70.ringcentral.com:5090",
|
|
73
|
-
"proxyTLS": "sip70.ringcentral.com:5096"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"region": "APAC",
|
|
77
|
-
"proxy": "sip50.ringcentral.com:5090",
|
|
78
|
-
"proxyTLS": "sip50.ringcentral.com:5096"
|
|
79
|
-
},
|
|
80
|
-
{
|
|
81
|
-
"region": "NA",
|
|
82
|
-
"proxy": "SIP10.ringcentral.com:5090",
|
|
83
|
-
"proxyTLS": "sip10.ringcentral.com:5096"
|
|
84
|
-
},
|
|
85
60
|
{
|
|
86
61
|
"region": "NA",
|
|
87
62
|
"proxy": "SIP20.ringcentral.com:5090",
|
|
@@ -92,6 +67,7 @@ The credentials data returned by that API is like this:
|
|
|
92
67
|
"proxy": "sip80.ringcentral.com:5090",
|
|
93
68
|
"proxyTLS": "sip80.ringcentral.com:5096"
|
|
94
69
|
}
|
|
70
|
+
...
|
|
95
71
|
],
|
|
96
72
|
"userName": "16501234567",
|
|
97
73
|
"password": "password",
|
|
@@ -260,6 +236,16 @@ callSession1.on("rtpPacket", (rtpPacket: RtpPacket) => {
|
|
|
260
236
|
});
|
|
261
237
|
```
|
|
262
238
|
|
|
239
|
+
## Telephony Session ID
|
|
240
|
+
|
|
241
|
+
For outbound calls, you will be able to find header like this
|
|
242
|
+
`p-rc-api-ids: party-id=p-a0d17e323f0fez1953f50f90dz296e3440000-1;session-id=s-a0d17e323f0fez1953f50f90dz296e3440000`
|
|
243
|
+
from `callSession.sipMessage.headers`.
|
|
244
|
+
|
|
245
|
+
However, for inbound calls, the server doesn't tell us anything about the
|
|
246
|
+
Telephony Session ID. Here is a workaround solution:
|
|
247
|
+
https://github.com/tylerlong/rc-softphone-call-id-test
|
|
248
|
+
|
|
263
249
|
---
|
|
264
250
|
|
|
265
251
|
## Dev Notes
|
|
@@ -276,4 +262,4 @@ Content below is for the maintainer/contributor of this SDK.
|
|
|
276
262
|
|
|
277
263
|
#### Code style
|
|
278
264
|
|
|
279
|
-
We use `deno fmt` to format all code.
|
|
265
|
+
We use `deno fmt && deno lint --fix` to format and lint all code.
|
package/dist/cjs/index.js
CHANGED
|
@@ -67,14 +67,12 @@ class Softphone extends node_events_1.default {
|
|
|
67
67
|
const fromTag = (0, utils_js_1.uuid)();
|
|
68
68
|
const requestMessage = new index_js_1.RequestMessage(`REGISTER sip:${this.sipInfo.domain} SIP/2.0`, {
|
|
69
69
|
Via: `SIP/2.0/TLS ${this.client.localAddress}:${this.client.localPort};rport;branch=${(0, utils_js_1.branch)()};alias`,
|
|
70
|
-
Route: `<sip:${this.sipInfo.outboundProxy};transport=tls;lr>`,
|
|
71
70
|
"Max-Forwards": "70",
|
|
72
71
|
From: `<sip:${this.sipInfo.username}@${this.sipInfo.domain}>;tag=${fromTag}`,
|
|
73
72
|
To: `<sip:${this.sipInfo.username}@${this.sipInfo.domain}>`,
|
|
74
73
|
"Call-ID": this.registerCallId,
|
|
75
|
-
Supported: "outbound, path",
|
|
76
74
|
Contact: `<sip:${this.sipInfo.username}@${this.client.localAddress}:${this.client.localPort};transport=TLS;ob>;reg-id=1;+sip.instance="<urn:uuid:${this.instanceId}>"`,
|
|
77
|
-
Expires:
|
|
75
|
+
Expires: 3600,
|
|
78
76
|
Allow: "PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS",
|
|
79
77
|
});
|
|
80
78
|
const inboundMessage = await this.send(requestMessage, true);
|
|
@@ -168,7 +166,7 @@ a=fmtp:101 0-15
|
|
|
168
166
|
a=sendrecv
|
|
169
167
|
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:${utils_js_1.localKey}
|
|
170
168
|
`.trim();
|
|
171
|
-
const inviteMessage = new index_js_1.RequestMessage(`INVITE sip:${callee} SIP/2.0`, {
|
|
169
|
+
const inviteMessage = new index_js_1.RequestMessage(`INVITE sip:${callee}@${this.sipInfo.domain} SIP/2.0`, {
|
|
172
170
|
Via: `SIP/2.0/TLS ${this.client.localAddress}:${this.client.localPort};rport;branch=${(0, utils_js_1.branch)()};alias`,
|
|
173
171
|
"Max-Forwards": 70,
|
|
174
172
|
From: `<sip:${this.sipInfo.username}@${this.sipInfo.domain}>;tag=${(0, utils_js_1.uuid)()}`,
|
package/dist/esm/index.js
CHANGED
|
@@ -62,14 +62,12 @@ class Softphone extends EventEmitter {
|
|
|
62
62
|
const fromTag = uuid();
|
|
63
63
|
const requestMessage = new RequestMessage(`REGISTER sip:${this.sipInfo.domain} SIP/2.0`, {
|
|
64
64
|
Via: `SIP/2.0/TLS ${this.client.localAddress}:${this.client.localPort};rport;branch=${branch()};alias`,
|
|
65
|
-
Route: `<sip:${this.sipInfo.outboundProxy};transport=tls;lr>`,
|
|
66
65
|
"Max-Forwards": "70",
|
|
67
66
|
From: `<sip:${this.sipInfo.username}@${this.sipInfo.domain}>;tag=${fromTag}`,
|
|
68
67
|
To: `<sip:${this.sipInfo.username}@${this.sipInfo.domain}>`,
|
|
69
68
|
"Call-ID": this.registerCallId,
|
|
70
|
-
Supported: "outbound, path",
|
|
71
69
|
Contact: `<sip:${this.sipInfo.username}@${this.client.localAddress}:${this.client.localPort};transport=TLS;ob>;reg-id=1;+sip.instance="<urn:uuid:${this.instanceId}>"`,
|
|
72
|
-
Expires:
|
|
70
|
+
Expires: 3600,
|
|
73
71
|
Allow: "PRACK, INVITE, ACK, BYE, CANCEL, UPDATE, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, OPTIONS",
|
|
74
72
|
});
|
|
75
73
|
const inboundMessage = await this.send(requestMessage, true);
|
|
@@ -163,7 +161,7 @@ a=fmtp:101 0-15
|
|
|
163
161
|
a=sendrecv
|
|
164
162
|
a=crypto:1 AES_CM_128_HMAC_SHA1_80 inline:${localKey}
|
|
165
163
|
`.trim();
|
|
166
|
-
const inviteMessage = new RequestMessage(`INVITE sip:${callee} SIP/2.0`, {
|
|
164
|
+
const inviteMessage = new RequestMessage(`INVITE sip:${callee}@${this.sipInfo.domain} SIP/2.0`, {
|
|
167
165
|
Via: `SIP/2.0/TLS ${this.client.localAddress}:${this.client.localPort};rport;branch=${branch()};alias`,
|
|
168
166
|
"Max-Forwards": 70,
|
|
169
167
|
From: `<sip:${this.sipInfo.username}@${this.sipInfo.domain}>;tag=${uuid()}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ringcentral-softphone",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"homepage": "https://github.com/ringcentral/ringcentral-softphone-ts",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"types": "dist/esm/index.d.ts",
|
|
@@ -30,14 +30,14 @@
|
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@evan/opus": "^1.0.3",
|
|
33
|
-
"wait-for-async": "^0.7.
|
|
33
|
+
"wait-for-async": "^0.7.13",
|
|
34
34
|
"werift-rtp": "^0.8.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
|
-
"@types/node": "^22.
|
|
37
|
+
"@types/node": "^22.13.13",
|
|
38
38
|
"dotenv-override-true": "^6.2.2",
|
|
39
|
-
"tsx": "^4.19.
|
|
40
|
-
"typescript": "^5.
|
|
41
|
-
"yarn-upgrade-all": "^0.7.
|
|
39
|
+
"tsx": "^4.19.3",
|
|
40
|
+
"typescript": "^5.8.2",
|
|
41
|
+
"yarn-upgrade-all": "^0.7.5"
|
|
42
42
|
}
|
|
43
43
|
}
|