Duane Cox
2004-Mar-15 16:21 UTC
[Asterisk-Users] Need help to format asterisk MGCP packet.
Hello, I am trying to setup a 'gateway' fiber to the home device from wave7optics (www.wave7optics.com) They use a MGCP stack from "RAD?" and did not code it themselves. My MGCP name-convetion on this device is set to IP, but this stack expects the received MGCP packets to be formated as 'aaln/X@[IP.IP.IP.IP]' (notice the brackets) I have tried to adjust my extensions.conf and mgcp.conf to compensate, but could not get asterisk to send in that format. Can anyone help? This is the debug log from the 'gateway' device. You can see the format that it is sending out, and it is expecting to get the same format back. You can see that asterisk is sending to the device in the format (without the brackets) and this gateway device responds with 'endpoint unknown' ***LOG*** Aug 1 23:19:27 [3195449] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1602: SEND: rsip 14389 aaln/2@[10.252.240.2] MGCP 1.0 RM:restart RD:0 Aug 1 23:19:27 [3195450] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 X: 2467de76 R: hd(N) Aug 1 23:19:27 [3195450] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 X: 2467de76 R: hd(N) Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1481: SEND: 500 5 Unknown endpoint Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 X: 2467de76 R: hd(N) Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 X: 2467de76 R: hd(N) Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1481: SEND: 500 5 Unknown endpoint
Derek Bruce
2004-Mar-15 17:14 UTC
[Asterisk-Users] Need help to format asterisk MGCP packet.
I don't use MGCP, but after a quick look at the code I may have a solution for you... in chan_mgcp.c, replace the snprintf line in init_req (line#1367 in march 1 cvs version)with: 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); this should give you what you need... ----- Original Message ----- From: "Duane Cox" <duanec@illicom.net> To: <Asterisk-Users@lists.digium.com> Sent: Monday, March 15, 2004 4:21 PM Subject: [Asterisk-Users] Need help to format asterisk MGCP packet.> Hello, I am trying to setup a 'gateway' fiber to the home device fromwave7optics (www.wave7optics.com)> > They use a MGCP stack from "RAD?" and did not code it themselves. MyMGCP name-convetion on this device is set to IP, but this stack expects the received MGCP packets to be formated as 'aaln/X@[IP.IP.IP.IP]' (notice the brackets)> > I have tried to adjust my extensions.conf and mgcp.conf to compensate, butcould not get asterisk to send in that format.> > Can anyone help? > > This is the debug log from the 'gateway' device. > You can see the format that it is sending out, and it is expecting to getthe same format back. You can see that asterisk is sending to the device in the format (without the brackets) and this gateway device responds with 'endpoint unknown'> > ***LOG*** > > > Aug 1 23:19:27 [3195449] MGCP DEBUG INFO atmgcp/common/transport/rvmgcpstack.c 1602:> SEND: rsip 14389 aaln/2@[10.252.240.2] MGCP 1.0 > RM:restart > RD:0 > > Aug 1 23:19:27 [3195450] MGCP DEBUG INFO atmgcp/common/transport/rvmgcpstack.c 1143:> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 > X: 2467de76 > R: hd(N) > > Aug 1 23:19:27 [3195450] MGCP DEBUG INFO atmgcp/common/transport/rvmgcpstack.c 1143:> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 > X: 2467de76 > R: hd(N) > > Aug 1 23:19:28 [3195450] MGCP DEBUG INFO atmgcp/common/transport/rvmgcpstack.c 1481:> SEND: 500 5 Unknown endpoint > > Aug 1 23:19:28 [3195450] MGCP DEBUG INFO atmgcp/common/transport/rvmgcpstack.c 1143:> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 > X: 2467de76 > R: hd(N) > > Aug 1 23:19:28 [3195450] MGCP DEBUG INFO atmgcp/common/transport/rvmgcpstack.c 1143:> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 > X: 2467de76 > R: hd(N) > > Aug 1 23:19:28 [3195450] MGCP DEBUG INFO atmgcp/common/transport/rvmgcpstack.c 1481:> SEND: 500 5 Unknown endpoint > > > _______________________________________________ > Asterisk-Users mailing list > Asterisk-Users@lists.digium.com > http://lists.digium.com/mailman/listinfo/asterisk-users > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users
Duane Cox
2004-Mar-15 17:28 UTC
[Asterisk-Users] Need help to format asterisk MGCP packet.
I will apply this and recompile. I was hoping I could do this with a format or a flag (as I may need to send MGCP to other devices in the correct format). I will let you know how it works. MANY THANKS! Duane Cox ---------- Original Message ---------------------------------- From: "Derek Bruce" <dbruce@calgarytelecom.com> Reply-To: asterisk-users@lists.digium.com Date: Mon, 15 Mar 2004 17:14:59 -0700>I don't use MGCP, but after a quick look at the code I may have a solution >for you... > >in chan_mgcp.c, replace the snprintf line in init_req (line#1367 in march 1 >cvs version)with: > >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); > >this should give you what you need... > > >----- Original Message ----- >From: "Duane Cox" <duanec@illicom.net> >To: <Asterisk-Users@lists.digium.com> >Sent: Monday, March 15, 2004 4:21 PM >Subject: [Asterisk-Users] Need help to format asterisk MGCP packet. > > >> Hello, I am trying to setup a 'gateway' fiber to the home device from >wave7optics (www.wave7optics.com) >> >> They use a MGCP stack from "RAD?" and did not code it themselves. My >MGCP name-convetion on this device is set to IP, but this stack expects the >received MGCP packets to be formated as 'aaln/X@[IP.IP.IP.IP]' (notice the >brackets) >> >> I have tried to adjust my extensions.conf and mgcp.conf to compensate, but >could not get asterisk to send in that format. >> >> Can anyone help? >> >> This is the debug log from the 'gateway' device. >> You can see the format that it is sending out, and it is expecting to get >the same format back. You can see that asterisk is sending to the device in >the format (without the brackets) and this gateway device responds with >'endpoint unknown' >> >> ***LOG*** >> >> >> Aug 1 23:19:27 [3195449] MGCP DEBUG INFO at >mgcp/common/transport/rvmgcpstack.c 1602: >> SEND: rsip 14389 aaln/2@[10.252.240.2] MGCP 1.0 >> RM:restart >> RD:0 >> >> Aug 1 23:19:27 [3195450] MGCP DEBUG INFO at >mgcp/common/transport/rvmgcpstack.c 1143: >> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >> X: 2467de76 >> R: hd(N) >> >> Aug 1 23:19:27 [3195450] MGCP DEBUG INFO at >mgcp/common/transport/rvmgcpstack.c 1143: >> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >> X: 2467de76 >> R: hd(N) >> >> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >mgcp/common/transport/rvmgcpstack.c 1481: >> SEND: 500 5 Unknown endpoint >> >> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >mgcp/common/transport/rvmgcpstack.c 1143: >> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >> X: 2467de76 >> R: hd(N) >> >> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >mgcp/common/transport/rvmgcpstack.c 1143: >> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >> X: 2467de76 >> R: hd(N) >> >> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >mgcp/common/transport/rvmgcpstack.c 1481: >> SEND: 500 5 Unknown endpoint >> >> >> _______________________________________________ >> Asterisk-Users mailing list >> Asterisk-Users@lists.digium.com >> http://lists.digium.com/mailman/listinfo/asterisk-users >> To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Duane Cox
2004-Mar-15 17:46 UTC
[Asterisk-Users] Need help to format asterisk MGCP packet.
YES, that change in the chan_mgcp.c worked for my setup. Like I said before, it may not be the best long term solution. What would need to be done to get this into the CVS? Maybe not this exact hack, but some sort of option to allow the change in the format of the packet? ODDLY, the device sends up to asterisk in that format, and asterisk could understand the device, it just couldn't communicate back (before the change).... Apparently with this STACK used by this device, the manufactuer is dead set on NOT changing it. I am finding that there is no 'true MGCP standard' as I work with it between vendors.... ***LOG SHOWS IT IS NOW WORKING*** Aug 2 00:49:54 [4280831] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1602: SEND: rsip 14394 aaln/2@[63.252.240.2] MGCP 1.0 RM:forced RD:0 Aug 2 00:49:54 [4280831] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1602: SEND: 200 6 OK Aug 2 00:49:54 [4280832] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: RQNT 6 aaln/2@[63.252.240.2] MGCP 1.0 X: 0704259f R: hd(N) Aug 2 00:49:54 [4280832] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1481: SEND: 200 5 OK Aug 2 00:49:55 [4280832] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: RQNT 6 aaln/2@[63.252.240.2] MGCP 1.0 X: 0704259f R: hd(N) Aug 2 00:49:55 [4280832] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: RQNT 6 aaln/2@[63.252.240.2] MGCP 1.0 X: 0704259f R: hd(N) Aug 2 00:49:55 [4280832] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1481: SEND: 200 6 OK Aug 2 00:49:55 [4280832] MGCP DEBUG INFO at mgcp/common/transport/rvmgcpstack.c 1143: RECEIVE: 200 14394 OK ---------- Original Message ---------------------------------- From: "Duane Cox" <duanec@illicom.net> Reply-To: asterisk-users@lists.digium.com Date: Mon, 15 Mar 2004 18:28:08 -0600>I will apply this and recompile. I was hoping I could do this with a format or a flag (as I may need to send MGCP to other devices in the correct format). > >I will let you know how it works. > >MANY THANKS! > >Duane Cox > > > > >---------- Original Message ---------------------------------- >From: "Derek Bruce" <dbruce@calgarytelecom.com> >Reply-To: asterisk-users@lists.digium.com >Date: Mon, 15 Mar 2004 17:14:59 -0700 > >>I don't use MGCP, but after a quick look at the code I may have a solution >>for you... >> >>in chan_mgcp.c, replace the snprintf line in init_req (line#1367 in march 1 >>cvs version)with: >> >>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); >> >>this should give you what you need... >> >> >>----- Original Message ----- >>From: "Duane Cox" <duanec@illicom.net> >>To: <Asterisk-Users@lists.digium.com> >>Sent: Monday, March 15, 2004 4:21 PM >>Subject: [Asterisk-Users] Need help to format asterisk MGCP packet. >> >> >>> Hello, I am trying to setup a 'gateway' fiber to the home device from >>wave7optics (www.wave7optics.com) >>> >>> They use a MGCP stack from "RAD?" and did not code it themselves. My >>MGCP name-convetion on this device is set to IP, but this stack expects the >>received MGCP packets to be formated as 'aaln/X@[IP.IP.IP.IP]' (notice the >>brackets) >>> >>> I have tried to adjust my extensions.conf and mgcp.conf to compensate, but >>could not get asterisk to send in that format. >>> >>> Can anyone help? >>> >>> This is the debug log from the 'gateway' device. >>> You can see the format that it is sending out, and it is expecting to get >>the same format back. You can see that asterisk is sending to the device in >>the format (without the brackets) and this gateway device responds with >>'endpoint unknown' >>> >>> ***LOG*** >>> >>> >>> Aug 1 23:19:27 [3195449] MGCP DEBUG INFO at >>mgcp/common/transport/rvmgcpstack.c 1602: >>> SEND: rsip 14389 aaln/2@[10.252.240.2] MGCP 1.0 >>> RM:restart >>> RD:0 >>> >>> Aug 1 23:19:27 [3195450] MGCP DEBUG INFO at >>mgcp/common/transport/rvmgcpstack.c 1143: >>> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >>> X: 2467de76 >>> R: hd(N) >>> >>> Aug 1 23:19:27 [3195450] MGCP DEBUG INFO at >>mgcp/common/transport/rvmgcpstack.c 1143: >>> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >>> X: 2467de76 >>> R: hd(N) >>> >>> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >>mgcp/common/transport/rvmgcpstack.c 1481: >>> SEND: 500 5 Unknown endpoint >>> >>> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >>mgcp/common/transport/rvmgcpstack.c 1143: >>> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >>> X: 2467de76 >>> R: hd(N) >>> >>> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >>mgcp/common/transport/rvmgcpstack.c 1143: >>> RECEIVE: RQNT 6 aaln/2@10.252.240.2 MGCP 1.0 >>> X: 2467de76 >>> R: hd(N) >>> >>> Aug 1 23:19:28 [3195450] MGCP DEBUG INFO at >>mgcp/common/transport/rvmgcpstack.c 1481: >>> SEND: 500 5 Unknown endpoint >>> >>> >>> _______________________________________________ >>> Asterisk-Users mailing list >>> Asterisk-Users@lists.digium.com >>> http://lists.digium.com/mailman/listinfo/asterisk-users >>> To UNSUBSCRIBE or update options visit: >>> http://lists.digium.com/mailman/listinfo/asterisk-users >> >>_______________________________________________ >>Asterisk-Users mailing list >>Asterisk-Users@lists.digium.com >>http://lists.digium.com/mailman/listinfo/asterisk-users >>To UNSUBSCRIBE or update options visit: >> http://lists.digium.com/mailman/listinfo/asterisk-users >> > >_______________________________________________ >Asterisk-Users mailing list >Asterisk-Users@lists.digium.com >http://lists.digium.com/mailman/listinfo/asterisk-users >To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >
Duane Cox
2004-Mar-15 19:12 UTC
[Asterisk-Users] Need help to format asterisk MGCP packet.
I disabled and enabled the voice port on the FTTH device. This is the Asterisk debug output when I enabled it. This debug is with the altered code (chan_mgcp.c) --------------------------------------------------------------- MGCP read: rsip 14406 aaln/1@[63.252.240.2] MGCP 1.0 RM:forced RD:0 from 63.252.240.2:2427MGCP read: rsip 14406 aaln/1@[63.252.240.2] MGCP 1.0 RM:forced RD:0 from 63.252.240.2:2427Verb: 'rsip', Identifier: '14406', Endpoint: 'aaln/1@[63.252.240.2]', Version: 'MGCP 1.0' 3 headers, 0 lines Handling request 'rsip' on aaln/1@63.252.240.2 -- Resetting interface aaln/1@63.252.240.2 Transmitting: 200 14406 OK to 63.252.240.2:2427 -- MGCP Asked to indicate tone: on aaln/1@63.252.240.2-1 in cxmode: inactive Posting Request: RQNT 5 aaln/1@[63.252.240.2] MGCP 1.0 X: 00640f40 R: hd(N) to 63.252.240.2:2427 MGCP read: rsip 14407 aaln/1@[63.252.240.2] MGCP 1.0 RM:restart RD:0 from 63.252.240.2:2427MGCP read: rsip 14407 aaln/1@[63.252.240.2] MGCP 1.0 RM:restart RD:0 from 63.252.240.2:2427Verb: 'rsip', Identifier: '14407', Endpoint: 'aaln/1@[63.252.240.2]', Version: 'MGCP 1.0' 3 headers, 0 lines Handling request 'rsip' on aaln/1@63.252.240.2 Mar 15 20:09:27 NOTICE[-1137189968]: chan_mgcp.c:398 dump_queue: Removing message from aaln/1@63.252.240.2-1 tansaction 5 -- Resetting interface aaln/1@63.252.240.2 Transmitting: 200 14407 OK to 63.252.240.2:2427 -- MGCP Asked to indicate tone: on aaln/1@63.252.240.2-1 in cxmode: inactive Posting Request: RQNT 6 aaln/1@[63.252.240.2] MGCP 1.0 X: 00640f40 R: hd(N) to 63.252.240.2:2427 MGCP read: 200 5 OK from 63.252.240.2:2427MGCP read: 200 5 OK from 63.252.240.2:2427Verb: '200', Identifier: '5', Endpoint: 'OK', Version: '(null)' 1 headers, 0 lines Mar 15 20:09:27 NOTICE[-1137189968]: chan_mgcp.c:1716 handle_response: Got response back on aaln/1@63.252.240.2-1 for transaction 5 we aren't sending? (current = 6) MGCP read: 200 6 OK from 63.252.240.2:2427MGCP read: 200 6 OK from 63.252.240.2:2427Verb: '200', Identifier: '6', Endpoint: 'OK', Version: '(null)' 1 headers, 0 lines
Duane Cox
2004-Mar-15 19:21 UTC
[Asterisk-Users] Need help to format asterisk MGCP packet.
And this is the debug output from the normal chan_mgcp.c CVS from today. ---------------------------------------------------------------- MGCP read: rsip 14412 aaln/1@[63.252.240.2] MGCP 1.0 RM:forced RD:0 from 63.252.240.2:2427MGCP read: rsip 14412 aaln/1@[63.252.240.2] MGCP 1.0 RM:forced RD:0 from 63.252.240.2:2427Verb: 'rsip', Identifier: '14412', Endpoint: 'aaln/1@[63.252.240.2]', Version: 'MGCP 1.0' 3 headers, 0 lines Handling request 'rsip' on aaln/1@63.252.240.2 -- Resetting interface aaln/1@63.252.240.2 Transmitting: 200 14412 OK to 63.252.240.2:2427 -- MGCP Asked to indicate tone: on aaln/1@63.252.240.2-1 in cxmode: inactive Posting Request: RQNT 8 aaln/1@63.252.240.2 MGCP 1.0 X: 14b0e00a R: hd(N) to 63.252.240.2:2427 MGCP read: rsip 14413 aaln/1@[63.252.240.2] MGCP 1.0 RM:restart RD:0 from 63.252.240.2:2427MGCP read: rsip 14413 aaln/1@[63.252.240.2] MGCP 1.0 RM:restart RD:0 from 63.252.240.2:2427Verb: 'rsip', Identifier: '14413', Endpoint: 'aaln/1@[63.252.240.2]', Version: 'MGCP 1.0' 3 headers, 0 lines Handling request 'rsip' on aaln/1@63.252.240.2 Mar 15 20:19:50 NOTICE[-1136878672]: chan_mgcp.c:398 dump_queue: Removing message from aaln/1@63.252.240.2-1 tansaction 8 -- Resetting interface aaln/1@63.252.240.2 Transmitting: 200 14413 OK to 63.252.240.2:2427 -- MGCP Asked to indicate tone: on aaln/1@63.252.240.2-1 in cxmode: inactive Posting Request: RQNT 9 aaln/1@63.252.240.2 MGCP 1.0 X: 14b0e00a R: hd(N) to 63.252.240.2:2427 MGCP read: 500 8 Unknown endpoint from 63.252.240.2:2427MGCP read: 500 8 Unknown endpoint from 63.252.240.2:2427Verb: '500', Identifier: '8', Endpoint: 'Unknown', Version: 'endpoint' 1 headers, 0 lines Mar 15 20:19:50 NOTICE[-1136878672]: chan_mgcp.c:1716 handle_response: Got response back on aaln/1@63.252.240.2-1 for transaction 8 we aren't sending? (current = 9)