Session Initiation Protocol (SIP) - один из наиболее важных и самых распространенных сигнальных протоколов. SIP поддерживает наибольшее количество вендоров. SIP продолжает распространяться и уже сейчас является идеальным протоколом для подключения различных систем VoIP.
В первой части SIP и Call Manager. Часть 1 Теория мы рассмотрели краткую теорию. В данной статье мы обсудим вопросы настройки SIP на IOS gateways.
Настройка SIP состоит из двух частей:
sip-ua
authentication username mir_user password psswr
registrar 10.10.1.15
sip-server 10.10.1.15
Команда registrar позволяет шлюзу регистрировать внутренние номера на внешнем сервере Registrar server. Благодаря этому система сможет принимать входящие звонки. Адрес можно вбить вручную или получить по DHCP (опция registrar-index).
Имя и пароль будут использоваться для доступа к Registrar server а также к Proxy server.
dial-peer voice 2001 voip
destination-pattern 2...
session protocol sipv2
session target sip-server
!
dial-peer voice 2002 voip
destination-pattern 9T
session target ipv4:192.168.10.100
session protocol sipv2
session protocol sipv2 Команда дает инструкцию в данном Dial-peer использовать протокол SIPv2.
Команда session target настраивает шлюз использовать определенный IP - адрес нужного SIP сервера, причем:
session target sip-server будет использовать настройки указанные в разделе sip-ua. Это позволяет не заморачиваться каждый раз на IP-адресе.
session target ipv4:192.168.10.100 - Здесь, как видно, IP адрес вбит "в лоб".

voice service voip |
voice service voip |
Здесь отметим команду disable-early-media.
Early Media - стандарт, позволяющий передавать media еще до инициализации стандартного RTP, что может улучшать качество, но не всему устройствами поддерживается.
UA или User Agent - это по сути SIP-клиент.
Ниже приводится пример конфигурации подключения шлюза к SIP - провайдеру. Для исходящих звонков.
voice service voip
sip
bind all source-interface loopback0 ipv4-address 10.1.1.1
!
sip-ua
authentication username JDoe password secret
registrar 10.1.1.15 expires 3600
sip-server 10.1.1.15
timers connect 1000
timers register 300
!
dial-peer voice 10 voip
destination-pattern 9T
session target ipv4:192.168.1.100
session protocol sipv2
session transport tсp
show sip-ua service
show sip-ua status
show sip-ua register status
show sip-ua timers
show sip-ua connections
show sip-ua calls
show sip-ua statistics
¦ debug ccsip: This command has various options, as follows:
¦ debug ccsip all: This command enables all ccsip-type debugging. This debug
command is very active; you should use it sparingly in a live network.
¦ debug ccsip calls: This command displays all SIP call details as they are updated
in the SIP call control block. You can use this debug command to monitor call
records for suspicious clearing causes.
¦ debug ccsip errors: This command traces all errors that are encountered by the
SIP subsystem.
¦ debug ccsip events: This command traces events, such as call setups, connec-
tions, and disconnections. An events version of a debug command is often the
best place to start because detailed debugs provide much useful information.
¦ debug ccsip info: This command enables tracing of general SIP security parame-
ter index (SPI) information, including verification that call redirection is disabled.
¦ debug ccsip media: This command enables tracing of SIP media streams.
¦ debug ccsip messages: This command shows the headers of SIP messages that
are exchanged between a client and a server.
¦ debug ccsip preauth: This command enables diagnostic reporting of authentica-
tion, authorization, and accounting (AAA) for SIP calls.
¦ debug ccsip states: This command displays the SIP states and state changes for
sessions within the SIP subsystem.
¦ debug ccsip transport: This command enables tracing of the SIP transport han-
dler and the TCP or UDP process.
¦ debug voip ccapi inout: This command shows every interaction with the call control
application programming interface (API) on both the telephone interface and on the
VoIP side. By monitoring the output, you can follow the progress of a call from the
inbound interface or VoIP peer to the outbound side of the call. This debug com-
mand is very active; you should use it sparingly in a live network.
¦ debug voip ccapi protoheaders: This command displays messages that are sent be-
tween the originating and terminating gateways. If no headers are being received by
the terminating gateway, verify that the he