[asterisk-users] PJSIP Weirdness, or just my weirdness?

Anthony Joseph Messina amessina at messinet.com
Thu Sep 8 18:58:48 CDT 2016


On Thursday, September 8, 2016 1:12:36 PM CDT Steve Murphy wrote:
> Hello!
> 
> Oh, wise ones, ponder with me over two of the surprises that
> populate the universe!
> 
> 
> I have a phone, that I sometimes cannot reach, connected via pjsip.
> It can call other extensions just fine, it can call out over a
> trunk to my cell, all is well, but getting a call? Forget it most of the
> time.
> 
> Here is all the config relevant to that phone:
> 
> 
> [murftest12]
> type=aor
> qualify_frequency=1992
> max_contacts=2
> 
> [murftest12]
> type=auth
> auth_type=userpass
> username=murftest12
> password=SjU3
> 
> [transport-udp]
> type=transport
> protocol=udp
> bind=0.0.0.0:57969
> 
> 
> [murftest12]    ; Cisco SPA514G mac=A4:93:4C:FE:1D:A2
> type=endpoint
> auth=murftest12
> transport=transport-udp
> aors=murftest12
> moh_suggest=default
> force_rport=yes
> rewrite_contact=yes
> rtp_symmetric=yes
> dtmf_mode=rfc4733
> disallow=all
> allow=ulaw ; from phonetype
> allow=g722 ; from phonetype
> allow=alaw ; from phonetype
> allow=alaw ; from phonetype (G.729 replaced with alaw)
> direct_media=no
> context=phone
> rtp_timeout=120
> set_var=__phoneid=12
> set_var=__contacttypeid=4
> set_var=__phonelineid=78
> callerid="Steve Murphy" <101>
> call_group=2
> pickup_group=2
> mailboxes=101 at murftest
> language=en
> send_rpid=yes
> send_pai=yes
> 
> ​OK, that completes the config (I hope).
> 
> Now, when I run "pjsip show endpoints, I get:​
> 
> SFO02-HostedPBXPJSip-Dev03*CLI> pjsip show endpoints
> 
>  Endpoint:  <Endpoint/CID.....................................>
> <State.....>  <Channels.>
>     I/OAuth:  <AuthId/UserName............................................
> ...............>
>         Aor:  <Aor............................................>
> <MaxContact>
>       Contact:  <Aor/ContactUri..........................> <Hash....>
> <Status> <RTT(ms)..>
>   Transport:  <TransportId........>  <Type>  <cos>  <tos>
> <BindAddress..................>
>    Identify:  <Identify/Endpoint..........................................
> ...............>
>         Match:  <ip/cidr.........................>
>     Channel:  <ChannelId......................................>
> <State.....>  <Time(sec)>
>         Exten: <DialedExten...........>  CLCID: <ConnectedLineCID.......>
>  ===========================================================
> ==============================
> 
>  Endpoint:  murftest12/101                                       Not in
> use    0 of inf
>      InAuth:  murftest12/murftest12
>         Aor:  murftest12                                         2
>       Contact:  murftest12/sip:murftest12 at 67.215.23.186:54 171a08228b
> Unavail       0.000
>       Contact:  murftest12/sip:murftest12 at 67.215.23.186:21 d9a15f4e35
> Avail        50.514
>   Transport:  transport-udp             udp      0      0  0.0.0.0:57969
> 
> ​ 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:
> 
> ​  Contact:  murftest12/sip:murftest12 at 67.215.23.186:21800  d9a15f4e35
> Avail        50.514
>   Contact:  murftest12/sip:murftest12 at 67.215.23.186:54004  171a08228b
> Unavail       0.000
> 
> None of my other phones have two contacts listed.... and this phone, a
> cisco-spa-514, has just one sip account...
> 
> 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
> still there.
> 
> MYSTERY #2:
> 
> The above cisco-spa, when it calls out over the trunk, all is well,
> wonderful 2-way audio.
> But when I do the same operation from my yealink phones, I get my cell with
> one-way audio.

I just resolved a similar issue with a new Yealink phone and PJSIP.  It seems 
that Asterisk (depending on many transcoding parameters and types of calls) 
may send out a different codec on leg B than it receives on leg A.  While less 
than optimal for the end user, this is allowed by the RFCs.  Yealink doesn't 
seem to handle this well.  The firmware referenced in this link fixed the 
issue for me, as least with my T48G and DAHDI/PJSIP calls.

http://forum.yealink.com/forum/showthread.php?tid=8330&pid=39161#pid39161


> 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:
> 
> force_rport
> rtp_symmetric
> rewrite_contact
> 
> and I set them all to "yes", and they can call each other, but as
> explained, in
> dialing out thru a trunk, the yealinks get one-way audio...
> 
> Any more NAT options?
> 
> many thanks...
> 
> murf


-- 
Anthony - https://messinet.com/ - https://messinet.com/~amessina/gallery
F9B6 560E 68EA 037D 8C3D  D1C9 FF31 3BDB D9D8 99B6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160908/c542643a/attachment.pgp>


More information about the asterisk-users mailing list