Open Source Training Seminar FreePBX Paid Support

Ticket #2695 (new Patches)

Opened 8 months ago

Last modified 3 months ago

Update to support H323, MGCP & Skinny Extensions

Reported by: robmac Assigned to: p_lindheimer
Priority: major Milestone: 4.0
Component: Core Version: 2.4-branch
Keywords: Extensiions H323 MGCP OOH323 Skinny Cc:
Confirmation: Need Feedback SVN Revision (if applicable):
Backend Engine: All Backend Engine Version:

Description

As Asterisk supports OOH323, MGCP & Skinny out of the box as well as SIP & IAX2 I have updated the 2.4.0.0 release /var/www/html/admin/modules/core/functions.inc.php to support these protocols for extensions.

Three new tables h323, mgcp & skinny need to be created in the asterisk database using the same format as the sip table and the standard set of conf files in /etc/asterisk with appropriate permissions need creating.

For H323 I have deliberately made all the references H323 apart from the dial command which is OOH323/ so that if the default H323 engine in Asterisk is changed only that value needs changing.

For Skinny I have deliberately not called it SCCP as their are a number of "competing" SCCP channel drivers and it appears unlikely that Asterisk will move away from Skinny.

I am not a "developer" and don't know how to create a patch so I just attach the modified file as per Philippe's advice.

There is one area of coding which is beyone me which is creating the dial string correctly for all 3 of these as they take the format of Protocol/LineNumber@Device (MGCP & Skinny) or Protocol/H323DeviceID@Host.

I have tested the MGCP & OOH323 implementation but do not have anything to test Skinny with.


Setting up H.323 Endpoints:-

As OOH323 does not support users or host=dynamic (Asterisk with OOH323 is an H323 Gateway not an H323 Gatekeeper so endpoints cannot register) the extensions must be setup as a friend (see notess) with an IP or DNS name (host or FQDN).

For OOH323 to scale the only viable and managable solutions is to use DDNS with the DHCP server making the DNS registrations on behalf of the endpoints (as not all endpoints have DNS registration capability)

The configuration below assumes using IP Addresses rather than DNS and should be used in the first instance to remove DNS issues from confusing communication & configuration issues.

On the endpoint:- 1) Make sure you only enable ulaw and gsm as these are the only 2 codecs currently supported 2) In "Use Service" this should NOT be enabled (This may also be called Register or similar) 3a) In Service Address enter the IP for the Asterisk Server & on the Service Port enter 1720 OR 3b) In Service Address enter the IP for the Asterisk Server :1720 ie (192.168.1.1:1720) OR 3c) On Service Address enter the IP for the Asterisk Server 4) In H245 & RTP Ports enter 1722 5) In Q931 port enter 1720 6) In RTP Port enter 12100 (OOH323 listens between 12030 and 12230 by default 7) In account type choose local (or for local type choose account) 8) In DTMF choose RFC2833 (or h245 string or q931 keypad - this must match what is defined on the extension) 9) In Phone number and Account enter the Asterisk extension number for the device 10 Leave PIN blank !

The Dial string format is OOH323/<EndPointDomain?>@host where <EndPointDomain?> is the IP, host name or FQSN of the device

For both simplicity and this implementation <EndPointDomain?> MUST be the same as the extension number

Asterisk CLI commands:- ooh323 debug Enable OOH323 debugging ooh323 no debug Disable OOH323 debugging ooh323 show config Show details on global configuration of H.323 channel driver ooh323 show peers Show defined OOH323 peers ooh323 show peer Show details on specific OOH323 peer ooh323 show users Show defined OOH323 users ooh323 show user Show details on specific OOH323 user


Setting up MGCP Endpoints:- _

1a) In Service Address enter the IP for the Asterisk Server & on the Service Port enter 2727 OR 1b) In Service Address enter the IP for the Asterisk Server :2727 ie (192.168.1.1:2727) OR 1c) In Service Address enter the IP for the Asterisk Server 2) In Phone Number enter the extension number 3) In Endpoint ID enter aaln/1 4) In Domain enter the extension number 5) In Register Port enter 2427 6) In RTP Port enter 32766 (Likely to be the best value as it is the Cisco endpoint default)

The Dial string format is MGCP/<Line Number/1>/<Domain> (ie MGCP/aaln/1@3013) where <Line Number/1> is the line in both Asterisk and the Endpoint and <Domain> is the MGCP Domain on both Asterisk and the Endpoint For this implementation <Domain> is the extension number

Asterisk CLI commands mgcp audit endpoint Audit specified MGCP endpoint mgcp debug Enable MGCP debugging mgcp no debug Disable MGCP debugging mgcp reload Reload MGCP configuration mgcp show endpoints Show defined MGCP endpoints


OOh323 Troubleshooting:-

OOH323 - Cannot assign address: check /etc/hosts & /etc/sysconfig/network match up & only use ONE domain name !


OOH323 Notes:-

See /usr/src/asterisk-addons/asterisk-ooh323c/h323.conf.sample for options for configuring OOH323, changes should go into ooh323_general_custom.conf


Users, Peers & Friends

The difference between friend and peer is the same as defining both a user and a peer, since that is what 'type=friend' does internally in Asterisk.

Attachments

functions.inc.php (221.0 kB) - added by robmac on 02/20/08 21:47:44.
addprotocols.patch (41.1 kB) - added by robmac on 02/21/08 12:46:25.

Change History

02/20/08 19:44:41 changed by robmac

There was an error on line 4968:-

$currentcomponent->addoptlistitem('devicelist', 'mgcp_generic', _("Generic Skinny Device"));

Should be

$currentcomponent->addoptlistitem('devicelist', 'skinny_generic', _("Generic Skinny Device"));

02/20/08 21:46:51 changed by robmac

Added missing Secret for Skinny

02/20/08 21:47:44 changed by robmac

  • attachment functions.inc.php added.

02/21/08 07:13:29 changed by p_lindheimer

  • confirmation changed from Unreviewed to Need Feedback.
  • milestone changed from Cut Line to 3.0.

robmac,

can you please provide these as patches as functions.inc.php changes as various bug fixes are introduced and if it is not a patch file it both causes problems when people are trying it and ends up being a hurdle when we are reviewing potential inclusions in a future release.

You can easily generate a patch file and then attach it here:

diff -ubB functions.inc.php mychanged_functions.inc.php > functions.inc.php.patch

and make sure it ends with the .patch extension in here so it can be properly viewed with the viewer.

Thanks

02/21/08 12:46:25 changed by robmac

  • attachment addprotocols.patch added.

02/25/08 04:43:37 changed by robmac

Also tested OK on 2.4.0.1

Note Skinny can cause core dumps on Asterisk 1.2 (nothing to do with this patch) but 1.4 appears stable (at least for 1.2.26.2 & 1.4.18)

For Skinny do not use dynamic for Host as it doesn't appear to work - use the IP address.

OOH323 & Skinny do not support reload so any changes or additions require amportal stop/start to take effect

02/25/08 07:05:05 changed by robmac

Update on Skinny core dump on Asterisk 1.2 - this is caused by Model= (ie Model=7940) Model=79xx prevents the core dump. This appears to be caused by unsupported models in Skinny (ie 7905 & 7912 don't cause a core dump but 7940 & 7960 do)

03/01/08 01:57:05 changed by robmac

Problems with dialling from these devices can be caused by the problem described in bug report 2715 (http://www.freepbx.org/trac/ticket/2715) which causes the context to be written after context sensitive settings instead of before in the protocol_additional.conf files. To resolve temporarily (for testing) manually edit the file and move the context declaration to the very top of the section for that extension - note that every time you make changes in FreePBX this will be overwritten.

07/08/08 13:15:29 changed by jamiehankins

I think you're 180 degrees off on the core dump. I just looked at the code, and it seems that the core dump only happens when you use a model that it does know. It doesn't know what a 7905 or 7912 are, but it knows what a 7940, 7960, and in my case 7920 are. It defaults to a "12sp" if it doesn't recognize your model, and that one doesn't cause a core dump.

07/08/08 14:00:10 changed by p_lindheimer

  • milestone changed from 2.5 to 4.0.

I'm moving this out to 4.0 when we review devices/users. The incident of these being used is too low for the core team to include this at this time which would imply support and there are too many other important areas to focus on that are used widespread.

07/08/08 16:52:08 changed by jamiehankins

Wow, I don't know the roadmap, but 4.0 sounds like a long time out. This seems to work great on my Asterisk 1.4 test machine. I'll be moving my production machine from 1.2 soon because of this.

There are a lot of people out there with Cisco 7920s that are paperweights because getting them configured to work with FreePBX (or any other Asterisk environment) is so difficult. I was hoping that Cisco would make life easier and do a SIP load for the new 7921, but no such luck.

I don't hear a lot of clammoring for h.323 or MGMC, but I think Skinny use would be a lot more widespread if it weren't such murder to get configured. Just do a Google search for SCCP, Asterisk, and Skinny, and you'll get a lot of frustrated hits.

If I can do anything to help make this a reality sooner, let me know.

Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads