[asterisk-dev] [Code Review] Pimp my SIP: Direct Media Support

Mark Michelson mmichelson at digium.com
Wed Mar 13 14:09:35 CDT 2013


On 03/13/2013 11:42 AM, Olle E. Johansson wrote:
>
> 13 mar 2013 kl. 17:36 skrev "Mark Michelson" <reviewboard at asterisk.org 
> <mailto:reviewboard at asterisk.org>>:
>
>> In order to keep things simple, there are certain operations we will not do if there is currently a reinvite transaction in progress. These things are
>> 1) Send any sort of session refresh request (INVITE or UPDATE)
>> 2) End a session
>>
> That's cool. So if Asterisk sends me a re-invite and I keep it happy 
> sending a 18x every minute, you can not send a BYE!
>
> Sweet. But not good. In fact, pretty dangerous. Keep working on this 
> :-) There has to be a way to have two concurrent transactions open. 
> You will need it anyway, like sending an UPDATE during an INVITE or 
> PRACKs., those lovely glorius and sweet PRACKs.

Your 183 scenario is interesting. I ran some double-checks where I ran 
your scenario and sure enough, it resulted in badness. Once one side 
hung up, the ast_channels were destroyed appropriately, but the SIP 
dialog remained active since there was never a BYE sent.

I made a local change that simply removed the restriction that prevented 
us from attempting to end a session while a reinvite transaction is 
active. What I found was that with phones, I was able to successfully 
send a BYE and things just worked. So I'll make this change and put it 
back up on the review request.

Regarding UPDATE: it may be possible to look at the SDP negotiation 
state during a reinvite to be able to tell if it's possible to send an 
UPDATE, but unless this actually becomes an issue, I'm not going to 
pursue this very fervently yet. The reason is that I find it incredibly 
unlikely that Asterisk will need to send multiple session refreshes in 
rapid succession. Like I said, if it becomes problematic, this can be 
revisited.

Regarding PRACK: PRACK is already taken care of for us by the 
pjsip_inv_session layer. If we get a provisional response with Require: 
100rel, we'll send a PRACK automatically.

Mark Michelson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20130313/affa040e/attachment.htm>


More information about the asterisk-dev mailing list