<div dir="ltr"><div class="gmail_extra">On Wed, Apr 12, 2017 at 3:30 PM, Joshua Colp <span dir="ltr"><<a href="mailto:jcolp@digium.com" target="_blank">jcolp@digium.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, Apr 12, 2017, at 05:53 PM, Steve Murphy wrote:<br>
> Hello, I must admit, as a beginner at this, that I have a lot to learn.<br>
><br>
> I have written a module to handle some statistics gathering, and it works<br>
> fine,<br>
> but my next priority patch leaves me quite puzzled.<br>
><br>
> If you or anyone will hear my situation, and offer possible solutions or<br>
> advice,<br>
> I would much appreciate the help.<br>
><br>
> My next assignment is a patch that was made to chan_sip some years<br>
> back, that overcomes a problem with older aastra phones that are set up<br>
> to<br>
> turn functions keys into blf lights.<br>
><br>
> Such a phone issues two registrations in quick succession. The first<br>
> indicates<br>
> a normal expire= time, and uses the correct CallerID. But the second<br>
> expiration<br>
> is presented with a different callerid, but the same sip device, and<br>
> gives<br>
> an<br>
> expires=0, which causes the phone to immediately deregister.<br>
><br>
<br>
</span><snip><br>
<span class=""><br>
><br>
> I have been studying the code, and have determined that the module in<br>
> res/res_pjsip_registrar would be proper spot to make the change, in the<br>
> registrar_validate_contacts function. I have but one small problem,<br>
> and that is, I need to access either the pjsip endpoint object, or the<br>
> asterisk object, to retrieve the expire value from the contact header of<br>
> the first<br>
> REGISTER request.<br>
><br>
> It was easy in the chan_sip code: the peer held the expire value from the<br>
> first<br>
> request.<br>
><br>
> But in the pjsip world, I am not easily finding this value, which is the<br>
> expires=x<br>
> value from the first REGISTER request. Then in the second request, I hope<br>
> to reject the errant registration based on the difference in contact<br>
> names<br>
> between<br>
> the two requests, and the fact the second request has expire=0, etc.<br>
><br>
> Again, any help would be appreciated. Conversations like this could be<br>
> valuable<br>
> to developers needing to work on res_pjsip.<br>
<br>
</span>The contact and expires is not stored on an endpoint. It's stored in a<br>
contact structure (which holds the details of the Contact header from<br>
the REGISTER) which is associated with the AOR. In fact I'd expect the<br>
code to work already with that Aastra specific usage. When<br>
res_pjsip_registrar got the unregister it would look for the associated<br>
contact to remove, but as there is none by the given Contact it<br>
shouldn't remove any.<br></blockquote><div><br><div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">Many thanks, the above gives me a glimpse into the workings and organsization in pjsip!</div> </div><div><br><div style="font-family:arial,helvetica,sans-serif;display:inline" class="gmail_default">I have asked (again) the groups, and the folks that have reported problems with pjsip,</div> <br><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">are standing by their claims. The 53i and the 57i (iirc) are not able to hold registration<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">on Asterisk 13.5, with either the as-is chan_sip driver, or the as-is pjsip driver.<br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">I am trying, without success so far, to get an old 53i going under pjsip in my own<br>environment. It has been frustrating.<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default"><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">We have a patch for chan_sip dating back to the 1.6 days, that solves the problem,<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">but only for chan_sip (even the one in 13.5). <br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">If this is a bug in pjsip, and the framework of the existing driver is truly already checking<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">the status of the "first" request vs the incoming request, then mayhaps we can apply<br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">the same sort of fixesin pjsip. Is this a bug, then? Should I file a bug report?<br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">murf<br></div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Joshua Colp<br>
Digium, Inc. | Senior Software Developer<br>
445 Jan Davis Drive NW - Huntsville, AL 35806 - US<br>
Check us out at: <a href="http://www.digium.com" rel="noreferrer" target="_blank">www.digium.com</a> & <a href="http://www.asterisk.org" rel="noreferrer" target="_blank">www.asterisk.org</a><br>
<br>
--<br>
______________________________<wbr>______________________________<wbr>_________<br>
-- Bandwidth and Colocation Provided by <a href="http://www.api-digital.com" rel="noreferrer" target="_blank">http://www.api-digital.com</a> --<br>
<br>
asterisk-dev mailing list<br>
To UNSUBSCRIBE or update options visit:<br>
<a href="http://lists.digium.com/mailman/listinfo/asterisk-dev" rel="noreferrer" target="_blank">http://lists.digium.com/<wbr>mailman/listinfo/asterisk-dev</a><br>
</font></span></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br>Steve Murphy<br>ParseTree Corporation<br>57 Lane 17<br>Cody, WY 82414<br>✉ murf at parsetree dot com<br>☎ 307-899-0510</div></div></div></div></div></div></div></div>
</div></div>