Connect two Asterisk servers but maintain CID between them

I have two Asterisk servers connect to each other. One has extensions 6000-6999 and the other extension 7000-7999. I also created two “users” for the registration: a 7000 in the first one and a 6000 in the second. When extension 6100 calls extension 7001, the latter sees that there is a calling from extension 6000 (Server A). Is there a way for maintaining the caller ID of the other server? I worked for a large group that had several PBX (Nortel Meridian) across the country and it worked like that? Must I have a central database / LDAP?

That shouldn’t be. It should have “just worked.”

Without seeing what you have in the sip.conf its hard to say.

Ian

It now works because I changed from IAX2 to SIP… BTW, I’m using Asterisk 1.4.1, so all the configurations go to the users.conf file.

I’ve been searching for some examples of how to do this and it seems that no one has done this on the new 1.4 branche…
What I discovered from some testing, considering that I have two servers, SERVER_A and SERVER_B:
In users.conf I must create two users, an extension and a trunk.
In SERVER_A:
[SERVER_A]
secret = password
context = numberplan-custom-1
hassip = yes
registersip = yes
host = dynamic
fullname =

[trunk_1]
host = SERVER_B_IP
username = SERVER_B
secret = password
hassip = yes
registersip = yes
context = DID_trunk_1
etc… (the trunk is created by Asterisk-GUI as a Service Provider)

in sip.conf

register => SERVER_B:password@SERVER_B_IP ;the host is dynamic

In SERVER_B it’s the opposite, as normal.

Using this setup I have the other party Name and Extension on my Phone display.

BUT:
If I use IAX2 instead of SIP I see “Incoming Call” and “asterisk” instead of the other party name and Caller ID.
Is there something that I am missing?

is
sendrpid=yes

in you sip.conf ? [/quote]

Sorry for asking this, but isn’t sip.conf only for sip connections? I’m having problems using IAX2. With SIP it’s OK.