{"id":2393,"date":"2014-11-10T17:29:51","date_gmt":"2014-11-10T16:29:51","guid":{"rendered":"http:\/\/kudzia.eu\/b\/?p=2393"},"modified":"2015-07-19T14:51:53","modified_gmt":"2015-07-19T13:51:53","slug":"sip-audio-session-new-libxml2","status":"publish","type":"post","link":"https:\/\/kudzia.eu\/b\/2014\/11\/sip-audio-session-new-libxml2\/","title":{"rendered":"sip-audio-session, new libxml2"},"content":{"rendered":"<p>i&#8217;m using nagios to wake me up. not every day &#8211; only when there&#8217;s some outage. i have pair of nagios servers &#8211; one in Sweden, one in Poland &#8211; they cross-check one another and &#8211; for the most critical problems &#8211; send sms and make a phone call. for sms&#8217;es i&#8217;m using <a href=\"http:\/\/www.budgetsms.net\/\">budgetsms.net<\/a>, for the phone calls &#8211; some sip provider and command line tool sip-audio-session from the <a href=\"http:\/\/sipsimpleclient.org\/\">sip simple client sdk<\/a> 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.<br \/>\n<!--more--><\/p>\n<p>running<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nsip-audio-session --auto-hangup 30 0046712112233@my.sip.provider\r\n<\/pre>\n<p>with config file ~\/.sipclient\/config:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nAccounts:\r\n    46112211777@my.operator.com:\r\n        enabled = true\r\n        auth:\r\n            password = somePasswordForMySipAccount\r\n\r\n\r\n\r\nSIPSimpleSettings:\r\n    default_account = 46112211777@my.operator.com\r\n    instance_id = &quot;urn:uuid:11111111-2222-3333-4444-555555555555&quot;\r\n    audio:\r\n        alert_device =\r\n        input_device =\r\n        output_device =\r\n<\/pre>\n<p>used to give me a 30 seconds long &#8216;missed call&#8217; on my mobile &#8211; 0046712112233, but after the recent libxml2 upgrade gave me instead:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nusing set_wakeup_fd\r\nTraceback (most recent call last):\r\n  File &quot;\/usr\/bin\/sip-audio-session&quot;, line 24, in &lt;module&gt;\r\n    from sipsimple.account import Account, AccountManager, BonjourAccount\r\n  File &quot;\/usr\/lib\/python2.7\/dist-packages\/sipsimple\/account\/__init__.py&quot;, line 29, in &lt;module&gt;\r\n    from sipsimple.account.xcap import XCAPManager\r\n  File &quot;\/usr\/lib\/python2.7\/dist-packages\/sipsimple\/account\/xcap\/__init__.py&quot;, line 39, in &lt;module&gt;\r\n    from sipsimple.payloads import addressbook, commonpolicy, dialogrules, omapolicy, pidf, prescontent, presrules, resourcelists, rlsservices, xcapcaps, xcapdiff\r\n  File &quot;\/usr\/lib\/python2.7\/dist-packages\/sipsimple\/payloads\/xcapdiff.py&quot;, line 23, in &lt;module&gt;\r\n    XCAPDiffDocument.register_namespace(namespace, prefix=None, schema='xcapdiff.xsd')\r\n  File &quot;\/usr\/lib\/python2.7\/dist-packages\/sipsimple\/payloads\/__init__.py&quot;, line 201, in register_namespace\r\n    cls._update_schema()\r\n  File &quot;\/usr\/lib\/python2.7\/dist-packages\/sipsimple\/payloads\/__init__.py&quot;, line 134, in _update_schema\r\n    cls.schema = etree.XMLSchema(etree.XML(schema))\r\n  File &quot;xmlschema.pxi&quot;, line 105, in lxml.etree.XMLSchema.__init__ (src\/lxml\/lxml.etree.c:132605)\r\nlxml.etree.XMLSchemaParseError: Detected an entity reference loop, line 30, column 38\r\n<\/pre>\n<p>after some googling i&#8217;ve found this bug report: https:\/\/bugs.debian.org\/cgi-bin\/bugreport.cgi?bug=767877<\/p>\n<p>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&#8217;ve pinned that package version by creating \/etc\/apt\/preferences.d\/libxml2 with:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\nPackage: libxml2\r\nPin: version 2.8.0+dfsg1-7+wheezy1\r\nPin-Priority: 999\r\n<\/pre>\n<p>hopefully in a while the underlying problem will be resolved too. i&#8217;m setting a reminder few months from now to check if pinning can be removed.<\/p>\n<p><b>2015-07-19<\/b><\/p>\n<p>above served me well but at some point also stopped working. so i&#8217;ve turned into linphone for my nagios notifications via a  missed calls:<\/p>\n<p>my ~\/.linphonerc:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\n&#x5B;sip]\r\nverify_server_certs=1\r\nverify_server_cn=1\r\ncontact=sip:toto@unknown-host\r\nmedia_encryption=none\r\ndefault_proxy=0\r\nmulti_transport_migration_done=1\r\nguess_hostname=1\r\ninc_timeout=30\r\nin_call_timeout=0\r\ndelayed_timeout=4\r\nuse_ipv6=0\r\nregister_only_when_network_is_up=1\r\nregister_only_when_upnp_is_ok=1\r\nuse_info=0\r\nuse_rfc2833=0\r\n\r\n&#x5B;net]\r\ndownload_bw=0\r\nupload_bw=0\r\nmtu=1300\r\nfirewall_policy=0\r\n\r\n&#x5B;auth_info_0]\r\nusername=4xxxxxxxx31\r\npasswd=somepassword\r\ndomain=sip.operator.com\r\n\r\n&#x5B;rtp]\r\naudio_rtp_port=7078\r\nvideo_rtp_port=9078\r\naudio_jitt_comp=60\r\nvideo_jitt_comp=60\r\nnortp_timeout=30\r\naudio_adaptive_jitt_comp_enabled=1\r\nvideo_adaptive_jitt_comp_enabled=1\r\n\r\n\r\n\r\n&#x5B;proxy_0]\r\nreg_proxy=sip:sip.operator.com\r\nreg_route=sip:sip.operator.com\r\nreg_identity=sip:4xxxxxxxx31@sip.operator.com\r\nreg_expires=3600\r\nreg_sendregister=1\r\npublish=0\r\ndial_escape_plus=0\r\n\r\n<\/pre>\n<p>and the calling script:<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\r\ntimeout -s 9 15 bash -c &quot;(sleep 3; echo call 004673xxxxxxx@sip.operator.com; sleep 20 ) | linphonec&quot;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>i&#8217;m using nagios to wake me up. not every day &#8211; only when there&#8217;s some outage. i have pair of nagios servers &#8211; one in Sweden, one in Poland &#8211; they cross-check one another and &#8211; for the most critical problems &#8211; send sms and make a phone call. for sms&#8217;es i&#8217;m using budgetsms.net, for [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17,51],"tags":[28,87],"class_list":["post-2393","post","type-post","status-publish","format-standard","hentry","category-tech","category-unimportant","tag-debian","tag-sip"],"_links":{"self":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2393","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/comments?post=2393"}],"version-history":[{"count":4,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2393\/revisions"}],"predecessor-version":[{"id":2515,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/posts\/2393\/revisions\/2515"}],"wp:attachment":[{"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/media?parent=2393"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/categories?post=2393"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kudzia.eu\/b\/wp-json\/wp\/v2\/tags?post=2393"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}