Giter VIP home page Giter VIP logo

Comments (11)

jcolp avatar jcolp commented on June 14, 2024

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?

from asterisk.

jay293874 avatar jay293874 commented on June 14, 2024

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.
Outputting the value of EXTEN in this dialplan gives this wrong value.
If the dialed extension is not supposed to be taken from EXTEN, then what is ?

from asterisk.

jcolp avatar jcolp commented on June 14, 2024

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.

from asterisk.

jay293874 avatar jay293874 commented on June 14, 2024

If the parameters are used for something instead of just stripped out, then yes it could break stuff.
I believe the Asterisk documentation is somewhat clear on that EXTEN is supposed to be the value of the extension only. So not the same as the "user part". I am guessing this can break some of the other Asterisk functions taking extension as parameter if exten is not the extension only.
The user parameters are nevertheless available from PJSIP_PARSE_URI.

Correcting this in the next major version might be an ok solution?

from asterisk.

jay293874 avatar jay293874 commented on June 14, 2024

Actually there is already an pjsip.conf option for this: ignore_uri_user_options
Perhaps add a comment to exten in the documentation only then.

from asterisk.

jcolp avatar jcolp commented on June 14, 2024

You'll need to be specific about what documentation you are referring to.

from asterisk.

jay293874 avatar jay293874 commented on June 14, 2024

https://docs.asterisk.org/Asterisk_18_Documentation/API_Documentation/Module_Configuration/res_pjsip/#ignore_uri_user_options

from asterisk.

jcolp avatar jcolp commented on June 14, 2024

So you are saying the documentation about that option should be extended to also mention that it covers EXTEN?

from asterisk.

jay293874 avatar jay293874 commented on June 14, 2024

When I read the channel documentation it gives the impression that EXTEN contains the extension only.
Since it does not, I would adjust the wording to mention that it contains the entire user part by default.

from asterisk.

jcolp avatar jcolp commented on June 14, 2024

What documentation and wording regarding EXTEN?

from asterisk.

jay293874 avatar jay293874 commented on June 14, 2024

https://docs.asterisk.org/Asterisk_20_Documentation/API_Documentation/Dialplan_Functions/CHANNEL/

EXTEN - Current extension

from asterisk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.