How to connect to Huawei devices
Huawei develops various devices which have nasty bugs in SIP implementation.
To support their non-standard SIP implementation, Huawei sends patches to Asterisk that cripple Asterisk, but they do not fix their own implementations.
One we encountered is in the SIP INVITE message. Asterisk sends the line:
a=silenceSupp:off - - - - -
Huawei Softswitch does not like it and returns the error:
Got SIP response 500 "Server Internal Error" back from 23.45.67.89
There is also the Hangupcause code 38, which is: NETWORK_OUT_OF_ORDER.
Related links:
- http://lists.digium.com/pipermail/asterisk-dev/2006-March/019067.html
- http://lists.digium.com/pipermail/asterisk-dev/2006-March/019156.html
- http://bugs.digium.com/view.php?id=6669
A provider that uses Huawei insisted we should patch (which is to say, cripple) Asterisk to make it work with their Softswitch. Instead we put a middle server between our Asterisk server and their Softswitch:
Our main Asterisk <--IAX2--> Patched Asterisk <--SIP--> Huawei softswitch
In /usr/src/asterisk/channels/chan_sip.c we commented lines
if (!p->owner || !ast_internal_timing_enabled(p->owner)) ast_build_string(&a_audio_next, &a_audio_left, "a=silenceSupp:off - - - -\r\n")
as is described in this patch. We recompiled Asterisk and it started to work.