Unable to debug core files generated by production server

I am building asterisk in below steps:

building asterisk rpm in compilation box

  1. ./configure --prefix=/VALID/PATH/
  2. make && make all install
  3. build the rpm of /VALID/PATH/asterisk/
    Installed this rpm in production server

Service is running perfectly in production server.

After some time (hours/days) service got crashed.
Then kernal generates core.pid file.
I can able to debug the core files in production server, but unable to debug the same core file compilation box. So what could be the issue?

I think isn’t good practice to debug core file in production server.

Other details:
Both production & compilation servers are running with same CentOS version.
Installed same version of gdb, gdbm, gdbm-devel in both machines using yum install.

When i try to debug core file in compilation box, am getting frames as “???” symbols.
Is it possible to debug the core file in other machine with same executable ?

Yes, although you will need the same versions of all the system libraries as well, if you want library calls to make sense.