Brekeke Forum Index » Brekeke SIP Server Forum

Post new topic   Reply to topic
How to authenticate call by Contact IP address, not by From?
Author Message
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Thu Oct 26, 2017 10:08 am    Post subject: How to authenticate call by Contact IP address, not by From? Reply with quote

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
Back to top
View user's profile
Niloc
Brekeke Talented


Joined: 19 Sep 2017
Posts: 70
Location: NL

PostPosted: Thu Oct 26, 2017 10:54 am    Post subject: Reply with quote

Like this
Code:
$gethost(Contact) = ^150.150.150.150$
Back to top
View user's profile
uhupfeld
Brekeke Talented


Joined: 08 Nov 2008
Posts: 77
Location: Brazil

PostPosted: Tue Nov 28, 2017 6:22 pm    Post subject: Reply with quote

Thanks, that worked!
Back to top
View user's profile
Display posts from previous:   
Post new topic   Reply to topic    Brekeke Forum Index » Brekeke SIP Server Forum All times are GMT - 7 Hours
Page 1 of 1