Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds -x parameter which allows for sip header to radius attributes #38

Closed
wants to merge 1 commit into from

Conversation

twmobius
Copy link
Contributor

This PR adds a new parameter (-x) in the b2bua_radius.py script which allows for the user to specify a SIP Header from which b2bua reads radius attribute/value pairs from. The pairs are being added to the authentication request being created from b2bua.

See related issue #37

…t b2bua reads and add's it's contents as radius attribute/ value pairs
sobomax pushed a commit that referenced this pull request Jul 31, 2024
a routine (a class really) that B2BUA will execute after call controller
is initialized but before any actions are taken.

Examples of such routine is one that extracts a specific header,
does some simple parsing and adds its contents as radius attribute/value
pairs.

The syntax for that routine would be something like the following:

  --pre_auth_proc=HDR2Xattrs[X-foo-hdr]

PR: #38
@sobomax
Copy link
Member

sobomax commented Aug 1, 2024

Hey, @twmobius thanks for the idea and sorry for the delay. I have been bit overloaded with other projects and stuff. I liked the idea, but the way it parses a header is bit too "generic" (read hackish), so I would not like to see that in the main b2bua loop. So I extended the original idea and allowed an arbitrary transformation/pre-conditioning routine to be run before we handle over INVITE to the UA stack for processing. This should allow to have all sorts of weird and wonderful things that you and other may suggest as being useful to have. So your original use case would be --pre_auth_proc=HDR2Xattrs[X-Test-Header]

@sobomax sobomax closed this Aug 1, 2024
@twmobius
Copy link
Contributor Author

twmobius commented Aug 1, 2024

Hi @sobomax! That's great news, thanks for taking the time! You know, the way you approached the problem could be the start of a plugin subsystem inside b2bua that could allow for arbitrary modification of SIP/ Radius requests (like middlewares or via events - hooks) without having to explicitly accommodate for every weird case out there.

sobomax added a commit that referenced this pull request Aug 5, 2024
pre-call-originate ("po_proc") routine to do various
conditioning, such is in this case appending arbitrary
attributes into accounting request. 3 such functions are
provided:

- VAL2Xattrs: append to both originate and answering accounting
  requests;
- VAL2XattrsO: append to originate request only;
- VAL2XattrsA: append to answering request only.

PR: #38
sobomax added a commit that referenced this pull request Aug 7, 2024
pre-call-originate ("po_proc") routine to do various
conditioning, such is in this case appending arbitrary
attributes into accounting request. 3 such functions are
provided:

- VAL2Xattrs: append to both originate and answering accounting
  requests;
- VAL2XattrsO: append to originate request only;
- VAL2XattrsA: append to answering request only.

PR: #38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants