-
Notifications
You must be signed in to change notification settings - Fork 782
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 support of out-of-dialog SIP transactions #4155
base: master
Are you sure you want to change the base?
Add support of out-of-dialog SIP transactions #4155
Conversation
This commit adds support of out-of-dialog transactions to PJSUA and PJSUA2. The requests are sent in the context of an account. The API is similar to that of an in-dialog transaction.
pjsip/include/pjsua-lib/pjsua.h
Outdated
PJ_DECL(pj_status_t) pjsua_acc_send_request(pjsua_acc_id acc_id, | ||
const pj_str_t *dest_uri, | ||
const pj_str_t *method_str, | ||
const pjsua_msg_data *msg_data); |
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.
Add few params which perhaps can be useful in the future:
- app user-data/token (void *),
- generic options/settings (void *): for now perhaps must be NULL, for extensibility in the future, so we don't need to create
pjsua_acc_send_request2()
:)
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.
Looks like only token/user-data was added and it is specified as "unused" while it should be usable (as opposed to must-be-NULL :)
Actually user-data/token and settings are actually different:
- user-data/token, basically it needs to be passed back in the callback, so app can correspond the tsx to something, just check
pjsip_endpt_send_request()
orpjsua_call_make_call()
for reference. - settings, it is for future use, must be NULL for now.
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.
Sorry..I misunderstood.
So you are saying that the token should already work and shouldn't be for future use cases, i e. that an object is allocated in the pool, which stores the acc_id and the token (a pointer). (In current PR only acc_id is stored).
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.
Yes, correct.
Incorporated feedback in a fixup commit. PTAL. |
This commit adds support of out-of-dialog transactions to PJSUA and PJSUA2. The requests are sent in the context of an account. The API is similar to that of an in-dialog transaction.
Example: The new interface can be used to send SIP OPTIONS.
Issue: #4156