[asterisk-dev] Why do you want to send SIP requests in the multimedia RTP stream????
Mark Michelson
mmichelson at digium.com
Wed Jan 23 15:16:10 CST 2013
On 01/23/2013 10:38 AM, Olle E. Johansson wrote:
> 23 jan 2013 kl. 17:25 skrev Mark Michelson <mmichelson at digium.com>:
>
>> On 01/23/2013 02:27 AM, Olle E. Johansson wrote:
<snip>
>>
>> That PJsip has a bad naming should not affect us... :-)
>>
>> Use "call_dialog" for something connected to a channel and other types of dialogs for the rest, but please, please do not misuse "session" which makes it very hard to understand.
>>
>> /O
>>
While I disagree that it makes it "very hard to understand" I will say
that it could potentially be improved. I dislike "call_dialog" because
it sounds limiting. "Calls" are all about phones, and we don't want our
API to sound like it's limited just to phone use. We're less focused on
setting up calls than we are about setting up media sessions.
In general, the use of the word "session" is mostly used correctly with
regards to the API. It could only arguably be changed for API calls like
the one you pointed out where the word "session" used on its own might
cause someone to do a double-take to realize what is meant. I propose
simply adding the word "dialog" to the API calls to make it more clear.
That would mean that
ast_sip_session_send_reinvite()
ast_sip_session_send_response()
ast_sip_session_send_request()
would be changed to
ast_sip_session_dialog_send_reinvite()
ast_sip_session_dialog_send_response()
ast_sip_session_dialog_send_request()
This way the "ast_sip_session" prefix remains so that it's clear what
resource module is providing the API call, but it also is more clear
that the reinvite, response, or request is being sent on the dialog that
the session belongs to.
What do you think of that?
Mark Michelson
More information about the asterisk-dev
mailing list