Call-Id field in SIP Register Packet

I am having trouble registering a trunk with my service provider from my asterisk box, but I am able to use an ATA to register to my provider.

I have been doing “wireshark” captures of the SIP Registrations between the ATA and my provider and the Asterisks box and my provider and the difference I have noticed is the Call-Id line in the To section of the SIP packets are different.

The Call-Id line of my ATA has @MyPublicIpAddress and the Call-Id line of my Asterisks box is @

Can someone explain to me why my Asterisks box is adding the @ to the Register packet, and how I might be able to modify that to reflect a different ip address.

I have tried using the “externhost” option in my SIP.CONF file, but that make any difference with the Call-Id line of the Register Packet.

Any help you can provide would be greatly appreciated.

try “externip=” instead of “externhost=”

externhost might prove unreliable for many reasons…

  1. if your DNS server is unavailable when asterisk loads, it will fail
  2. if your DNS query times out for any other reason when asterisk loads, it will fail
  3. If the DNS responses gives multiple A records as a response, I have no idea what it will do, but its probably bad
  4. if you have a ‘hosts’ entry that is making that DNS name resolve to localhost ( which is probably your case… then you are not going to get the proper IP.

of course the downside of externip is that if you are on a dynamic IP, this is going to become a little troublesome… though i seem to remember reading awhile ago that somebody had created a script that would make asterisk restart/reload whenever an IP change is detected… haven;t had the need to run on a dynamic IP myself tho, so not sure how you’d handle it.

You probably also want to set “localnet=”