i’m using nagios to wake me up. not every day – only when there’s some outage. i have pair of nagios servers – one in Sweden, one in Poland – they cross-check one another and – for the most critical problems – send sms and make a phone call. for sms’es i’m using budgetsms.net, for the phone calls – some sip provider and command line tool sip-audio-session from the sip simple client sdk project. recently i got just sms but not a phone call. after a bit of digging it turned out that sip-audio-session no longer works.
running
sip-audio-session --auto-hangup 30 0046712112233@my.sip.provider
with config file ~/.sipclient/config:
Accounts: 46112211777@my.operator.com: enabled = true auth: password = somePasswordForMySipAccount SIPSimpleSettings: default_account = 46112211777@my.operator.com instance_id = "urn:uuid:11111111-2222-3333-4444-555555555555" audio: alert_device = input_device = output_device =
used to give me a 30 seconds long ‘missed call’ on my mobile – 0046712112233, but after the recent libxml2 upgrade gave me instead:
using set_wakeup_fd Traceback (most recent call last): File "/usr/bin/sip-audio-session", line 24, in <module> from sipsimple.account import Account, AccountManager, BonjourAccount File "/usr/lib/python2.7/dist-packages/sipsimple/account/__init__.py", line 29, in <module> from sipsimple.account.xcap import XCAPManager File "/usr/lib/python2.7/dist-packages/sipsimple/account/xcap/__init__.py", line 39, in <module> from sipsimple.payloads import addressbook, commonpolicy, dialogrules, omapolicy, pidf, prescontent, presrules, resourcelists, rlsservices, xcapcaps, xcapdiff File "/usr/lib/python2.7/dist-packages/sipsimple/payloads/xcapdiff.py", line 23, in <module> XCAPDiffDocument.register_namespace(namespace, prefix=None, schema='xcapdiff.xsd') File "/usr/lib/python2.7/dist-packages/sipsimple/payloads/__init__.py", line 201, in register_namespace cls._update_schema() File "/usr/lib/python2.7/dist-packages/sipsimple/payloads/__init__.py", line 134, in _update_schema cls.schema = etree.XMLSchema(etree.XML(schema)) File "xmlschema.pxi", line 105, in lxml.etree.XMLSchema.__init__ (src/lxml/lxml.etree.c:132605) lxml.etree.XMLSchemaParseError: Detected an entity reference loop, line 30, column 38
after some googling i’ve found this bug report: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=767877
so for now i had to revert back to the older [and vulnerable] libxml2_2.8.0+dfsg1-7+wheezy1_i386.deb available eg from ftp://ftp.pl.debian.org/pub/debian/pool/main/libx/libxml2/ . to avoid unexpected updates i’ve pinned that package version by creating /etc/apt/preferences.d/libxml2 with:
Package: libxml2 Pin: version 2.8.0+dfsg1-7+wheezy1 Pin-Priority: 999
hopefully in a while the underlying problem will be resolved too. i’m setting a reminder few months from now to check if pinning can be removed.
2015-07-19
above served me well but at some point also stopped working. so i’ve turned into linphone for my nagios notifications via a missed calls:
my ~/.linphonerc:
[sip] verify_server_certs=1 verify_server_cn=1 contact=sip:toto@unknown-host media_encryption=none default_proxy=0 multi_transport_migration_done=1 guess_hostname=1 inc_timeout=30 in_call_timeout=0 delayed_timeout=4 use_ipv6=0 register_only_when_network_is_up=1 register_only_when_upnp_is_ok=1 use_info=0 use_rfc2833=0 [net] download_bw=0 upload_bw=0 mtu=1300 firewall_policy=0 [auth_info_0] username=4xxxxxxxx31 passwd=somepassword domain=sip.operator.com [rtp] audio_rtp_port=7078 video_rtp_port=9078 audio_jitt_comp=60 video_jitt_comp=60 nortp_timeout=30 audio_adaptive_jitt_comp_enabled=1 video_adaptive_jitt_comp_enabled=1 [proxy_0] reg_proxy=sip:sip.operator.com reg_route=sip:sip.operator.com reg_identity=sip:4xxxxxxxx31@sip.operator.com reg_expires=3600 reg_sendregister=1 publish=0 dial_escape_plus=0
and the calling script:
timeout -s 9 15 bash -c "(sleep 3; echo call 004673xxxxxxx@sip.operator.com; sleep 20 ) | linphonec"