I am running Asterisk 1.6 on Ubuntu server 10.04 There is an Audiocodes Mediant 1000 MSBG which acts as an SBC to support remote users on my Asterisk box.
When I make call from internal through the SBC to the remote user, the call works just fine. However when remote users make calls through the SBC to internal users, the internal phones ring, the user answers, and they hear dead air while the remote user continues to hear ringback.
I have isolated this issue to the final SIP 200 OK, in the call setup, sent from the Asterisk box to the SBC. The SBC is basically rejecting the 200 OK because of an inconsistency in the Content-length recorded in the message and the computation performed on the SBC. You can the error in my syslogs, on the SBC, below.
1.6 is three different versions, with many revision levels. I would hope that this is already fixed in 1.6.2.. You should check the revision log, which hopefully the packages has included.
I believe Ubuntu build with non-standard settings, so you need to investigate the Ubuntu build process if you need to apply the patch yourself, but basically you can get the patch from the link in the bug tracker entries for the SVN commit for the right branch and apply it to the source with the patch tool that comes with all Unix type systems, then recompile.
What you should do when a patch fails is to look at the rejected patches and try and find the before version of the first one in the code, and then work out why it doesn’t match what is there (well enough).
It obviously found it as an immediate sub-directory of the current directory, or it would have been asking you to supply the name of the file to patch.
Wherever you installed the Asterisk source code. Conventionally it would be in /usr/src/asterisk, but that’s not where I have it on any of my systems.
If you have a binary packages, you will not have a copy. However, the output from your patch run suggests that you ran patch in the top level source code directory.
To use the patch file, you need to build it from source.
As I believe that Ubuntu do things like running it non-root, they may not use the standard build options, and may even use modified source code, so I can’t tell you how to make a version that is compatible with the Ubuntu packaged one.
If you were doing a standard build (I’ve only ever tried on CentOS and Slackware), you would download the latest source code tar.gz file and extract it into a working directory. Alternatively you could fetch it using svn. You would almost certainly not need to apply the patch, as it would almost certainly be in that version, unless there were some problems with it that prevented its going into a release version.
You’d then make sure you had a complete set of standard development tools and go into the top level source directory and run:
./configure
You may have to give it options if Ubuntu don’t use the installation and configuration directories assumed by the standard build. Assuming that finishes OK, you would run:
make menuconfig
and adjust any parameters. Disabling compiler optimisation is a good idea, if you ever expect it to crash, unless you are really critical on CPU power.
Next you would run
make
and finally
make install
There are some extra steps for a install on a clean system, which install the system start up scripts and a sample set of configuration files.
Incidentally, I don’t believe that patch should have treated your case as an attempted file creation. I would still have expected it to ask for the location of the file.