KI-AGENT: Easybell Trunk Vorlage korrigieren
This commit is contained in:
@@ -70,12 +70,14 @@ const trunkProviders = {
|
||||
label: "Telekom",
|
||||
defaultRegistrar: "tel.t-online.de",
|
||||
aorContactIncludesUser: false,
|
||||
contactUserUsesCallerId: false,
|
||||
},
|
||||
easybell: {
|
||||
key: "easybell",
|
||||
label: "Easybell",
|
||||
defaultRegistrar: "voip.easybell.de",
|
||||
aorContactIncludesUser: true,
|
||||
contactUserUsesCallerId: true,
|
||||
},
|
||||
} as const
|
||||
|
||||
@@ -187,8 +189,9 @@ const renderProviderPjsipConfig = (trunk: any) => {
|
||||
const password = asteriskValue(trunk.password)
|
||||
const callerId = asteriskValue(trunk.callerId) || sipUser
|
||||
const externalMediaAddress = asteriskValue(trunk.externalMediaAddress || trunk.externalSignalingAddress)
|
||||
const aorContact = provider.aorContactIncludesUser && sipUser
|
||||
? `sip:${sipUser}@${registrar}`
|
||||
const contactUser = provider.contactUserUsesCallerId && callerId ? callerId : sipUser
|
||||
const aorContact = provider.aorContactIncludesUser && contactUser
|
||||
? `sip:${contactUser}@${registrar}`
|
||||
: `sip:${registrar}`
|
||||
|
||||
return [
|
||||
@@ -208,7 +211,7 @@ const renderProviderPjsipConfig = (trunk: any) => {
|
||||
"transport=transport-udp",
|
||||
`context=from-${providerKey}`,
|
||||
"disallow=all",
|
||||
"allow=alaw,ulaw",
|
||||
providerKey === "easybell" ? "allow=alaw,ulaw,g722" : "allow=alaw,ulaw",
|
||||
`aors=${providerKey}-aor`,
|
||||
`outbound_auth=${providerKey}-auth`,
|
||||
`from_user=${sipUser}`,
|
||||
@@ -219,6 +222,10 @@ const renderProviderPjsipConfig = (trunk: any) => {
|
||||
"force_rport=yes",
|
||||
"rewrite_contact=yes",
|
||||
"rtp_symmetric=yes",
|
||||
...(providerKey === "easybell" ? [
|
||||
"ice_support=no",
|
||||
"send_pai=yes",
|
||||
] : []),
|
||||
"timers=no",
|
||||
"",
|
||||
`[${providerKey}-identify]`,
|
||||
@@ -232,10 +239,10 @@ const renderProviderPjsipConfig = (trunk: any) => {
|
||||
`outbound_auth=${providerKey}-auth`,
|
||||
`server_uri=sip:${registrar}`,
|
||||
`client_uri=sip:${sipUser}@${registrar}`,
|
||||
`contact_user=${sipUser}`,
|
||||
`contact_user=${contactUser}`,
|
||||
"retry_interval=60",
|
||||
"forbidden_retry_interval=300",
|
||||
"expiration=480",
|
||||
`forbidden_retry_interval=${providerKey === "easybell" ? "600" : "300"}`,
|
||||
`expiration=${providerKey === "easybell" ? "1800" : "480"}`,
|
||||
"line=yes",
|
||||
`endpoint=${providerKey}`,
|
||||
"",
|
||||
@@ -266,12 +273,12 @@ const renderProviderExtensionsConfig = (trunk: any) => {
|
||||
? `exten => _${escapedPrefix}X.,1,NoOp(FEDEO ausgehend über ${provider.label}: $` + "{EXTEN})"
|
||||
: `exten => _X.,1,NoOp(FEDEO ausgehend über ${provider.label}: $` + "{EXTEN})",
|
||||
` same => n,Set(CALLERID(num)=${callerId})`,
|
||||
` same => n,Dial(PJSIP/$` + `{EXTEN}@${providerKey},60)`,
|
||||
` same => n,Dial(PJSIP/${providerKey === "easybell" ? "sip:" : ""}$` + `{EXTEN}@${providerKey},60)`,
|
||||
" same => n,Hangup()",
|
||||
"",
|
||||
`exten => _+X.,1,NoOp(FEDEO ausgehend über ${provider.label}: $` + "{EXTEN})",
|
||||
` same => n,Set(CALLERID(num)=${callerId})`,
|
||||
` same => n,Dial(PJSIP/$` + `{EXTEN}@${providerKey},60)`,
|
||||
` same => n,Dial(PJSIP/${providerKey === "easybell" ? "sip:" : ""}$` + `{EXTEN}@${providerKey},60)`,
|
||||
" same => n,Hangup()",
|
||||
"",
|
||||
`[from-${providerKey}]`,
|
||||
|
||||
Reference in New Issue
Block a user