sip ping что это такое
SIP Ping
A Utility for Pinpoint VoIP Diagnostics
Purpose
SIP Ping is a tool for monitoring a SIP gateway (PBX, SBC, phone) for deep dive diagnostics. Most tools for VoIP monitoring are based on meeting SLA figures and providing general «network availability» statistics. SIP Ping is for granular troubleshooting.
Say you work in the NOC of a cloud-hosted VoIP provider. A high-profile customer states that every day their entire VoIP network goes down for ten to fifteen minutes. The packet captures from your session border controller confirm the gaps in registration, but ping tests show no loss throughout the day.
You could be looking at an overloaded or flaky SIP gateway at the customer site, a problem with a network element in your core network or trouble with a firewall at the customer site, among other things.
Disclaimers & Caveats
I’m not a professional software developer. I created this tool to assist in my job as a VoIP tech, and as far as I can tell it works for me. I cannot make any assurances about the accuracy and reliability of this tool.
If you need a serious, enterprise-grade tool, you’re free to download and modify SIP Ping.
Every packet that SIP Ping sends originates from a new source port. I don’t know what will happen if you set the interval very low. Depending on your OS and how it handles ephemeral UDP ports, you could end up depleting your port pool.
Needs & Can’ts
SIP Ping needs a working Python 2.x environment. It should work on anything that can provide that.
SIP Ping is UDP-only, it can’t do TCP or TLS.
Download
Usage
Here’s all the options, but I’ll talk down below in human words.
Installation
Download sipping.py. Now you’re installed. For this doc, we’ll just assume you have it in /home/fred
The simplest way to use this is: python sipping.py 192.168.1.10
This will start sending OPTIONS packets once every second to 192.168.1.10. It will wait up to a second for each response. Every five packets loss statistics will be printed to the screen, and the stats on those five pings will be written to /home/fred/sipping-logs/192.168.1.10.csv.
The output looks like this:
In the above, five packets were transmitted, two were received back, and three were lost. The two that responded came back with 403 and latencies of about 38 milliseconds.
Options
Using Logfiles
SIP Ping outputs logfiles in CSV format. If you are a programmer you can probably use this with little difficulty.
If you aren’t a programmer, the easiest way to use the data is to load it into Microsoft Excel, which natively understands CSV. OpenOffice likely does as well, though I haven’t tested it.
The CSV files are human-readable if you know what to ignore. An example file looks like:
Each line represents a single ping attempt. Here are the fields, and how you would read the first line above:
Time | 15/05/15 08:18:48:383775 |
UNIX timestamp | 1431703129.39 |
Host that responded (for drops, the host that was pinged) | 192.168.10.10 |
Latency | 3 milliseconds |
SIP response code | 200 OK |
Using Call IDs
SIP Ping uses a unique call ID for every OPTIONS packet. The purpose is to allow you to follow a single packet for its entire lifetime.
Say you have a log that says that a packet transmitted to a PBX was dropped at 11:17 PM. Three things could have happened:
If you left a packet capture running on the PBX then you can find out which of the three it was. Examine the CSV log from SIP Ping and locate the drop:
The Call-ID is 1257707506. Now pull up the packet capture from the PBX.
You have now identified an instance of one-way signaling failure; the packet came in, the PBX tried to respond, but the response didn’t arrive. You now have a much more specific definition of the problem.
Bugs / Known Issues
If you find anything else, email me at articles@gekk.info and I’d be happy to look into it. I do not have a QA team, so there could be lots of bugs I don’t know about.
Future Development
There are a lot of things I could do with this, but one of the big changes I intend to implement is register-based testing, where the tool runs at the «client» end and registers repeatedly against a server.
There are at least two other SIP diagnostic tools that can send ping-esque messages that I can think of, but the problem is that, like all network diagnostic tools, they’re only designed to answer the question, «is anything wrong right now?»
In the real world, problems can often be intermittent, and their unpredictability certainly makes them no less serious. Hours or days might elapse between service outages, but when they occur they’re showstoppers.
I found that there was no tool available in this industry that could prove the integrity of the connection between two SIP devices, in full duplex, at high speed.
I also found that a lot of techs in my field of work were using ping to do long-term monitoring, and ping just doesn’t cut it for a wide variety of reasons, not the least being that ICMP is deprioritized on many routers and servers. Purpose-built tools decrease false positives.
Additionally, while ping gives packet loss stats over time, it doesn’t allow you to look back and say «two weeks ago at 11:31:43 voice traffic stopped passing for three minutes,» and in this job, you sometimes need data with that level of precision.
SIP-Ping Utility Program for Windows
VOIP (Voice Over IP) systems use the SIP protocol. That protocol contains an OPTIONS command that is useful for pinging the VOIP system to make sure it is up and running. The SIP-Ping utility software is a simple command line application that can be used to run this ping command. This was inspired by Gravis’ SIP_Ping Python program.
SIP-Ping has no dependencies and should run on any Windows system. It can give visual output, or run in a mode that makes it a compatible plugin with PA Server Monitor’s Plugin Monitor, or perhaps even as a Nagios plugin.
Download SIP-Ping.exe (Note, the executable is digitally signed by Power Admin LLC)
License
Anyone can download and use SIP-Ping. You can include it in your open source, freeware and even commercial applications. You may distribute it on your website, on CDs, mail to friends, etc. See the License for all the legalese.
Examples
Example running in Plugin mode (default) which returns OK/Alert and two statistics.
Example running in Verbose mode, and using TCP instead of the default UDP, showing what is sent and received.
Usage
“ I must compliment you on your excellent customer service and technical support. Keep up the good work and I’ll remain a customer for a long time! ”
Adam M., Cornell University, USA ionicons-v5-b
—>
5 популярных проблем SIP-телефонии и способы их решения
Аналоговая связь уходит в прошлое, и большинство компаний выбирают SIP-телефонию. Это возможность быстро обеспечить офис связью и звонить в любой конец света. Но при некорректных настройках пользователи сталкиваются и с минусами. Эхо, задержка звука, низкое качество связи — мы составили гайд по самым частым проблемам цифровой телефонии и даем пошаговую инструкцию по их исправлению.
А э та статья предназначена для всех, кто пользуется SIP-аккаунтами, программами или сервисами для связи. Решения, которые мы предлагаем, основаны на нашем собственном опыте. В каждом разделе «Что делать» описано пошаговое решение проблемы. Сначала выполните пункт, который описан первым. Если не помогло — переходите ко второму. Если же и это не сработало, то обратитесь к системному администратору или другому профильному специалисту.
Если же не хотите столкнуться с подобными проблемами — используйте Виртуальную АТС 2.0 от Ringostat. Это телефон прямо в браузере и аналитический ассистент менеджера по продажам. Подробней его возможности описаны в статье «Виртуальная АТС Ringostat: омниканальное решение для отделов продаж».
1. Задержка звука
Чаще всего происходит по двум причинам — из-за проблем с сетью или задержки при обработке данных. Рассмотрим их особенности.
Сетевая
Возникает в таких случаях:
В первом случае мощности wi-fi не хватает, чтобы обеспечить бесперебойную передачу данных. На втором остановимся немного подробней.
Представим, что в офисе один сотрудник что-то скачивает, а другой разговаривает по телефону. Канал, по которому передаются данные, целиком «забит» качающейся информацией, и для пакетов SIP-телефонии места не остается. Для нее не нужен большой канал, но он должен быть отдельно выделен под связь.
Сложность в том, что эту проблему непросто диагностировать — ведь сайты при загруженности маршрутизатора или плохом качестве wi-fi подключения все равно будут загружаться быстро. Но телефония при этом будет страдать, т. к. она использует потоковую загрузку, и звук должен транслироваться непрерывно. А, например, при серфинге страниц данные могут загружаться «рывками», что недопустимо в случае с телефонией.
Задержка обработки
Когда вы разговариваете с собеседником с помощью SIP-телефонии, ваш голос сначала кодируется и после передачи по сети раскодируется «на выходе». Обычно это происходит почти мгновенно и незаметно для разговаривающих. Но если звонить на компьютере, процессор которого загружен, то появляется такая проблема — ведь устройство не успевает вовремя обрабатывать задачи.
Что делать
Преимущества Виртуальной АТС Ringostat
2. Односторонняя слышимость
Если собеседник вас не слышит или вы его, то проблема связана с настройками вашей сети. Причина может быть в NAT — технологии трансляции сетевых адресов, которая используется большинством провайдеров и в домашних или офисных сетях. Она предназначена решать проблему нехватки IP-адресов и обеспечивать безопасность локальных сетей, подключенных к интернету.
Например, у компании есть несколько реальных IP-адресов, но гораздо больше компьютеров с локальными адресами, которым нужен выход в сеть. NAT подменяет локальный адрес на наружный общедоступный адрес. На скрине ниже показан пример подмены адресов для нескольких компьютеров.
Но при этом может возникнуть проблема с передачей голосовых данных. Например, Абонент 1 звонит Абоненту 2 с локального адреса, используя NAT. Абонент 2 отвечает, но не может отправить голосовые данные по назначению. Это происходит из-за того, указанный адрес Абонента 1 не маршрутизируется в интернете. В результате возникает односторонняя слышимость или звук вообще отсутствует.
Что делать
3. Эхо и низкое качество звука при разговоре
Иногда случается, что человек при разговоре слышит сам себя или собеседник слышит его плохо. Либо наоборот — слишком громкие звуки окружения. Причин этому может быть несколько:
Что делать
4. Не поступают звонки, потому что аккаунт в офлайне
Случается, что при использовании SIP-телефонии на устройство перестают поступать входящие звонки. Это может быть временной ситуацией, и потом можно дозвониться вновь. При этом у вас на устройстве, скорей всего, будет писаться, что аккаунт в сети — но сервер считает, что он в офлайне. Причина этого кроется в настройках сети.
Многие провайдеры SIP-телефонии постоянно «пингуют», т. е. отправляют пакеты раз в какое-то время. Это нужно, чтобы проверить, находится ли устройство в сети, и знать его актуальный статус. Даже если устройство проходит регистрацию на один час, провайдер все равно в это время будет отправлять пакеты для проверки на случай внезапного отключения устройства.
Еще одна причина — маршрутизатор спустя какое-то время закрывает у себя порт, и SIP-сервер не может проверить статус. Это продиктовано требованиями безопасности некоторых устройств.
Что делать
5. Пропадает звук
Эта проблема очень похожа по своим предпосылкам на пункт 1 — задержка звука. Причина может быть в интернете или в вашем устройстве: SIP-телефоне, компьютере.
IOS SIP-Options Ping
The Out-of-dialog (OOD) Options Ping feature provides a keepalive mechanism at the SIP level between any number of destinations. A generic heartbeat mechanism allows Cisco Unified Border Element to monitor the status of SIP servers or endpoints and provide the option of busying-out a dial-peer upon total heartbeat failure. When a monitored endpoint heartbeat fails, the dial-peer is busied out.
I have this configuration in my Router
dial-peer voice 5002 voip
description DIAL-PEER DE SALIDA HACIA SONUS
destination-pattern 00.T
session protocol sipv2
session target ipv4:172.25.1.233
session transport udp
voice-class sip early-offer forced
voice-class sip options-keepalive up-interval 20 down-interval 40 retry 6
voice-class sip bind control source-interface Loopback0
voice-class sip bind media source-interface Loopback0
dtmf-relay rtp-nte
codec g711alaw
no vad
!
I have this version
C2900 Software (C2900-UNIVERSALK9-M), Version 15.4(3)M1
As you can see in this figure
The Router send a SIP-Option every 20 seconds (up-interval = 20).
This is a operational behavior.
What happen, when the remote peer is unreacheable.
After the packets No. 257 and 258, I apply an ACL to block the communications between 177.1.254.1 and 172.25.1.233.
As you can see, the interval between the packets No. 257 and 759 are 20 seconds (up interval), but after this we have 6 attempts (retry =6) to reach the IP 172.25.1.233.
When the router attempt six times (retry =6 )and we don’t have response. On the router we have the following:
R_ISOL_HQ_7.06_36#
Jun 19 20:30:08.820: %SIP-5-DIALPEER_STATUS: VoIP dial-Peer is Busied out
R_ISOL_HQ_7.06_36#
R_ISOL_HQ_7.06_36#sh dial-peer voice sum
dial-peer hunt 0
AD PRE PASS OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT KEEPALIVE
5001 voip up up 0 syst
5002 voip up up 00.T 0 syst ipv4:172.25.1.233 busyout
5003 voip up up 00.T 0 syst ipv4:172.25.101.233 active
6001 voip up up 6. 0 syst ipv4:177.56.25.10
6002 voip up up 0 syst ipv4:172.25.1.233
R_ISOL_HQ_7.06_36#
As you can see the dial-peer is busyout.
Meanwhile the peer is not reachable, we have the next
The Router send a SIP-Option every 40 seconds (down-interval = 40).
What happen, when the remote peer is back reachable.
After the packet No. 934, I remove the ACL that block the communications between 177.1.254.1 and 172.25.1.233.
As you can see, the interval between the packets No. 24539 and 25779 are aprox. 40 seconds (down interval), but after this we have 6 attempts (retry 6) (25848 to 26939) to reach the IP 172.25.1.233, and all of this attempts have a response.
After the packet 26939, on the router we have the following:
R_ISOL_HQ_7.06_36#
Jun 19 20:45:55.388: %SIP-5-DIALPEER_STATUS: VoIP dial-Peer is Up
R_ISOL_HQ_7.06_36#
R_ISOL_HQ_7.06_36#sh dial-peer voice sum
dial-peer hunt 0
AD PRE PASS OUT
TAG TYPE MIN OPER PREFIX DEST-PATTERN FER THRU SESS-TARGET STAT PORT KEEPALIVE
5001 voip up up 0 syst
5002 voip up up 00.T 0 syst ipv4:172.25.1.233 active
5003 voip up up 00.T 0 syst ipv4:172.25.101.233 active
6001 voip up up 6. 0 syst ipv4:177.56.25.10
6002 voip up up 0 syst ipv4:172.25.1.233
R_ISOL_HQ_7.06_36#
As you can see the dial-peer is active.
I’d like just to add that the router waits 500ms for a response. So even though the response comes, but if it’s late, the dial-peer is busied-out. This timer can be modified by:
timers options xxx
Thanks Oswaldo for your post.
I have a question about dial-peer and option ping or maybe I will try understand some mechanics.
The setting is a little bit different then yours:
What happened when we have only one dial-peer with following router setup (the other configuration should be similar to your configuration):
.
voice class server-group 1
ipv4 192.168.0.2 preference 1
ipv4 192.168.0.3 preference 2
ipv4 172.16.0.2 preference 3
…
dial-peer voice 5002 voip
session server-group 1
voice-class sip options-keepalive up-interval 20 down-interval 40 retry 6
…
So dial-peer 5002 voip is like I said the only dial-peer for voip traffic. Did the OOD options ping also working? Did the router notice that preference 1 (192.168.0.2) for example is not available and try directly to contact preference 2? Or would it not working, because he had multiple options for that dial-peer and would never “shut down” one of the participants?
Best regards
Benjamin
In the documentation i can see below behavior for DNS with Multiple Addresses.
If a SIP server is configured as a DNS hostname, OOD Options pings are sent to all the returned addresses until a response is received.
But the Pre-requistes for OOD to work is specified as below
The following are required for OOD Options ping to function. If any are missing, the Out-of-dialog (OOD) Options ping will not be sent and the dial peer is reset to the default active state.
–Dial-peer should be in active state
–Session protocol must be configured for SIP
Still Need to confirm the same via field test on Voice Router!!
I think your correct, that the old keep alive function for a single dial-peer is not supported and working, but a new function with server-group and keepalive group will support my issue or question.
Destination Server Group (From 15.4(1)T onwards)
. The destinations of a server-group are then used for outgoing call setup when a SIP dial-peer with server-group is selected as an outbound dial-peer.
New OOD Options Ping Keepalive Group supports a SIP dial-peer with a server group as a session target. Separate Options Ping Keepalive connections are established on each remote target of a server group. A dial-peer is put to BUSYOUT state if all Option Ping keepalive connections of a server group are timeout.
Server group is not supported by OOD Options Keepalive (with separate OOD Options Keepalive connection on per dial-peer) method.
Простыми словами: Что такое SIP-телефония
О SIP слышал практически каждый. Но не все понимают, что это такое и чем SIP-телефония отличается от обычной связи по телефону. Мы продолжаем цикл ознакомительных статей об аналитике и виртуальной АТС. И сегодняшняя тема нашей статьи — SIP-телефония простыми словами .
Время чтения 8 минут
Вы можете перейти сразу к интересующему разделу:
Чем отличается SIP-телефония от IP и VoIP
Если вы хоть раз читали про виртуальную АТС, то наверняка сталкивались с этими терминами. Поэтому для начала разберемся — в чем же разница между SIP, IP-телефонией и VoIP. Это поможет вам не запутаться в терминологии и сразу понять, как все устроено.
Начнем с самого обширного понятия — IP связь (Internet Protocol — «межсетевой протокол»). Можно сказать, что это «начало всех начал», так как именно протокол IP связал все компьютерные сети мира в глобальную сеть интернет. Именно поэтому у каждого компьютера есть свой уникальный IP-адрес, который нужен для обмена данными.
Для передачи аудиоданных по сети есть своя технология — она называется VoIP связь (Voice over IP — «голос по интернет-протоколу IP»). Благодаря ей мы можем обмениваться любыми данными, где присутствует голос — звонить через интернет, транслировать вебинары или смотреть видео с камер видеонаблюдения со звуком.
IP-телефония — общее название для телефонной связи через интернет. Это составляющая часть VoIP, но сюда относятся только звонки и видеообщение по сети и ничего больше. Как понятно из названия, связь происходит благодаря тому же самому протоколу IP.
Еще более узкое понятие SIP-телефония. Если IP-телефония — это название технологии в целом, то SIP — лишь одна из ее разновидностей, протокол связи. Если проводить сравнение, то они так же относятся друг к другу, как ноутбук и ASUS.
О SIP мы поговорим ниже, а пока подытожим:
Что такое SIP-телефония
SIP (Session Initiation Protocol) — протокол передачи данных. Его можно сравнить с языком, который помогает устройствам понять друг друга и обмениваться данными без ошибок. Он используется для множества целей — для IP-телефонии, видео и аудиоконференций и даже онлайн-игр. Говоря упрощенно, он работает по схеме «клиент-сервер», постоянно чередуя запросы и ответы.
Есть и другие протоколы для IP-телефонии. Но в наше время SIP — это универсальный стандарт для обмена данными по сети. Специалисты считают его самым перспективным, и он чаще всего используется. SIP-телефония доступна там, где есть интернет со скоростью не менее 64 Кбит в секунду. То есть практически повсюду.
Преимущества Виртуальной АТС Ringostat
Как можно звонить и принимать звонки с помощью SIP
Принимать и совершать звонки можно и с помощью Ringostat Smart Phone — для этого достаточно зарегистрироваться зарегистрируйтесь в нашем сервисе. Это телефон прямо в браузере и аналитический помощник менеджера по продажам. Читайте об этом в статье «Виртуальная АТС Ringostat 2.0: ассистент sales-менеджера и телефон в браузере».
Как работает SIP-телефония
Рассмотрим пример, когда человек звонит с компьютера, на котором установлен SIP-клиент, в компанию, которая использует SIP-телефонию:
Ниже упрощенная схема, которая иллюстрирует работу SIP-телефонии при таком входящем звонке:
Схема звонка в sip-телефонии
Преимущества SIP-телефонии
Часто задаваемые вопросы
Что нужно для SIP-телефонии?
Интернет-соединение, компьютер или ноутбук, наушники с гарнитурой и программа для совершения и приема звонков. Также компания может приобрести у оператора телефонный номер в SIP-формате и разместить его у себя на сайте.
Как настроить SIP телефонию?
Если вы подключаете виртуальную АТС, то ее базовой настройкой обычно занимается компания, которая предоставляет этот инструмент. Если вы принимаете звонки с помощью специального софта, то настроить его можно по инструкциям, которые обычно есть на сайтах подобных компаний.
Как выбрать SIP телефонию?
В первую очередь обращайте внимание на надежность связи. Узнайте, предоставляет ли сервис номера нужного вам региона или оператора, можно ли гибко настроить телефонию под ваши потребности.
Выводы
SIP-телефония — отличное решение для стартующего бизнеса и компаний, которые практично подходят к организации бизнес-процессов. Это не только возможность сэкономить, но и повысить уровень обслуживания клиентов, а также построить полноценную аналитику для компании. Именно поэтому SIP-телефония приобретает все большую популярность.