3rd party authenticaion and accounting

Discuss any topic about Brekeke PBX.

Moderator: Brekeke Support Team

Post Reply
tranquilnet
Posts: 54
Joined: Tue May 18, 2010 9:00 pm
Location: San Diego, CA

3rd party authenticaion and accounting

Post by tranquilnet »

1. Brekeke Product Name and version:

Brekeke PBX, Version 2.4.3.9 , Multi-Tenant

2. Java version:

N/A

3. OS type and the version:

Windows 2008 R2 Server


4. UA (phone), gateway or other hardware/software involved:

N/A

5. Select your network pattern from http://www.brekeke-sip.com/bbs/network/ ... terns.html :

Pattern 9

6. Your problem:

We utilize a 3rd party authentication and accounting software called RadiusCAT from SVK Software.

We would like to accomplish the following:

1) Use the Brekeke PBX to modify the "To" DID information for an incoming call.

For example, we have am incoming call for +18885551212.

sip:+18885551212@sip.ourdomain.com:5060

For accounting purposes, we want to remove the +1 form the data that is sent to our 3rd party authentication and accounting software.

sip:8885551212@sip.ourdomain.com:5060

Can this be done in the Brekeke ARS/DialPlan rules? If so, how? If not, where else could this be accomplished?

2) Use Brekeke PBX ARS/DialPlan rules to send only accounting information for incoming/outgoing calls for one of our SIP Trunk Providers to our 3rd party accounting and authentication software. All other SIP Trunk provider accounting records will NOT be sent to the 3rd party accounting and authentication software .

Can this be done in the Brekeke ARS/DialPlan rules? If so, how? If not, where else could this be accomplished?

Thanks,

-Will
------
William Traenkle
www.tranquilnet.com
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

1) dial plan
matching
$request=^INVITE
To= sip:+18885551212@sip.ourdomain.com

deploy:
To=sip:8885551212@sip.ourdomain.com
$session=com.sample.radius.proxy.RadiusAcct
$continue = true

2) dial plan
A. outgoing
matching
$request=^INVITE
$port=^15062
$localhost=^true
To = sip:.+@provider_IP

deploy:
$session=com.sample.radius.proxy.RadiusAcct
$continue = true

B. incoming
matching
$request=^INVITE
$addr = provider_souce_IP

deploy:
$session=com.sample.radius.proxy.RadiusAcct
$continue = true

put the above dial plan on top of others
and disable the current dial plan with radius access
if 1 and 2 are for the same provider, combine them
tranquilnet
Posts: 54
Joined: Tue May 18, 2010 9:00 pm
Location: San Diego, CA

Post by tranquilnet »

Thanks! I appreciate your quick reply. I will test it out and get back to you. And yes, it will be for the same provider.
------
William Traenkle
www.tranquilnet.com
tranquilnet
Posts: 54
Joined: Tue May 18, 2010 9:00 pm
Location: San Diego, CA

Post by tranquilnet »

UPDATE:

I have done some testing and below are my results:

1) I was able to get this to work. Thanks! Below is the dial plan I created to remove the +1 from incoming calls:

Matching Patterns:

$request=^INVITE
$addr=CARRIER_IP
To=sip:(?:\+1|1)(.+)@

Deploy Patterns:

$target=127.0.0.1:15060
$transport=udp
$b2bua=true
$auth=false
$session=com.sample.radius.proxy.RadiusAcct
To=%1@MY_SIP_DOMAIN


2) I was not able to get this to work. The reason being is that outgoing calls seem to be a two step process. The first step is the portion of the call that that I need the accounting information to be sent to our 3rd party software, however, the second part of the call includes the information needed to distinguish what carrier is terminating the call per our ARS rules.

For example:

- user 10002704 dials the number 18585551212

PART ONE - DIAL PLAN THAT IS MATCHED:

Matching Pattern:
$request=^INVITE
$registeredsender=^true

Deploy Pattern:

$target=127.0.0.1:15060
$transport=udp
$b2bua=false
$auth=false
&net.sip.fixed.addrport.uac=true

Active Session From:

sip:10002704@MY_SIP_DOMAIN
(76.88.23.48:6704)

Active Session To:

sip:18585551212@MY_DIP_DOMAIN
(127.0.0.1:15060)


PART TWO - DIAL PLAN THAT IS MATCHED:

Matching Pattern:

$port=^15062
$localhost=^true
$request=^INVITE
$outbound=^true

Deploy Pattern:

$auth=false
&net.sip.hide.loopback=true
$b2bua=true
X-PBX-Param=

Active Session From:

sip:MY_OUTGOING_DID@MY_SIP_DOMAIN:5060
(127.0.0.1:15062)

Active Session To:

sip:CARRIER_ACCOUNT#18585551212@CARRIER_DOMAIN
(CARRIER_IP)


Any ideas?

Thanks,

-Will
------
William Traenkle
www.tranquilnet.com
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

There should be two sessions for each call through pbx

do all calls need radius or only the call from/to this provider?

if use radius accounting for all calls put line $session=com.sample.radius.proxy.RadiusAcct
in default dial plan "To PBX" deploy pattern

if use only for this provider, create another dial plan
matching
$request=^INVITE
To = sip:<pstn_number_pattern>@

deploy:
$session=com.sample.radius.proxy.RadiusAcct
$continue = true

and put it just above default dial plan "To PBX"
need to change <pstn_number_pattern> to the regular expression to only match dialing numbers of pstn call
like if call to this provider need to have a fixed prefix 001, then change To = sip:001.+@
tranquilnet
Posts: 54
Joined: Tue May 18, 2010 9:00 pm
Location: San Diego, CA

Post by tranquilnet »

Thanks for you reply, however, after testing I do not see how I can make this work. I could use your assistance further.

The problem I am running into is that I am unable to specify a unique number for my clients/extensions to dial that differentiates carrier A from carrier B. Currently, all users must dial a 1 then the 10 digit number to call US and Canada. Therefor, all numbers dialed look like18585551212.

I have ARS rules setup that all calls withing a max session range are terminated via Carrier A and calls that exceed this max session range are Terminated via Carrier B. This match seemed to be done on the second session of the two sessions of a call when dialed. Is there another way I can send session 1 of the two session call to the radius server if my clients/extensions are dialing the same prefix for outbound calls?

Thanks in advance.
------
William Traenkle
www.tranquilnet.com
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

create a dial plan and put it just above default dial plan "To PBX"

matching
$request=^INVITE
To = sip:1[0-9]{10}@

deploy:
$session=com.sample.radius.proxy.RadiusAcct
$continue = true
tranquilnet
Posts: 54
Joined: Tue May 18, 2010 9:00 pm
Location: San Diego, CA

Post by tranquilnet »

Thanks, however, I am not clear on how this rule will distinguish which carrier the call is being terminated through as this logic happens in the ARS rules after this dial plan is matched from my understanding. Am I missing something?

From what I see in your example, it will match all outgoing calls terminated to both of our carriers. My problem is that I only want calls terminated to carrier B to be sent to accounting and not calls that are terminated with carrier A. Does that make sense?

Thanks!

-Will
------
William Traenkle
www.tranquilnet.com
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

ok, now i know what you need

delete that dial plan and create a new one as below
matching
$port=^15062
$localhost=^true
$request=^INVITE
To = sip:(.+)@carrierB_IP

deploy
$auth=false
$session=com.sample.radius.proxy.RadiusAcct
&net.sip.hide.loopback=true
$b2bua=true

put this one on top all current dial plans whose name include "From PBX ..."
tranquilnet
Posts: 54
Joined: Tue May 18, 2010 9:00 pm
Location: San Diego, CA

Post by tranquilnet »

Thanks for your reply.

I created the "To PBX from Carrier A" rule as you described and I am able to get it to match correctly. The problem is that this match is a match for the second session of the two part call and I need to match the first session of the call.

Session Details (PART 1) *I need to match this part of the call only for calls that are terminated via carrier A and not carrier B.

EX-SID 5
From-uri sip:<account_id>@<our_sip_server_domain> [behind NAT]
From-ip <phone_ip>:6704 (UDP)
From-if <our_sip_server_ip>:5060
To-uri sip:<DID>@<our_sip_server_domain>
To-ip 127.0.0.1:15060 (UDP)
To-if 127.0.0.1:5060
Call-ID 5815373cebb3-le1wcfqo8xjm
rule To PBX 1
plug-in InviteSession
sip-packet-total 7
listen-port 5060
session-status Talking
time-inviting Mon Jan 03 21:09:51 PST 2011
time-talking Mon Jan 03 21:09:57 PST 2011
length-talking 00:00:04
rtp-relay on
rtp-srcdst
media audio
transport RTP/AVP
payload 0 (PCMU/8000)
status active
listen-port 10936
send-port 10930
target 127.0.0.1:11982
packet-count 261
packet/sec 52
current size 172
buffer size 260
rtp-dstsrc
media audio
transport RTP/AVP
payload 0 (PCMU/8000)
status active
listen-port 10930
send-port 10936
target <phone_ip>:63252
packet-count 260
packet/sec 26
current size 172
buffer size 260


Session Details (PART 2) *I can match this one per carrier but this is not the part that I need to send accounting data for:

EX-SID 6
From-uri sip:<caller_id_DID>@<our_sip_server_domain>:5060
From-ip 127.0.0.1:15062 (UDP)
From-if 127.0.0.1:5060
To-uri sip:<carrier_account>#<did>@sip.carrierA.com
To-ip <unknown_ip> (UDP)
To-if <our_sip_server_ip>:5060
Call-ID aa7f2f8d-d08ab1f7-ae408235-c3c215ff@x.x.x.x
rule From PBX to Carrier A
plug-in InviteSession
sip-packet-total 5
listen-port 5060
session-status Talking
time-inviting Mon Jan 03 21:09:51 PST 2011
time-talking Mon Jan 03 21:09:57 PST 2011
length-talking 00:00:33
rtp-relay on
rtp-srcdst
media audio
transport RTP/AVP
payload 0 (PCMU/8000)
status active
listen-port 10934
send-port 10932
target <unknown_ip>:35824
packet-count 1716
packet/sec 50
current size 172
buffer size 260
rtp-dstsrc

The issue is that I do not see any carrier specific data in Part 1 to do a match. Do you have any other ideas?

Do I need to modify our ARS rules or can I create a single Dial Plan rule that looks at both parts of the call, part 1 and part 2?

Thanks,
------
William Traenkle
www.tranquilnet.com
hope
Posts: 862
Joined: Tue Jan 15, 2008 4:08 pm

Post by hope »

if you can tell the calls for different carriers, can use dial plan to apply radius for the first part of the call
if use radius accounting on the part 2 of the call makes you cannot know the caller for billing, you can edit ARS for carrier to pass the user to radius and remove the user from From header in the dial plan.
it is better ask svk support about how to pass pbx user to svk radius
tranquilnet
Posts: 54
Joined: Tue May 18, 2010 9:00 pm
Location: San Diego, CA

Post by tranquilnet »

Thanks for your quick reply. I just received an email from SVK today about a new release of their software that may resolve the issue. I will keep you posted. Thanks for your assistance.
------
William Traenkle
www.tranquilnet.com
Post Reply