How to authenticate call by Contact IP address, not by From?

Discuss any topic about Brekeke SIP Server.

Moderator: Brekeke Support Team

Post Reply
uhupfeld
Posts: 77
Joined: Sat Nov 08, 2008 12:15 pm
Location: Brazil

How to authenticate call by Contact IP address, not by From?

Post by uhupfeld »

1. Brekeke Product Name and Version:
BSS3 Standard
2. Java version:

3. OS type and the version:
Win7 SP1
4. UA (phone), gateway or other hardware/software involved:
SIPPulse SIP Proxy
5. Your problem:
I made a dial plan rule to authenticate calls using a prefix and an originating IP address (150.150.150.150). The calls work as long as they come from that IP address, but since it is a proxy, many times the originating IP is the one that is sending the calls to that proxy. As a result, in the INVITE I have an unauthorized IP (50.50.50.50) in the From: field. But the Contact field is always the authorized IP (150.150.150.150).
How do I make it check authorization based on Contact field, not From field?

Session Initiation Protocol (INVITE)
Request-Line: INVITE sip:1071155563999765836@[b]200.200.200.200[/b] SIP/2.0
Method: INVITE
Request-URI: sip:1071155563999765836@[b]200.200.200.200[/b]
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP 200.71.77.18:5060;branch=z9hG4bKb967.69e83111.0
From: <sip:4625559999@50.50.50.50>;tag=Z8T8juHJB6MHE8nhyQejBhPEmJ163wAq
To: <sip:1071155563999765836@[b]200.200.200.200[/b]>
Call-ID: 3f3d4320ba6811e785ff1866da5cd185@[b]50.50.50.50[/b]
CSeq: 1 INVITE
Contact: <sip:[b]150.150.150.150[/b];did=466.25861e73>
Content-Type: application/sdp
Max-Forwards: 68
User-Agent: TS-v4.6.0-14b
Cisco-Guid: 1059887408-3127382503-2248087654-3663516037
Content-Length: 281
Niloc
Posts: 70
Joined: Tue Sep 19, 2017 9:49 pm
Location: NL

Post by Niloc »

Like this

Code: Select all

$gethost(Contact) = ^150.150.150.150$
uhupfeld
Posts: 77
Joined: Sat Nov 08, 2008 12:15 pm
Location: Brazil

Post by uhupfeld »

Thanks, that worked!
Post Reply