Steve Murphy
2016-Sep-08 19:12 UTC
[asterisk-users] PJSIP Weirdness, or just my weirdness?
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. 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 -- Steve Murphy ? murf at parsetree dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160908/00955693/attachment.html>
George Joseph
2016-Sep-08 21:27 UTC
[asterisk-users] PJSIP Weirdness, or just my weirdness?
On Thu, Sep 8, 2016 at 1:12 PM, Steve Murphy <murf at parsetree.com> 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 >*max_contacts = 1* *remove_existing = yes* *This should take care of mystery 1.*> > > 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. > 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? >Do the phones have settings for NAT? If so, turn them on. Does your home router have a setting for SIP-ALG? If so *TURN IT OFF!!* Give that a shot.> > many thanks... > > murf > -- > > Steve Murphy > > > ? murf at parsetree dot com > > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > > Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016 > http://www.asterisk.org/community/astricon-user-conference > > New to Asterisk? Start here: > https://wiki.asterisk.org/wiki/display/AST/Getting+Started > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-- George Joseph Digium, Inc. | Software Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - US Check us out at: www.digium.com & www.asterisk.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160908/161826d6/attachment.html>
Anthony Joseph Messina
2016-Sep-08 23:58 UTC
[asterisk-users] PJSIP Weirdness, or just my weirdness?
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>
Steve Murphy
2016-Sep-13 02:13 UTC
[asterisk-users] PJSIP Weirdness, or just my weirdness?
SOLVED! Many THANKS to George and Anthony! See at the very end, my comments... On Thu, Sep 8, 2016 at 5:58 PM, Anthony Joseph Messina < amessina at messinet.com> wrote:> 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 > >?George's previous message on this thread, plus this one were very helpful in solving my problems. I discovered: 1. Mystery #1 was a combination of factors: 1. The max_contacts=1 and remove_existing=yes did in fact get rid of the dual contact problem! But I still could not get an INVITE to my phone. 2. The use of qualify_frequency=60 in my aor solved the access problem. For some strange reason, my NAT path was shutting down before 120 sec for this phone, which is considerably shorter than the other phones, for some rather unobvious reasons. 2. Mystery #2, as it turned out, actually was because of codec choices. The phones I was using were not in the list for firmware upgrades, so I had to take a different approach: actually standardize the codec list for phones and trunks, to all be the same. I did that, and all the 1-way audio problems went away. Thanks for the help! I hope that others who have the same problems may find this message helpful. murf ? -- Steve Murphy ? murf at parsetree dot com -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160912/5f93cdc9/attachment.html>
Reasonably Related Threads
- Multiple Form Fields with Same Model?
- Is set_var allowed with pjsip_wizard.conf ?
- Is set_var allowed with pjsip_wizard.conf ?
- Is set_var allowed with pjsip_wizard.conf ?
- How can I specify the selected value in collection_select when fieldname different than variable?