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

Access Request-Line-URI values #120

Open
deba1234 opened this issue May 8, 2018 · 2 comments
Open

Access Request-Line-URI values #120

deba1234 opened this issue May 8, 2018 · 2 comments

Comments

@deba1234
Copy link

deba1234 commented May 8, 2018

Hi guys,

first of all, you are doing great work with this library. 👍

I don't know is this a feature or issue but i want to share my observation

Currently i am working on simple SIP redirect server and i need to access R-URI values (after INVITE method). I can see in the code that R-URI is the same as To fields without display name.

Also, i had discussion with some experts on this topic and they said that in some cases R-URI could have different value than To.

Is it possible, in current solution, to access real R-URI value of request message ?

BR

@ovv
Copy link
Contributor

ovv commented May 8, 2018

Hello,

first of all, you are doing great work with this library. +1

Thanks for the kind words.

The R-URI is built from the To headers when the first line is missing (See https://github.com/Eyepea/aiosip/blob/master/aiosip/message.py#L259). For an incoming message the message._first_line attribute correspond to the first line of the decode headers (https://github.com/Eyepea/aiosip/blob/master/aiosip/message.py#L230), you should be able to get the R-URI from that.

A PR exposing it in the message API would be welcome :)

@deba1234
Copy link
Author

deba1234 commented May 8, 2018

Hi ,
thanks for quick answer. Yes, i found message._first_line attribute and that is solving my problem.
Don't worry PR is guaranteed :)

BR

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

No branches or pull requests

2 participants