{"id":52,"date":"2012-03-13T18:45:58","date_gmt":"2012-03-13T14:45:58","guid":{"rendered":"http:\/\/xxxl.co.za\/?p=52"},"modified":"2023-03-16T14:35:27","modified_gmt":"2023-03-16T10:35:27","slug":"asterisk-integration-with-huawei-soft-switch","status":"publish","type":"post","link":"https:\/\/xxxl.co.za\/?p=52","title":{"rendered":"Asterisk integration with Huawei Soft-Switch"},"content":{"rendered":"<p>I needed to configure a SIP trunk with Asterisk to a provider using a Huawei soft switch.<\/p>\n<p>It was not painless&#8230;.<\/p>\n<p>Firstly there was a well known error regarding silence suppression:<\/p>\n<p>In the SIP INVITE asterisk sends: &#8220;<span style=\"color: #0000ff;\">a=silenceSupp:off &#8211; &#8211; &#8211; &#8211; &#8211;<\/span>&#8221;<\/p>\n<p>It is too difficult for Huawei&#8217;s coders to accomodate this, so it sends back:<\/p>\n<p>&#8220;<span style=\"color: #0000ff;\">Got SIP response 500 &#8220;Server Internal Error&#8221; back from XXX.XXX.XXX.XXX<\/span>&#8221;<\/p>\n<p>So the way this can be circumvented is by doing this:<\/p>\n<ul>\n<li><a title=\"http:\/\/lists.digium.com\/pipermail\/asterisk-dev\/2006-March\/019067.html\" href=\"http:\/\/lists.digium.com\/pipermail\/asterisk-dev\/2006-March\/019067.html\" rel=\"nofollow\">http:\/\/lists.digium.com\/pipermail\/asterisk-dev\/2006-March\/019067.html<\/a><\/li>\n<li><a title=\"http:\/\/lists.digium.com\/pipermail\/asterisk-dev\/2006-March\/019156.html\" href=\"http:\/\/lists.digium.com\/pipermail\/asterisk-dev\/2006-March\/019156.html\" rel=\"nofollow\">http:\/\/lists.digium.com\/pipermail\/asterisk-dev\/2006-March\/019156.html<\/a><\/li>\n<li><a title=\"http:\/\/bugs.digium.com\/view.php?id=6669\" href=\"http:\/\/bugs.digium.com\/view.php?id=6669\" rel=\"nofollow\">http:\/\/bugs.digium.com\/view.php?id=6669<\/a><\/li>\n<\/ul>\n<p>So my example use asterisk 10.2.0<\/p>\n<p>Go look at your asterisk source file in chan_sip.c around line 11814<\/p>\n<p>&nbsp;<\/p>\n<p>Comment out this section:<br \/>\n<code><\/code><\/p>\n<pre class=\"brush: cpp; title: ; notranslate\" title=\"\">\/* ast_build_string(&amp;amp;a_audio_next, &amp;amp;a_audio_left, &quot;a=silenceSupp:off - - - - -\\r\\n&quot;); *\/<\/pre>\n<p><code><\/code><br \/>\nRecompile and install.<br \/>\nNow that has fixed the problem with the silence suppression.<\/p>\n<p><strong>Another error appeared<\/strong> that the Huawei soft switch is quite pedantic with session expiry.<\/p>\n<p>Outgoing calls from asterisk to Huawei will work, but incoming calls will be dropped when answered.<br \/>\nthis is due to this sip communication:<\/p>\n<p><span style=\"color: #000000;\">This is fixed by adding : <\/span>&#8220;<span style=\"color: #0000ff;\">session-timers=refuse<\/span>&#8221; in my sip.conf<\/p>\n<p>sip.conf file that works for me:<\/p>\n<p><code><\/code><\/p>\n<pre class=\"brush: yaml; title: ; notranslate\" title=\"\">&#x5B;myprovider]\r\ntype=peer\r\nhost=XX.XX.6.5\r\ndisallow=all\r\nallow=g729\r\nallow=alaw\r\ninsecure=port,invite\r\nqualify=yes\r\nnat=no&lt;\/span&gt;\r\ncontext=from-myprovider\r\ncanreinvite=no\r\nt38pt_udptl = yes\r\nsession-timers=refuse<\/pre>\n<p><code><\/code><\/p>\n<p>Time will tel how stable this config is, but it looks promising.<br \/>\nHope this helps somebody out there.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I needed to configure a SIP trunk with Asterisk to a provider using a Huawei soft switch. It was not painless&#8230;. Firstly there was a well known error regarding silence suppression: In the SIP INVITE asterisk sends: &#8220;a=silenceSupp:off &#8211; &#8211; &#8211; &#8211; &#8211;&#8221; It is too difficult for Huawei&#8217;s coders to accomodate this, so it &hellip; <a href=\"https:\/\/xxxl.co.za\/?p=52\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Asterisk integration with Huawei Soft-Switch<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[3],"tags":[],"class_list":["post-52","post","type-post","status-publish","format-standard","hentry","category-howtos"],"_links":{"self":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts\/52","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=52"}],"version-history":[{"count":39,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts\/52\/revisions"}],"predecessor-version":[{"id":358,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=\/wp\/v2\/posts\/52\/revisions\/358"}],"wp:attachment":[{"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=52"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=52"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/xxxl.co.za\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=52"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}