-
Notifications
You must be signed in to change notification settings - Fork 932
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
[improvement]: Document EXTEN can include options/parameters for PJSIP #646
Comments
Asterisk doesn't use the To header for the value of EXTEN. It uses the user portion of the request URI. Is there custom dialplan logic involved that accesses the To header to get such a value? |
Sorry, forgot to mention the request URI also contain the same value Yes we have a custom dialplan in our config pointed from the context config parameter. |
I didn't say EXTEN is not supposed to be used for such a thing, I was asking for clarification as your original report did not match how Asterisk actually worked. PJSIP itself is what handles all the parsing at a lower level than us, according to the specifications. Looking at the specifications don't show parameters in the user portion, instead it's just a username, which would explain why they are not parsed out. Looking at some mailing list posts confirm this line of thinking too. I don't think this is a bug but could be an improvement, however changing such behaviour in releases by default could be problematic as individuals may have written custom logic in the dialplan to strip out values from it before extracting just the extension portion and sending the call on its way. |
If the parameters are used for something instead of just stripped out, then yes it could break stuff. Correcting this in the next major version might be an ok solution? |
Actually there is already an pjsip.conf option for this: ignore_uri_user_options |
You'll need to be specific about what documentation you are referring to. |
So you are saying the documentation about that option should be extended to also mention that it covers EXTEN? |
When I read the channel documentation it gives the impression that EXTEN contains the extension only. |
What documentation and wording regarding EXTEN? |
https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/Dialplan_Functions/CHANNEL/ EXTEN - Current extension |
Severity
Minor
Versions
20.*
Components/Modules
chan_pjsip
Operating Environment
Linux x64
Frequency of Occurrence
Constant
Issue Description
Incoming calls having userinfo parameters in the To-header are not parsed by Asterisk.
This causes Asterisk to set the read-only channel variable EXTEN to wrong value
Example:
To: sip:+1234;bla=ble;more@example.com;transport=tcp
Relevant log output
Asterisk Issue Guidelines
The text was updated successfully, but these errors were encountered: