RE: регистрация PSTN шлюза linksys SPA-3102 в CGP

От: Эдуард Ковалев <CGatePro_at_mx_ru>
Дата: Tue 14 Jul 2009 - 02:08:31 MSD


> -----Original Message-----
> From: CommuniGate Pro Russian Discussions [mailto:CGatePro@mx.ru]
> Sent: Monday, July 13, 2009 5:13 PM
> To: CommuniGate Pro Russian Discussions
> Subject: Re: [CGP] регистрация PSTN шлюза linksys SPA-3102 в CGP
>
> Здравствуйте,
>
> Эдуард Ковалев wrote:
> > Добрый день!
> >
> > Есть железка Linksys SPA-3102 в удаленном офисе. Имеет белый IP, но
> он динамический.
>
> А регистрацию в DNS сервере каком-нибудь для этого динамического IP она
> имеет?

Если имеется ввиду DynDNS, то железка этого не умеет...

>
> > В железке есть порт FXO, для подключения имеется два режима:
> > 1. когда CGP регистрируется в ней. Использовали SIP -> Gateways или
> PSTN настройки аккаунтов для подключения
>
> Регистрация сервер на железке нужна лишь для возможности отдать
> входящий
> из PSTN звонок серверу (CGPro)

. Но можно обойтись и без регистрации,
> если в настройках PSTN Line этой железки прописать в dial plan
> приблизительно такое:
>
> (S0< :office@10.1.0.1:5060 >)
>
> (пробелы после и перед угловыми скобками существенны).
> По этому плану железка будет передавать входящие из PSTN звонки на SIP
> URI sip:office@10.1.0.1:5060

Да, именно таким образом приходят входящие с железки

>
> > Но в текущей задаче это сделать не удастся так как IP динамический
> > 2. есть еще режим, когда железка сама подключается к серверу и это
> подключение используется для исходящих звонков.
> > Насколько я понимаю к CGP подключаться можно только к экстеншенам,
> однако их нельзя использовать для исходящих звонков (поправьте если не
> прав)
>
> Если железка будет регистрироваться в аккаунт сервера, то все запросы к
> железке в Request URI будут по необходимости иметь имя аккаунта, куда
> эта железка зарегистрирована.

Мы в свое время тестировали 3CX Phone System, железку подключали по этой инструкции: http://www.3cx.com/voip-gateways/linksys-3102.html так вот в 3CX pstn линия имеет вид экстеншена и необходимо чтобы железка портом FXO регистрировалась на сервере, и тот использует данную регистрацию для исходящих звонков правда логи подключения и звонка мы не смотрели...

 Сможет ли она извлечь PSTN номер из,
> скажем, заголовка Тo: - сильно сомнительно.

Согласен

>
> Можно, конечно, соорудить схему, когда текущий адрес железки будет
> извлекаться из данных ее регистрации и уже потом использоваться как
> адрес нормального PSTN шлюза. Только все это громоздко и некрасиво.
У железки есть еще один порт FXS (аналоговый телефон) и соответственно он подключается к экстеншену. Т.е. в принципе IP железки видно в подключенных (Status - Registered Devices) Можно ли это использовать для построения менее громоздкой схемы?

Вообще железка умеет следующее:

Overview
The SPA3102 has the following ports:
*FXS port (Phone)-Connected to a standard analog telephone or fax machine, configured using the Line tab *FXO port (Line)-.Connected to a standard telephone wall jack for connectivity to the PSTN, configured using the PSTN Line tab The FXO port lets the SPA3102 act as a SIP-PSTN gateway, which bridges PSTN and VoIP service. Line 1 does not provide a gateway because it provides only VoIP service. The VoIP-To-PSTN calling function is referred to as a PSTN gateway, and PSTN-To-VoIP calling function as a VoIP gateway. Note the following definitions:

*VoIP caller-One who calls the SPA3102 via VoIP to obtain PSTN service 
*VoIP user-VoIP caller that has a user account (user-id and password) on the SPA3102 
*PSTN caller-One who calls the SPA3102 from the PSTN to obtain VoIP service
Line 1 can be configured with a regular VoIP account and can be used in the same way as the Line 1 of any Linksys ATA. A second VoIP account can be configured in the SPA3102 to support PSTN gateway calls exclusively. A different SIP port should be assigned to Line 1 and the PSTN Line. The same VoIP account may be used for both Line 1 and the PSTN Line if a different SIP port is assigned to each. VoIP callers can be authenticated by one of the following methods:
*No Authentication-All callers are accepted for service 
*PIN-Caller is prompted to enter a PIN right after the call is answered 
*HTTP digest-SIP INVITE must contain a valid authorization header
PSTN callers can be authenticated by one of the following methods: *No authentication-All callers are accepted for service *PIN-Caller is prompted to enter a PIN right after the call is answered

How VoIP-To-PSTN Calls Work
To obtain PSTN services through the SPA3102, the VoIP caller establishes a connection with the PSTN Line by way of a standard SIP INVITE request addressed to the PSTN Line. The PSTN Line can be configured to support one-stage and two-stage dialing as described in the following sections.

One-Stage Dialing
The Request-URI of the INVITE to the PSTN Line should have the form <Dialed-Number>@<SPA-Address>, where <Dialed-Number> is the number dialed by the VoIP caller, and <SPA-Address> is a valid address of the SPA3102, such as 10.0.0.100:5061. If the FXO port is currently in use (off-hook) or the PSTN line is being used by another extension, the SPA3102 replies to the INVITE with a 503 response. Otherwise, it compares the <Dialed-Number> with the <User ID> of the PSTN Line. If they are the same, the SPA3102 interprets this as a request for two-stage dialing (see the "Two-Stage Dialing" section on page 4-3). If they are different, the SPA3102 processes the <Dialed-Number> using the corresponding <Dial Plan>. If dial plan processing fails, the SPA3102 replies with a 403 response. Otherwise, it replies with a 200 and at the same time takes the FXO port off hook and dials the target number returned after processing the dial plan.



Note: If <User ID> on the PSTN Line is blank, <Registration> should be disabled for the PSTN Line.
---
If HTTP Digest Authentication is enabled, the SPA3102 challenges the INVITE with a 401 response if it does not have a valid Authorization header. The Authorization header should include a <User ID n> parameter, where n refers to one of eight VoIP user accounts that can be configured on the SPA3102. The credentials are computed based on the corresponding password using Message Digest 5 (MD5). The <User ID n> must match one of the VoIP accounts stored on the SPA3102. Each VoIP user account contains the information listed in Table 4-1.

Two-Stage Dialing
In two-stage dialing, the SPA3102 takes the FXO port off-hook but does not automatically dial any digits after accepting the call. To invoke two-stage dialing, the VoIP caller should INVITE the PSTN Line without the user-id in the Request-URI or with a user-id that matches exactly the <User ID n> of the PSTN Line. A different user-id in the Request-URI is treated as a request for one-stage dialing if one-stage dialing is enabled, or dropped by the SPA3102 (as if no user-id is given) if one-stage dialing is disabled.
---
Note: If Authentication is disabled, a default dial plan is assigned to all VoIP callers.
---
HTTP Digest Authentication can be also used for two-stage dialing, as in one-stage dialing. If using HTTP Digest Authentication or Authentication is disabled, the VoIP caller should hear the PSTN dial tone right after the call is answered (by a SIP 200 response).
If PIN Authentication is enabled, the VoIP caller is prompted to enter a PIN number after the SPA3102 answers the call. The PIN number must end with a # key. The inter-PIN-digit timeout is 10 seconds (not configurable). Up to eight VoIP caller PIN numbers can be configured on the SPA3102. A dial plan can be selected for each PIN number. If the caller enters a wrong PIN or the SPA3102 times out waiting for more PIN digits, the SPA3102 tears down the call immediately with a BYE request.
---
Note: When the source address of the INVITE is 127.0.0.1, authentication is automatically disabled because this is a call by the local user. This applies to both one-stage and two-stage dialing.
---

>
> Лучше бы иметь способ обращаться к железке без всяких регистраций, хотя
> бы по имени в DNS, которое железкой будет проставляться. Хотя, я не
> уверен, что SPA-3102 умеет регистрироваться в DNS.
Скорее всего не умеет...
>
> > Возможно ли каким-то образом зарегистрировать (подключить) PSTN порт
> железки в CGP и использовать его для исходящих звонков
> >
> > -----------------------------
> > С Уважением,
> > Эдуард Ковалев
>
>
> --
> Best regards,
> Dmitry Akindinov
Получено Mon Jul 13 23:07:57 2009

Этот архив был сгенерирован hypermail 2.1.8 : Fri 24 Apr 2015 - 16:16:34 MSK