<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">SOLVED!<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Many THANKS to George and Anthony! See at the very end, my comments...<br><br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 8, 2016 at 5:58 PM, Anthony Joseph Messina <span dir="ltr"><<a href="mailto:amessina@messinet.com" target="_blank">amessina@messinet.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Thursday, September 8, 2016 1:12:36 PM CDT Steve Murphy wrote:<br>
> Hello!<br>
><br>
> Oh, wise ones, ponder with me over two of the surprises that<br>
> populate the universe!<br>
><br>
><br>
> I have a phone, that I sometimes cannot reach, connected via pjsip.<br>
> It can call other extensions just fine, it can call out over a<br>
> trunk to my cell, all is well, but getting a call? Forget it most of the<br>
> time.<br>
><br>
> Here is all the config relevant to that phone:<br>
><br>
><br>
> [murftest12]<br>
> type=aor<br>
> qualify_frequency=1992<br>
> max_contacts=2<br>
><br>
> [murftest12]<br>
> type=auth<br>
> auth_type=userpass<br>
> username=murftest12<br>
> password=SjU3<br>
><br>
> [transport-udp]<br>
> type=transport<br>
> protocol=udp<br>
> bind=<a href="http://0.0.0.0:57969" rel="noreferrer" target="_blank">0.0.0.0:57969</a><br>
><br>
><br>
> [murftest12]    ; Cisco SPA514G mac=A4:93:4C:FE:1D:A2<br>
> type=endpoint<br>
> auth=murftest12<br>
> transport=transport-udp<br>
> aors=murftest12<br>
> moh_suggest=default<br>
> force_rport=yes<br>
> rewrite_contact=yes<br>
> rtp_symmetric=yes<br>
> dtmf_mode=rfc4733<br>
> disallow=all<br>
> allow=ulaw ; from phonetype<br>
> allow=g722 ; from phonetype<br>
> allow=alaw ; from phonetype<br>
> allow=alaw ; from phonetype (G.729 replaced with alaw)<br>
> direct_media=no<br>
> context=phone<br>
> rtp_timeout=120<br>
> set_var=__phoneid=12<br>
> set_var=__contacttypeid=4<br>
> set_var=__phonelineid=78<br>
> callerid="Steve Murphy" <101><br>
> call_group=2<br>
> pickup_group=2<br>
> mailboxes=101@murftest<br>
> language=en<br>
> send_rpid=yes<br>
> send_pai=yes<br>
><br>
> ​OK, that completes the config (I hope).<br>
><br>
> Now, when I run "pjsip show endpoints, I get:​<br>
><br>
> SFO02-HostedPBXPJSip-Dev03*<wbr>CLI> pjsip show endpoints<br>
><br>
>  Endpoint:  <Endpoint/CID.................<wbr>....................><br>
> <State.....>  <Channels.><br>
>     I/OAuth:  <AuthId/UserName..............<wbr>..............................<br>
> ...............><br>
>         Aor:  <Aor..........................<wbr>..................><br>
> <MaxContact><br>
>       Contact:  <Aor/ContactUri...............<wbr>...........> <Hash....><br>
> <Status> <RTT(ms)..><br>
>   Transport:  <TransportId........>  <Type>  <cos>  <tos><br>
> <BindAddress..................<wbr>><br>
>    Identify:  <Identify/Endpoint............<wbr>..............................<br>
> ...............><br>
>         Match:  <ip/cidr......................<wbr>...><br>
>     Channel:  <ChannelId....................<wbr>..................><br>
> <State.....>  <Time(sec)><br>
>         Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......><br>
>  ==============================<wbr>=============================<br>
> ==============================<br>
><br>
>  Endpoint:  murftest12/101                                       Not in<br>
> use    0 of inf<br>
>      InAuth:  murftest12/murftest12<br>
>         Aor:  murftest12                                         2<br>
>       Contact:  murftest12/<a href="http://sip:murftest12@67.215.23.186:54" rel="noreferrer" target="_blank">sip:murftest12@67.<wbr>215.23.186:54</a> 171a08228b<br>
> Unavail       0.000<br>
>       Contact:  murftest12/<a href="http://sip:murftest12@67.215.23.186:21" rel="noreferrer" target="_blank">sip:murftest12@67.<wbr>215.23.186:21</a> d9a15f4e35<br>
> Avail        50.514<br>
>   Transport:  transport-udp             udp      0      0  <a href="http://0.0.0.0:57969" rel="noreferrer" target="_blank">0.0.0.0:57969</a><br>
><br>
> ​ Note that there are TWO Contact: entries! one Avail, the other Unavail...<br>
> the show endpoints doesn't display all the URL, but the show contacts does:<br>
><br>
> ​  Contact:  murftest12/<a href="http://sip:murftest12@67.215.23.186:21800" rel="noreferrer" target="_blank">sip:murftest12@67.<wbr>215.23.186:21800</a>  d9a15f4e35<br>
> Avail        50.514<br>
>   Contact:  murftest12/<a href="http://sip:murftest12@67.215.23.186:54004" rel="noreferrer" target="_blank">sip:murftest12@67.<wbr>215.23.186:54004</a>  171a08228b<br>
> Unavail       0.000<br>
><br>
> None of my other phones have two contacts listed.... and this phone, a<br>
> cisco-spa-514, has just one sip account...<br>
><br>
> The trouble is, when I try to call it.... sometimes the INVITE is directed<br>
> to the "Unavail" entry, and the call never completes. The phone doesn't<br>
> even ring then. Any ideas? I tried to get the "Unavail" entry out... I<br>
> removed it from the db, I rebooted the phone, restarted asterisk, and it is<br>
> still there.<br>
><br>
> MYSTERY #2:<br>
><br>
> The above cisco-spa, when it calls out over the trunk, all is well,<br>
> wonderful 2-way audio.<br>
> But when I do the same operation from my yealink phones, I get my cell with<br>
> one-way audio.<br>
<br>
</div></div>I just resolved a similar issue with a new Yealink phone and PJSIP.  It seems<br>
that Asterisk (depending on many transcoding parameters and types of calls)<br>
may send out a different codec on leg B than it receives on leg A.  While less<br>
than optimal for the end user, this is allowed by the RFCs.  Yealink doesn't<br>
seem to handle this well.  The firmware referenced in this link fixed the<br>
issue for me, as least with my T48G and DAHDI/PJSIP calls.<br>
<br>
<a href="http://forum.yealink.com/forum/showthread.php?tid=8330&pid=39161#pid39161" rel="noreferrer" target="_blank">http://forum.yealink.com/<wbr>forum/showthread.php?tid=8330&<wbr>pid=39161#pid39161</a><br>
<span class=""><br>
<br>
> It's a classic NAT situation: the phone system is in a droplet at digital<br>
> ocean, but my phones are here at home behind a NAT. I see only 3 NAT<br>
> related options:<br>
><br>
> force_rport<br>
> rtp_symmetric<br>
> rewrite_contact<br>
><br>
> and I set them all to "yes", and they can call each other, but as<br>
> explained, in<br>
> dialing out thru a trunk, the yealinks get one-way audio...<br>
><br>
> Any more NAT options?<br>
><br>
> many thanks...<br>
><br>
> murf<br>
</span><br></blockquote><div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">​George's previous message on this thread, plus this one were very helpful<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">in solving my problems.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">I discovered:<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">1. Mystery #1 was a combination of factors:<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">   1. The max_contacts=1 and remove_existing=yes did in fact get rid of the<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">       dual contact problem! But I still could not get an INVITE to my phone.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">   2. The use of qualify_frequency=60 in my aor solved the access problem.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">       For some strange reason, my NAT path was shutting down before 120 sec<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">       for this phone, which is considerably shorter than the other phones, for<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">       some rather unobvious reasons. <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">2. Mystery #2, as it turned out, actually was because of codec choices. The phones<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">    I was using were not in the list for firmware upgrades, so I had to take a different<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">    approach: actually standardize the codec list for phones and trunks, to all be the<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">    same. I did that, and all the 1-way audio problems went away.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">Thanks for the help! I hope that others who have the same problems may find this<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">message helpful.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;display:inline">murf<br>​</div> </div></div>-- <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>✉  murf at parsetree dot com<br><br></div></div></div></div></div></div></div></div>
</div></div>