Skip to content

Commit eeb9b00

Browse files
committed
Fix conference name mismatch issue.
1 parent 1a527d4 commit eeb9b00

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

src/services/inboundCall.service.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ import {
1010

1111
export function joinConferenceTwiml (conferenceName: string) : VoiceResponse {
1212
const response = new VoiceResponse()
13-
const dial = response.dial();
14-
dial.conference(`${decodeURIComponent(conferenceName)}`);
13+
const dial = response.dial()
14+
dial.conference(`${decodeURIComponent(conferenceName)}`)
1515

1616
return response
1717
}
@@ -42,12 +42,12 @@ export const generateTwiml = async (from: string, to: string) => {
4242
const callPromises = dialList.map(pa => {
4343
console.log(`Dialing ${pa.address} from ${pa.proxyAddress}...`)
4444

45-
return client.calls.create({
46-
to: pa.address,
47-
from: pa.proxyAddress,
48-
twiml: joinConferenceTwiml(conferenceName).toString(),
49-
});
50-
});
45+
return client.calls.create({
46+
to: pa.address,
47+
from: pa.proxyAddress,
48+
twiml: joinConferenceTwiml(conferenceName).toString()
49+
})
50+
})
5151

5252
await Promise.all(callPromises)
5353

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const generateConferenceName = (phoneNumber: string) : string => {
2-
return encodeURIComponent(`${phoneNumber}_at_${Date.now()}`)
2+
return `${phoneNumber}_at_${Date.now()}`
33
}

0 commit comments

Comments
 (0)