Маршрутизация

{#if creating}

Новое правило маршрутизации

{#if newData.action_type === 'node'}
{:else if newData.action_type === 'pool'}
{#if nodes.length > 0}
{#each nodes as n} {/each}
{/if}
{/if}

Проверка regex

{#each [ { label: 'Caller ID', val: testCallerId, bind: (v: string) => testCallerId = v, pattern: newData.match_caller_id }, { label: 'Destination', val: testDest, bind: (v: string) => testDest = v, pattern: newData.match_destination }, { label: 'Ingress Trunk', val: testIngress, bind: (v: string) => testIngress = v, pattern: newData.match_ingress_trunk }, ] as item}
item.bind(e.currentTarget.value)} /> {#if item.val && item.pattern} {matches(item.val, item.pattern) ? '✓ match' : '✗ no match'} {/if}
{/each}
{/if} {#if loading}

Загрузка...

{:else if rules.length === 0}

Нет правил маршрутизации. Звонки идут через стандартный скоринг.

{:else}
{#each rules as r, idx (r.id)} {#if editing === r.id} {:else} {/if} {/each}
# Название Условия Действие Время Hits Вкл Действия
{r.priority}
{#if editData.action_type === 'node'} {:else if editData.action_type === 'pool'} {/if}
{r.hits ?? 0}
{r.priority}
{r.name} {matchSummary(r)} {actionLabel(r.action_type)} {#if r.action_type === 'node' && r.action_node_id} {r.action_node_id} {:else if r.action_type === 'pool' && r.action_pool_ids?.length} {r.action_pool_ids.length} нод {/if} {timeDisplay(r)} {r.hits ?? 0}
{/if}