I haven't paid much attention to this since the callerid was still there, but basically since we moved from the SPA9k to the Quadro, incoming calls are suddenly presented with two callerids..
For one I have the following incoming call
Code:
INVITE sip:41225500341@213.221.204.17:5060 SIP/2.0
Record-Route: <sip:91.121.66.202;ftag=63885f192ad2eaec03a1eb5b525ea6c8; lr>
Via: SIP/2.0/UDP 91.121.66.202;branch=z9hG4bK2c17.b3d2bbc587c8f8b813e7d0e5d00 89612.0
Via: SIP/2.0/UDP 91.121.66.202:5061;branch=z9hG4bKa7ab22096067004fbca9256b7c5 ab76a;rport=5061
Max-Forwards: 16
From: <sip:+41774085250@91.121.66.202>;tag=63885f192ad2eaec0 3a1eb5b525ea6c8
To: <sip:41225500341@91.121.66.202>
Call-ID: FC07E61F-8CA511DC-9610C473-6CE0709@146.188.127.1
CSeq: 200 INVITE
Contact: Anonymous <sip:91.121.66.202:5061>
which is forwarded to the phone as follows
Code:
INVITE sip:56@192.168.1.100:5065 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;rport;branch=z9hG4bKEPSVBUS0d981c75-f4b2-4 94d-a0b0-cd0cd8679bbf
To: <sip:56@192.168.1.10>
From: "+41774085250@91.121.66.202" <sip:41774085250@91.121.66.202>;tag=119323614350ce1674 -a66d-4f7c-8781-24bc8bab3086
CSeq: 995 INVITE
Call-ID: 69ebd86d-750f-408d-83c1-04c5e3b6c322...ygi-config.com
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, UPDATE
Contact: "+41774085250@91.121.66.202" <sip:41774085250@192.168.1.10:5060>
Note that both the From and Contact contain a full SIP URI, not only the caller ID.
I figured I'd need filtering based on callerid on my inbound call routing rule, but I need to be able to strip away anything before that @ and the position of the @ is dynamic, so how I can I write the rule so that it cuts off anything that's not the callerid.
Here's another example from another IPTSP:
Code:
INVITE sip:0344220351@213.221.204.17:5060 SIP/2.0
Via: SIP/2.0/UDP 62.65.128.62:5060
Via: SIP/2.0/UDP 62.65.128.61:5060;branch=z9hG4bKdf999a29bc2dd821fda491e1
Max-Forwards: 69
From: <sip:0774085250@62.65.128.62>;tag=df999a29bc9a5db2fda4 91e3
To: <sip:0344220351@62.65.128.62>
Call-ID: df999a29bcc39250fda491e0@62.65.128.61
CSeq: 1 INVITE
User-agent: Netstream VoIP Gateway
Contact: <sip:gw01netvoip@62.65.128.62:5060>
And this is what is sent to the phone:
Code:
NVITE sip:30@192.168.1.108:5063 SIP/2.0
Via: SIP/2.0/UDP 192.168.1.10:5060;rport;branch=z9hG4bKEPSVBUSea5ce276-5023-4 978-a41f-ed4734300c4a
To: <sip:30@192.168.1.10>
From: "0774085250@62.65.128.62" <sip:0774085250@62.65.128.62>;tag=11932361437ce6036e-e be6-4992-97c1-6710b6938d52
CSeq: 548 INVITE
Call-ID: af8e5cc6-837f-4175-af83-c1337933184f...ygi-config.com
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, INFO, SUBSCRIBE, NOTIFY, REFER, MESSAGE, UPDATE
Contact: "0774085250@62.65.128.62" <sip:0774085250@192.168.1.10:5060>
Here the provider uses national numbers (or international ones for incoming calls from an location outside the country), but once again the length of the callerid is not fixed, so I can't just strip away X digits.
IIrc, the SPA9k would send
Code:
From: "0774085250" <sip:0774085250@62.65.128.62>;tag=11932361437ce6036e-e be6-4992-97c1-6710b6938d52
instead of
Code:
From: "0774085250@62.65.128.62" <sip:0774085250@62.65.128.62>;tag=11932361437ce6036e-e be6-4992-97c1-6710b6938d52
thus resulting in showing only the callerid upon the incoming call (plus the number be completed with a name if the phone's phonebook contains the number in question.. we have an extensive phonebook in most of our phones). How do I get this behavior back?
Edited by: ssteiner