Disclaimer: I’m not a programmer! If you decide to use this, use it at your own risk!
For a couple of days I’ve been trying to find a working patch for Asterisk PBX, that would allow me to use an eMTA device (which is essentially a cable modem with voice terminal adapter), provisioned according to [some of] the PacketCable specifications - i.e. with MGCP/NCS. So, I’ve found a patch on the Net, written by Jason Burton in 2006.
Disclaimer: I’m not a programmer! If you decide to use this, use it at your own risk!
When I tried to apply it on a vanilla 1.4.18 Asterisk source tree, it spew a lot of rejects, which then I kind of fixed. So, here you can find the patch itself.
Apply it like this:
cd /usr/src/asterisk-1.4.18/channels/
patch –dry-run -p1 < [full path to/]ncs-packetcable-minus273.patch
Look carefully if there are any rejects. If not:
patch -p1 < [full path to/]ncs-packetcable-minus273.patch
Then, of course, you have to recompile and configure asterisk to accept eMTA devices.
Disclaimer: I’m not a programmer! If you decide to use this, use it at your own risk!
Please, note, that I’m not responsible for any problems, that could arise after applying this patch!
Edit: You have to enter ncs=1 in every endpoint’s configuration in your mgcp.conf. E.g.:
[192.168.200.2] host=192.168.200.2 dtmfmode=rfc2833 ncs=1 nat=no slowsequence=yes canreinvite=yes wcardep=aaln/* context = eMTAs immediate=no line => aaln/1 context = eMTAs immediate=no line => aaln/2
Just a quick note - there is a new version of the patch for 1.4.24.1 version of Asterisk, that applies without too much warnings. Have no idea if it works, though. Test it and see.