cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1205
Views
3
Helpful
5
Replies

Finding Ports on a VG gateway using SQL

stephan.steiner
Spotlight
Spotlight

Hi

I'm pulling my hair out here.. I have a VG310 in my CUCM. However, I cannot seem to find the corresponding device in the CUCM database. I figure the device table would be the most promising, with tkclass = 2 (as it's an MGCP Gateway), but it contains my configured ports on the analog card, but not the gateway itself. I guess I could parse the name string and the part after the @ is the gateway name, but I'd really like to know how to list the gateways (I then expect to use that information to list ports per gateway).

I can find the analog ports just fine (analogaccess table), they link to a device again, but no link back as to which module and gateway they are from.

Does anybody know where those VG gateways are stored in the database?

Thanks

1 Accepted Solution

Accepted Solutions

Yup, that works. And for those wondering how to get further.. the table mgcpdevicemember links the gateway (found in mgcp table) to the device (the actual ports of the vg). So I finally have the full picture.

View solution in original post

5 Replies 5

npetrele
Cisco Employee
Cisco Employee

The VGs are stored in the device table.  However, they're not stored by the obvious name, so it's easy to think they're not stored in that table.

There's probably an easier way to do this, but here's how I determine the name.  Do a Device->Gateway and then Find. Select your gateway and then click "Apply Config".  Here's a sample of what you'll see (below).  There's the device name, right there - in this case, AN0506070809FFF.  So you can find it in the device table with select * from device where name="AN0506070809FFF"; Then, if needed, you can use the pkid (or other IDs) to find related information in other tables. 

gatewayconfig.png

applyconfig.PNGUmm... if I do that, it looks like this. And I suspect if you do a select * from device where name = 'AN...' you'll see something. The gateway should be listed with the product type and model in the db.. if I search by those properties, I should see an entry.. but tthere's nothing and that really has me confused.

Ah, okay, so it doesn't work for a VG310.  It worked for a VG224.  Ok, I'm looking into it, and I'll get back to you asap. 

Do a select * from mgcp.  You'll see your gateway and its pkid there.  You can find out more information from mgcpslotconfig, where mgcpslotconfig.fkmgcp=mgcp.pkid. 

Yup, that works. And for those wondering how to get further.. the table mgcpdevicemember links the gateway (found in mgcp table) to the device (the actual ports of the vg). So I finally have the full picture.