[quote=“Telephony”]As I understand it, the 2 SIP phones send text messages to each other through the Asterisk (or other) SIP server during call progress.
Then, for efficiency’s sake, when the RTP phase comes, they say to each other (who says to whom?): “let’s start talking codec directly, without using the SIP server as intermediary”.
Is that correct?[/quote]
More or less - except the phones don’t “send […] messages to each other”, they send them to Asterisk. It would be slightly more accurate to describe it in the following way:[ol]
[li] The phones swap SIP messages with Asterisk to initiate the session (Session Initiation Protocol). Part of this session initiation transaction is setting up the RTP (RealTime Protocol) media path - this includes setting up IP address and port combinations for the endpoints.
[li]Then the RTP connections are initiated. If both phones support the ‘canreinvite’ option, they setup direct RTP connections with each other, if they can’t they set up RTP connections with Asterisk, which bridges the two channels, translating the encoding if necessary.[/li][/ol]
[quote]Second: is the ‘canreinvite’ option mandatory to the phones?
If Asterisk tells them: “you can reinvite”, does it mean: “you MUST reinvite”.[/quote]
That’s not how it works. Asterisk can’t tell them “you can reinvite” - rather, they tell Asterisk “i can reinvite”. After all, only the phone can know if it can reinvite or not - Asterisk can’t know that. Issues that determine whether you can reinvite or not are things like firewall access - if you’re behind a restrictive firewall, it may simply not be possible to do a direct connection with something on the other side of the firewall.
I guess the “canreinvite” option in sip.conf is what’s confusing you. I’m not sure i’ve got all aspects of this completely clear in my head, but as basically it’s saying whether or not Asterisk can reinvite over this connection. Of course this doesn’t make any sense when the configuration relates to a phone - but if the configuration relates to another server it does.