<div dir="ltr"><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Hello!<br clear="all"></div><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Oh, wise ones, ponder with me over two of the surprises that <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">populate the universe!<br><br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have a phone, that I sometimes cannot reach, connected via pjsip.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">It can call other extensions just fine, it can call out over a<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">trunk to my cell, all is well, but getting a call? Forget it most of the time.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Here is all the config relevant to that phone:<br><br><br clear="all"></div>[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 target="_blank" href="http://0.0.0.0:57969">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><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">​OK, that completes the config (I hope).<br><br></div><div style="font-family:arial,helvetica,sans-serif" class="gmail_default">Now, when I run "pjsip show endpoints, I get:​</div><br>SFO02-HostedPBXPJSip-Dev03*<wbr>CLI> pjsip show endpoints<br><br> Endpoint:  <Endpoint/CID.................<wbr>....................>  <State.....>  <Channels.><br>    I/OAuth:  <AuthId/UserName..............<wbr>..............................<wbr>...............><br>        Aor:  <Aor..........................<wbr>..................>  <MaxContact><br>      Contact:  <Aor/ContactUri...............<wbr>...........> <Hash....> <Status> <RTT(ms)..><br>  Transport:  <TransportId........>  <Type>  <cos>  <tos>  <BindAddress..................<wbr>><br>   Identify:  <Identify/Endpoint............<wbr>..............................<wbr>...............><br>        Match:  <ip/cidr......................<wbr>...><br>    Channel:  <ChannelId....................<wbr>..................>  <State.....>  <Time(sec)><br>        Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......><br> =============================<wbr>==============================<wbr>==============================<br><br> Endpoint:  murftest12/101                <wbr>                       Not in use    0 of inf<br>     InAuth:  murftest12/murftest12<br>        Aor:  murftest12                    <wbr>                     2<br>      Contact:  murftest12/<a target="_blank" href="http://sip:murftest12@67.215.23.186:54">sip:murftest12@67.<wbr>215.23.186:54</a> 171a08228b Unavail       0.000<br>      Contact:  murftest12/<a target="_blank" href="http://sip:murftest12@67.215.23.186:21">sip:murftest12@67.<wbr>215.23.186:21</a> d9a15f4e35 Avail        50.514<br>  Transport:  transport-udp             udp      0      0  <a target="_blank" href="http://0.0.0.0:57969">0.0.0.0:57969</a><br><br><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​
Note that there are TWO Contact: entries! one Avail, the other 
Unavail... the show endpoints doesn't display all the URL, but the show 
contacts does:<br><br>​  Contact:  murftest12/<a target="_blank" href="http://sip:murftest12@67.215.23.186:21800">sip:murftest12@67.<wbr>215.23.186:21800</a>  d9a15f4e35 Avail        50.514<br>  Contact:  murftest12/<a target="_blank" href="http://sip:murftest12@67.215.23.186:54004">sip:murftest12@67.<wbr>215.23.186:54004</a>  171a08228b Unavail       0.000<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">None of my other phones have two contacts listed.... and this phone, a cisco-spa-514, has just one sip account...<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The
 trouble is, when I try to call it.... sometimes the INVITE is directed 
to the "Unavail" entry, and the call never completes. The phone doesn't 
even ring then. Any ideas? I tried to get the "Unavail" entry out... I 
removed it from the db, I rebooted the phone, restarted asterisk, and it
 is <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">still there.<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">MYSTERY #2:<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">The above cisco-spa, when it calls out over the trunk, all is well, wonderful 2-way audio.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">But when I do the same operation from my yealink phones, I get my cell with one-way audio.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">It's
 a classic NAT situation: the phone system is in a droplet at digital 
ocean, but my phones are here at home behind a NAT. I see only 3 NAT 
related options: <br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">force_rport<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">rtp_symmetric<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">rewrite_contact<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">and I set them all to "yes", and they can call each other, but as explained, in<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">dialing out thru a trunk, the yealinks get one-way audio... <br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Any more NAT options?<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">many thanks...<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">murf<br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><br>Steve Murphy<br><br><br>✉  murf at parsetree dot com<br><br></div></div></div></div></div></div></div></div>
</div>