react-sip-kit 0.2.1 β 0.2.2
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/LICENSE +21 -21
- package/README.md +105 -105
- package/dist/index.cjs +10 -1
- package/dist/index.mjs +10 -1
- package/package.json +98 -98
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2025 Shervin Ghajar
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Shervin Ghajar
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,105 +1,105 @@
|
|
|
1
|
-
# react-sip-kit
|
|
2
|
-
|
|
3
|
-
A modern, modular, and type-safe SIP (Session Initiation Protocol) provider for React applications.
|
|
4
|
-
Built for real-time web telephony, this library offers a clean, scalable, and fully configurable SIP core, decoupled from UI and legacy global state.
|
|
5
|
-
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## Features
|
|
9
|
-
|
|
10
|
-
- π **SIP Core**: Register, make, receive, and manage SIP calls (audio & video)
|
|
11
|
-
- π **Transfer & Conference**: Supports call transfer and conferencing
|
|
12
|
-
- π₯ **Video Call Support**: Video call features with device selection
|
|
13
|
-
- π **Ringtone & Notifications**: Customizable audio output for ringtones and notifications
|
|
14
|
-
- π₯ **Buddy/Contact Management**: Manage contacts (buddies) and pass contact data across sessions
|
|
15
|
-
- βοΈ **Fully Configurable**: All settings (account, features, media, UI, etc.) are passed as propsβno global state or localStorage dependencies
|
|
16
|
-
- π§© **Type-Safe & Modular**: Strong TypeScript types, modular config, and easy to extend
|
|
17
|
-
- π§ͺ **Testable**: Stateless SIP core, easy to mock and test
|
|
18
|
-
|
|
19
|
-
---
|
|
20
|
-
|
|
21
|
-
## Installation
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install react-sip-kit
|
|
25
|
-
# or
|
|
26
|
-
yarn add react-sip-kit
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Usage
|
|
32
|
-
|
|
33
|
-
```tsx
|
|
34
|
-
import { SipProvider } from 'react-sip-kit';
|
|
35
|
-
|
|
36
|
-
<SipProvider
|
|
37
|
-
configs={{
|
|
38
|
-
account: {
|
|
39
|
-
username: 'user',
|
|
40
|
-
password: 'password',
|
|
41
|
-
domain: 'sip.example.com',
|
|
42
|
-
wssServer: 'wss.example.com',
|
|
43
|
-
webSocketPort: 7443,
|
|
44
|
-
serverPath: '/ws',
|
|
45
|
-
},
|
|
46
|
-
features: {
|
|
47
|
-
enableVideo: true,
|
|
48
|
-
enableRingtone: true,
|
|
49
|
-
},
|
|
50
|
-
// Add or override other config sections as needed
|
|
51
|
-
}}
|
|
52
|
-
>
|
|
53
|
-
{/* Your app components */}
|
|
54
|
-
</SipProvider>;
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
---
|
|
58
|
-
|
|
59
|
-
## Configuration
|
|
60
|
-
|
|
61
|
-
All configuration is passed via the `configs` prop.
|
|
62
|
-
See [`src/configs/types.ts`](src/configs/types.ts) for the full config structure.
|
|
63
|
-
|
|
64
|
-
**Example config:**
|
|
65
|
-
|
|
66
|
-
```ts
|
|
67
|
-
{
|
|
68
|
-
account: { ... },
|
|
69
|
-
features: { ... },
|
|
70
|
-
media: { ... },
|
|
71
|
-
// ...other sections
|
|
72
|
-
}
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
You can import and extend the default config:
|
|
76
|
-
|
|
77
|
-
```ts
|
|
78
|
-
import { defaultSipConfigs } from 'react-sip-kit/configs';
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
---
|
|
82
|
-
|
|
83
|
-
## API
|
|
84
|
-
|
|
85
|
-
- **`<SipProvider configs={...}>`**
|
|
86
|
-
Provides SIP context and manages SIP sessions for your app.
|
|
87
|
-
|
|
88
|
-
- **Context hooks**
|
|
89
|
-
Use React context or custom hooks to access SIP state, session methods, and events.
|
|
90
|
-
|
|
91
|
-
---
|
|
92
|
-
|
|
93
|
-
## License
|
|
94
|
-
|
|
95
|
-
MIT
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Author
|
|
100
|
-
|
|
101
|
-
**Shervin Ghajar**
|
|
102
|
-
[GitHub](https://github.com/shervin-ghajar)
|
|
103
|
-
Email: ssghajar.work@gmail.com
|
|
104
|
-
|
|
105
|
-
---
|
|
1
|
+
# react-sip-kit
|
|
2
|
+
|
|
3
|
+
A modern, modular, and type-safe SIP (Session Initiation Protocol) provider for React applications.
|
|
4
|
+
Built for real-time web telephony, this library offers a clean, scalable, and fully configurable SIP core, decoupled from UI and legacy global state.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- π **SIP Core**: Register, make, receive, and manage SIP calls (audio & video)
|
|
11
|
+
- π **Transfer & Conference**: Supports call transfer and conferencing
|
|
12
|
+
- π₯ **Video Call Support**: Video call features with device selection
|
|
13
|
+
- π **Ringtone & Notifications**: Customizable audio output for ringtones and notifications
|
|
14
|
+
- π₯ **Buddy/Contact Management**: Manage contacts (buddies) and pass contact data across sessions
|
|
15
|
+
- βοΈ **Fully Configurable**: All settings (account, features, media, UI, etc.) are passed as propsβno global state or localStorage dependencies
|
|
16
|
+
- π§© **Type-Safe & Modular**: Strong TypeScript types, modular config, and easy to extend
|
|
17
|
+
- π§ͺ **Testable**: Stateless SIP core, easy to mock and test
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install react-sip-kit
|
|
25
|
+
# or
|
|
26
|
+
yarn add react-sip-kit
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
## Usage
|
|
32
|
+
|
|
33
|
+
```tsx
|
|
34
|
+
import { SipProvider } from 'react-sip-kit';
|
|
35
|
+
|
|
36
|
+
<SipProvider
|
|
37
|
+
configs={{
|
|
38
|
+
account: {
|
|
39
|
+
username: 'user',
|
|
40
|
+
password: 'password',
|
|
41
|
+
domain: 'sip.example.com',
|
|
42
|
+
wssServer: 'wss.example.com',
|
|
43
|
+
webSocketPort: 7443,
|
|
44
|
+
serverPath: '/ws',
|
|
45
|
+
},
|
|
46
|
+
features: {
|
|
47
|
+
enableVideo: true,
|
|
48
|
+
enableRingtone: true,
|
|
49
|
+
},
|
|
50
|
+
// Add or override other config sections as needed
|
|
51
|
+
}}
|
|
52
|
+
>
|
|
53
|
+
{/* Your app components */}
|
|
54
|
+
</SipProvider>;
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Configuration
|
|
60
|
+
|
|
61
|
+
All configuration is passed via the `configs` prop.
|
|
62
|
+
See [`src/configs/types.ts`](src/configs/types.ts) for the full config structure.
|
|
63
|
+
|
|
64
|
+
**Example config:**
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
{
|
|
68
|
+
account: { ... },
|
|
69
|
+
features: { ... },
|
|
70
|
+
media: { ... },
|
|
71
|
+
// ...other sections
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
You can import and extend the default config:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
import { defaultSipConfigs } from 'react-sip-kit/configs';
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## API
|
|
84
|
+
|
|
85
|
+
- **`<SipProvider configs={...}>`**
|
|
86
|
+
Provides SIP context and manages SIP sessions for your app.
|
|
87
|
+
|
|
88
|
+
- **Context hooks**
|
|
89
|
+
Use React context or custom hooks to access SIP state, session methods, and events.
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
MIT
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
## Author
|
|
100
|
+
|
|
101
|
+
**Shervin Ghajar**
|
|
102
|
+
[GitHub](https://github.com/shervin-ghajar)
|
|
103
|
+
Email: ssghajar.work@gmail.com
|
|
104
|
+
|
|
105
|
+
---
|