-
Notifications
You must be signed in to change notification settings - Fork 774
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
Add option to use PT number of telepone-event on local offer if no answer is provided #3661
Closed
Closed
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this approach sounds hackish because tel-event PT is basically a dynamic PT, which may change between calls or even between SDP offer/answer in the same call (e.g: when codecs are enabled/disabled).
If we want to accept DTMF when remote SDP answer does not specify it in its SDP, perhaps a better approach is to handle it in the SDP negotiation (i.e: do not remove it from the local offer). Then perhaps introduce a config setting for enabling/disabling this behaviour.
Another idea is to allow app overriding
si->rx_event_pt
via PJSUA callbackon_stream_precreate
(and PJSUA2). A disadvantage compared to prev approach is: it may not be straightforward as app may need to check the initial local offer to know the offered PT (which is later removed by the SDP nego as remote does not have tel-event).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sounds okay, but since this is remote's issue, perhaps handling it in the app level would be better? App can modify the SDP answer and add the tel-event manually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the SDP nego scenario:
Offer
Answer:
Later, remote/callee sends DTMF with PT 122. Not clear how they choose the PT based on the offer, I assume it is the latest tel-event.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The latest commit has even more limited usage, since it only allows the last telephone-event PT (so if remote sends 120 or 121, it will still be rejected?).
I would first suggest the app to add the answers themselves. This should be done considering their understanding of the problematic remote, so they are free to choose the telephone event PT remote will most likely send. As the issue lies with the remote itself, there is no need for a library fix at the moment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it is possible for the app to override the telefone-event PT, than this would be the best approach, at least for us. So we can handle this differently for different PBXes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sauwming, I leaning to agree with you. It's not really clear how the remote choose the PT used. @ilogixxDE , app can modify the SDP answer to include the telephone-event used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great, if we can handle the SDP in PJSUA or at least have an option at runtime to set the expected PT Type in case we are facing a system that behaves like the one we have described. We expect to run into similar issues with other PBXes too, so it would be great if we have an easy way to make DTMF work, similar to this PR. Can this be added somehow as an option in PJSUA, please?