Jump to content
Калькуляторы

Нужна помощь в настройке Yate 4.3 Внутренним номерам предоставлять внешнюю линию для исходящих

В accfile.conf создано 5 линий SIP провайдера.

 

В regfile.conf созданы пользователи вида:

[100]
password=pass100
[101]
password=pass101
[102]
password=pass102

 

В regexroute.conf на данный момент следующие правила:

; Прямые звонки (без префикса) на городские [работает странно, звонки идут с line5]
^......$=fork sip/sip:\0;line=line1;caller;callername | sip/sip:\0;line=line2;caller;callername | sip/sip:\0;line=line3;caller;callername | sip/sip:\0;line=line4;caller;callername | sip/sip:\0;line=line5;caller;callername ;stoperror=busy

; Звонки на сотовые через SIP-провайдера:
^89.........$=sip/sip:\1;line=SIP-PROV;caller;callername
; Звонки на внутренние трёхзначные номера:
^...$=return

; Звонки во вне через префиксы [работает]
^01\(.*\)$=sip/sip:\1;line=line1;caller;callername
^02\(.*\)$=sip/sip:\1;line=line2;caller;callername
^03\(.*\)$=sip/sip:\1;line=line3;caller;callername
^04\(.*\)$=sip/sip:\1;line=line4;caller;callername
^05\(.*\)$=sip/sip:\1;line=line5;caller;callername

; Внешние звонки направляем на внутренние номера
^line1$=route/100
^line2$=route/102
^line3$=fork sip/sip:100@127.0.0.1 sip/sip:101@127.0.0.1 ;stoperror=busy
^line4$=fork sip/sip:100@127.0.0.1 sip/sip:101@127.0.0.1 ;stoperror=busy
^line5$=fork sip/sip:100@127.0.0.1 |next=10000 sip/sip:101@127.0.0.1 ;stoperror=busy

 

Задача такая:

при звонках с внутреннего номера 100 звонить только с линии Line1

при звонках с внутреннего номера 101 звонить только с линии Line2

• при звонках с внутреннего номера 102 звонить по свободной линии Line3, Line4 или Line5

• при звонках с внутреннего номера если нет свободных линий - сделать режим ожидания, когда линия освободится - звонить

Edited by TheShadow

Share this post


Link to post
Share on other sites

Первые два пункта решились добавлением в regexroute.conf правила:

${caller}^100$=;line=line1;caller;callername
${caller}^101$=;line=line2;caller;callername

 

Теперь вопрос, как решить вопрос со звонками по любой свободной линией или сделать ожидание свободной линии?

Edited by TheShadow

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.