We've a SIP Trunk and we're receiving 994X digits. The calls establish successfully, but the calling arrives in the destination as "unknown".
The result of the trace:
<--- SIP read from UDP:10.192.4.188:5060 --->
INVITE sip:9940@10.192.230.231:5060 SIP/2.0
Via: SIP/2.0/UDP 10.192.4.178;branch=z9hG4bK766a.5a652c6ff1dcbe13d2a9d2a59b38caf9.0
Via: SIP/2.0/UDP 192.168.111.250:5080;branch=z9hG4bK15fe7331;rport=5080
Max-Forwards: 69
From: "Rui Santos" <sip:1432@gt.ipphone.molde.pt>;tag=as261eb33b
To: <sip:9940@10.192.230.231:5060>
Contact: <sip:1432@10.192.4.178:5060>
Call-ID: 594384fc2fd8eeac4d61d52e4353f718@gt.ipphone.socem.pt
CSeq: 102 INVITE
User-Agent: IPBrick
Date: Tue, 27 Nov 2018 17:40:49 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
P-Asserted-Identity: <sip:1432@10.192.230.231>
Content-Type: application/sdp
Content-Length: 247
In my extensions.conf:
exten => _9XXX,1,Ringing()
exten => _9XXX,2,Dial({TRUNKSAGRES}/{EXTEN},180,tT)
exten => _9XXX,3,Hangup()
I’ve changed it without success to the following:
exten => _9XXX,1,Ringing()
exten => _9XXX,2,Set(CALLERID(num)={SIP_HEADER(P-Asserted-Identity)})
exten => _9XXX,3,SipAddHeader(P-Asserted-Identity: {CALLERID(num)})
exten => _9XXX,4,Dial({TRUNKSAGRES}/{EXTEN},180,tT)
exten => _9XXX,5,Hangup()
I do not know what to do to pass the calling number …