How to pass CLID from Grandstream HT503 to freePBX

Grandstream receive call from FXO port and forward unconditionally to FreePBX Asterisk server.
How can I configure to pass CLID?
Thanks

I don’t have an HT503, but have this working with both SPA3102 and OBi110.
See http://www.logiciel-libre.org/book/export/html/341 . If you still have trouble, post details of problem.

Yes, still problems.
in the ATA HT503 I configure to send CLID in SIP from.
but on phones I still see ‘user1’, ‘user1’

Trunk name: pstngateway
PEER details:
context=from-trunk
host=xxx.xxx.xxx.xxx ip freepbx
insecure=very
qualify=yes
secret=
type=friend
username=user1

Incoming serttings:
User context: from-pstngateway
username=user1
type=user
srvlookup=yes
secret=
real=xxx.xxx.xxx.xxx ip freepbx
nat=yes
insecure=very
host=xxx.xxx.xxx.xxx ip frepbx
fromdomain=xxx.xxx.xxx.xxx ip frepbx
canredirect=no
canreinvite=yes

Check that your FXO port settings include:
Caller ID Transport Type: Relay via SIP From
Look at the INVITE request received from the HT503 and check whether the From: header has the caller ID. If not, use syslog to see whether the caller ID is being detected by the HT503. If not, check that the caller ID scheme and related settings are correct for your country. If applicable for your country, confirm that Number of Rings is set properly. If no luck, connect a standard phone to the line in question to confirm that the central office or other device is sending caller ID.

Hello All,

ran into the same issue and was able to resolve it by setting canreinvite=no

here is the extension for the FXO port in sip.conf
[100]
type=peer
secret=1234
host=dynamic
context=ata-in
canreinvite=no
qualify=yes
disallow=all
allow=ulaw

and my extensions.conf
[internal]
exten => 101,1,Dial(SIP/101)
exten => 201,1,Dial(SIP/201)
exten => 202,1,Dial(SIP/202)
exten => 203,1,Dial(SIP/203)
exten => 204,1,Dial(SIP/204)
include => ata-out

[ata-in]
exten => 100,1,Goto(inbound,s,1)

[ata-out]
exten => _X.,1,Dial(SIP/${EXTEN}@100)
exten => _X.,n,Playtones(congestion)
exten => _X.,n,Congestion(10)
exten => _X.,n,HangUp