I have been struggling with this for a while and can not seem to find the solution. I admit this is Elastix, but months now and no answer so I thought I would try here
Asterisk 1.8 (LAN 1)
SPA 3000 connected to PSTN line (LAN 2)
asterisk and SPA communicate over the interent, and SPA 3000 registers to asterisk for inbound and outbound calls via PSTN connection on SPA3000
All works perfectly except when I receive a call I wait 2 seconds so the SPA gets the caller ID before sending the call over the internet to asterisk, which I can see in the SIP header below the caller ID is present.
At the point the call goes to the ring group it appears with the extension caller ID 5010 in this case . I have looked at various methods to bypass this and get the original caller ID to pass which is available in the “from” as well as “Remote Party ID” fields.
It must be relatively simple to bypass this and assert the inbound caller ID. Perhaps I need to swap the caller ID? I think because asterisk sees that device as registered it will overwrite the caller id with the extension.
I have a very simple dial string at present delivering those calls to a ring group. This was to defeat any caller ID manipulation from Elastix/freepbx. I have tried MANY dial strings. I always get 5010 displayed no matter what I try
[from-spa]
exten => 2222222,1,Set(CALLERID(name)=${CUT(CALLERID(number),@,1)})
exten => 2222222,n,Dial(local/600@from-pstn)
exten => 2222222,h,Hangup
SIP/2.0 200 OK
Via: SIP/2.0/UDP 187.211.xxx.xxx:5066;branch=z9hG4bK-bd7e388c;received=187.211.xxx.xxx;rport=5066
From: 5010 sip:1111111@xxx.xxx.xxx.xxx;tag=7bd238ebe1ac27cco1
To: sip:2222222@xxx.xxx.xxx.xxx;tag=as0c4b034f
Call-ID: c2b0fa97-ed3e7210@187.211.xxx.xxx
CSeq: 102 INVITE
Server: FPBX-2.8.1(1.8.20.0)
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH
Supported: replaces, timer
ontact: sip:2222222@xxx.xxx.xxx.xxx:5060
Content-Type: application/sdp
Content-Length: 267