Summary:ASTERISK-00467: [request] Endpoints Bracket option needs way of adding brackets around endpoints that define IP address after @ sign for MGCP
Reporter:svoto (svoto)Labels:
Date Opened:2003-10-31 00:25:44.000-0600Date Closed:2004-09-25 02:49:42
Versions:Frequency of
Environment:Attachments:( 0) chan_mgcp.c.dottedip.diff
Description:We are wondering if this can be added to asterisk quickly?

This example shows an enpoint parameter value with brackets around the IP address of the endpoint:
Comments:By: florian (florian) 2003-11-01 02:31:49.000-0600

Why would you need this ? You can add the IP-address without brackets and that works just fine...

*Edit* Nevermind, I found this on the mailinglist, that makes more sense:

your device is not registered on * , [] name in mgcp.conf must be exactly as gw name
in your case you have configured gw-name as  'ip10' in mgcp.conf but on your device it is '[]'
change it on device to ip10 or in * to [[]]

Hmm, interesting device... By the way, this is not what I experienced with my MGCP devices anywhere, so I can't say it looks familiar :->

edited on: 11-01-03 02:45

By: svoto (svoto) 2003-11-03 05:51:44.000-0600

We have changed mgcp.conf with double brackets [[]].  This method does not work.  I have tried it in every combination.  It will not parse the second set of brackets for some reason.  The reason for this option is the specification states that if the hostname is an IP it will have brackets around it.  The latter without brackets is older.  So my device sends brackets to the Asterisk and then the asterisk returns the endpoint without the brackets.  It strips the brackets.  This should be a simple implementation.

By: florian (florian) 2003-11-03 08:46:04.000-0600

What kind of device are you using ? The IP10 ? Can you show us the firmware version ?

By: svoto (svoto) 2003-11-03 09:00:59.000-0600

I am using cisco ATA186 and ASKEY's to a proprietary device then to the Asterisk.  I will try and make this as simple as possible.  I understand that mostly all gateways provide a transition bit to enable or disable the use of bracket around hostnamed IP Addressing.  The major problem I see and should be implemented is that when an endpoint is sending an RSIP with its'  Bracketed addressing it should be responded to by the Call Agent in the same manner and not stripped off as what is happening with the Asterisk.

By: svoto (svoto) 2003-11-07 09:02:30.000-0600

Do we see this bug getting updated.  I think basically if we can parse the the brackets a different way with mgcp to define what is in the brackets may be easier. I.E  aaln/1@[]  could be defined in mgcp.conf ["[]"].  The quotes can delimit the inside bracket rather than trying to parse to sets of brackets as in this example. [[]]
Keep in mind that the spec states that if you use ip address in hostname that they will have brackets.


By: Mark Spencer (markster) 2003-12-10 16:27:52.000-0600

Do you want to be able to use []'s to talk to devices which are not registered, or do you want the [[]] to work properly?

By: Brian West (bkw918) 2004-01-07 00:02:01.000-0600

Any more response?

By: florian (florian) 2004-01-27 03:08:05.000-0600

No help here, I don't have any device that shows this issue. To respond to mark I don't think there is any need to talk to devices which are not registered.

By: svoto (svoto) 2004-01-31 20:09:13.000-0600

I have reopened this bug due to RFC influence.  When Domain names end in IP addresses not naming conventions they will be in Brackets.  When I use a Cisco ATA186 and send an Address in Brackets via MGCP Asterisk accepts the endpoint and then returns the endpoint name without the Brackest.  Basically stripping of the prackets.  We deal with many Major ISP's and testing.  This is required in our test with them.  I have fixed any communication via Asterisk wiht the right standard.  Quite Simply:  

Wrong!!! aaln/1@[] ----> Asterisk ----> accepts endpoint and Responds to endpoint as aaln1/ (should not look like this.  

RIght!!! It should however look like this, aaln/1@[] ----> Asterisk ----> accepts endpoint and Responds to endpoint as aaln1/[]

My .02

By: Mark Spencer (markster) 2004-01-31 20:31:52.000-0600

Okay so do you have a patch then?  If so, can you attach it please?

By: marcher (marcher) 2004-02-20 11:12:01.000-0600

I have the same issue, is there a patch available? I'm running 0.72

By: duanecox (duanecox) 2004-03-16 12:40:36.000-0600

I have the same issue.  I need a fix too.
My devices are with a MGCP stack from RADVISIONS.
Sorry I opened a new bug for this, I didn't see this one.
My quick fix was to hack the chan_mgcp.c file, line 1366 in current CVS
and add the brackets.

I could provide more information, but as svoto said, it needs to be in the extensions.conf format.

svoto: email me at dcox@illicom.net


Svoto: I believe you are right on this standard, and * users will be seeing it more and more.

From what I understand... svoto's infomation above is accurate, I see the same thing on my devices.
If using aaln/#@[IP.IP.IP.IP], my device requires the brackets around the IP, but if using a hostname, ie. aaln/#@host.domain.com  no brackets are required.

My fix was this, but it will hack both the [IP.IP.IP.IP] and [host.domain.com] which isn't right as the hostname should not have brackets, but it did get me up and working when using IP...

line 1366

       snprintf(req->header[req->headers], sizeof(req->data) - req->len, "%s %d %s@[%s] MGCP 1.0\r\n", verb, oseq, p->name, p->parent->name);

edited on: 03-16-04 11:39

edited on: 03-16-04 11:40

By: duanecox (duanecox) 2004-03-17 22:58:20.000-0600

fixed in patch chan_mgcp.c.diff.4


By: serkan (serkan) 2004-03-18 14:32:12.000-0600

I uploaded a patch. This is the diff from the CVS head.

By: Mark Spencer (markster) 2004-04-15 01:01:41

Is this already done?

By: Mark Spencer (markster) 2004-04-15 10:25:55

Okay, this should already be fixed in CVS, please confirm.

By: duanecox (duanecox) 2004-04-15 14:02:43

Mark, this fix was introduced in a previous bug-fix and was already added to CVS.  But when you say "added to CVS" do you mean development CVS or -stable?

By: Mark Spencer (markster) 2004-04-15 15:11:01

cvs head.

By: Mark Spencer (markster) 2004-04-24 11:50:27

Added to -stable too