Tamkovich.com: Телеком/VoIP блог
Современные технологии: Asterisk, SIP, Kamailio, Linux, Cisco, Linksys
Zoiper не отправляет факсы через Asterisk 1.6.2
14 мая, 2010 by Сергей Тамкович
Asterisk SIP, t38, ZoiperВ связи с тем, что поддержка Asterisk 1.6.0 и Asterisk 1.6.1 закончилась 1го мая, внимательно присматриваюсь к Asterisk 1.6.2. В нём есть множество интересных решений, например неблокирующие вызовы sip_rtp_read(), ast_rtp_read(), новый механизм конференций app_confbridge и много другое. Но вот отправить факсы с помощью Zoiper (вплоть до версии 2.27) вы не сможете. При попытке отправить факс с помощью Zoiper, вы увидите следующее:
[May 14 14:16:15] WARNING[31798]: chan_sip.c:8749 process_sdp_c: Unable to lookup RTP Audio host in c= line, 'IN IP4 8000' [May 14 14:16:15] WARNING[31798]: chan_sip.c:8397 process_sdp: Insufficient information in SDP (c=)...
Дело в том, что Zoiper нарушает RFC4566 — SDP: Session Description Protocol. Согласно этому документу, параметр SDP ‘c=’ должен быть использован для указания адреса соединения:
5.7. Connection Data ("c=") c=<nettype> <addrtype> <connection-address> The "c=" field contains connection data. A session description MUST contain either at least one "c=" field in each media description or a single "c=" field at the session level. It MAY contain a single session-level "c=" field and additional "c=" field(s) per media description, in which case the per-media values override the session-level settings for the respective media. The first sub-field ("<nettype>") is the network type, which is a text string giving the type of network. Initially, "IN" is defined to have the meaning "Internet", but other values MAY be registered in the future (see Section 8). The second sub-field ("<addrtype>") is the address type. This allows SDP to be used for sessions that are not IP based. This memo only defines IP4 and IP6, but other values MAY be registered in the future (see Section 8). The third sub-field ("<connection-address>") is the connection address. OPTIONAL sub-fields MAY be added after the connection address depending on the value of the <addrtype> field. ...
В действительности же Zoiper пытается в поле ‘c=’ указать порт, не смотря на то, что он уже указан в поле ‘m=’:
s=Zoiper_session c=IN IP4 8000 t=0 0 m=image 8000 udptl t38
а вот Linksys SPA2102 (прошивка 5.1.12) заполняет все поля корректно:
s=- c=IN IP4 10.10.10.201 t=0 0 m=image 16474 udptl t38
Zoiper заполняет неверно поле ‘c=’ только для сообщения re-INVITE, которое должно запустить t38 сессию. Сообщение INVITE, инициирующее голосовое соединение, составляется корректно:
s=Zoiper_session c=IN IP4 10.10.10.202 t=0 0 m=audio 8000 RTP/AVP 8 3 101
Самое интересное заключается в том, что Asterisk 1.6.0 отлично передавал факсы отправленные с помощью Zoiper, не смотря на нарушение RFC. Вероятно Asterisk стал чувствительным к ошибке, после внедрения нового алгоритма обработки SDP Asterisk 1.6.2 revision 227760.
Asterisk SIP, t38, Zoiper
Самая последняя версия Zoiper — 2.28 build 6751 корректно заполняет заголовок ‘c=’ и, соответственно нормально отсылает факсы.