(id)
| 55 | }); |
| 56 | |
| 57 | function getSourceById(id) { |
| 58 | const source = sources.find((item) => item.id === id); |
| 59 | |
| 60 | if (!source) { |
| 61 | throw new Error(`Unsupported source id: ${id}`); |
| 62 | } |
| 63 | |
| 64 | return source; |
| 65 | } |
| 66 | |
| 67 | function getSourceForConnection(connection) { |
| 68 | const sourceId = connection?.subType || connection?.type; |
no outgoing calls