dslreports logo
 
    All Forums Hot Topics Gallery
spc
Search similar:


uniqs
63697
dziny
join:2015-06-22

dziny to naf

Member

to naf

Re: Asterisk Google Voice SIP testing and technical discussion

said by naf:

stability report: another error-less night of logs. inbound and outbound still work in the morning. feeling good...

anyone else?

All good for me as well.
naf
join:2017-12-12

naf

Member

said by maxm:

new log from last night to this morning, still see SSL error. I tested inbound call and fails too after SSL error.

21:02:10 asterisk start
22:49:05 first SSL error
01:12:33 SSL
02:06:27 SSL
03:58:53 SSL
07:26:41 SSL
08:48:31 got up this morning and tried inbound call, asterisk responded incoming with SIP/2.0 401 Unauthorized
08:49:20 i tried again..
08:50:50 i did core reload in cli
08:51:05 tried again, same 401 error
08:51:49 i restarted asterisk
08:52:04 incoming succuessful

(ignoring the SSL errors for a second, which i believe only effect outbound calls after it reconnects, cause the inbound problems are different)

[Jun 30 08:48:31] VERBOSE[19254] res_pjsip_logger.c: <--- Received SIP request (1942 bytes) from TLS:64.9.242.108:5061 --->
INVITE sip:s@192.168.1.187:5061;transport=TLS SIP/2.0
Via: SIP/2.0/TLS 64.9.242.108:5061;branch=z9hG4bK-524287-1---d6ccdcc94b7fc554c8e5c9e2747411b8;rport
Via: SIP/2.0/UDP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:5060;branch=z9hG4bK-524287-1---768289f9d8608d80a0cd31660c03621c;econt=FJZP4G6R4FIFOGQUYRI
Via: SIP/2.0/UDP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:5060;branch=z9hG4bK1901590842;econt=2DBTL5NSVXDZB75TIRFCQSADBB7T5MX5JZMOFHUMVANAEVHOOACC6XABO
Max-Forwards: 68
Record-Route: <sip:64.9.242.108:5061;lr;transport=tls>
Record-Route: <sip:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:5060;lr;transport=udp;uri-econt=SPBC3OJEB>
Contact: <sip:+1XXXXXXXXXX@XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:5060;transport=udp;uri-econt=4E62KXKCDVSN4WDTTTPLJYI6VK6AQ>
To: <sip:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX===@obihai.sip.google.com>
From: "1XXXXXXXXXX" <sip:+1XXXXXXXXXX@XXX.XXX.XXX.XXX:5060>;tag=2121373302
Call-ID: lioEg8YOdQ3MEm1E_5277376555914828871
CSeq: 401803 INVITE
Allow: ACK, BYE, CANCEL, INVITE, UPDATE
Content-Type: application/sdp
Supported: 100rel
Privacy: none
P-Asserted-Identity: "1XXXXXXXXXX" <sip:+1XXXXXXXXXX@XXX.XXX.XXX.XXX>
P-Called-Party-ID: <sip:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX===@obihai.sip.google.com>
Content-Length: 552
 
v=0
o=- 501178585 1530362911552 IN IP4 74.125.39.58
s=SIP Call
c=IN IP4 74.125.39.58
t=0 0
a=ice-lite
a=ice-pwd:dpUYLVi3eUUdxZf+TJzLX1i/
a=ice-ufrag:Z75eSnOUUkASpZ0T
a=group:BUNDLE audio
a=fingerprint:sha-256 16:61:CE:09:B3:82:D2:81:DE:77:DB:B6:62:1C:CB:7E:D0:1B:F3:0B:D4:F7:D2:89:F1:74:35:45:2E:C3:FE:6E
a=setup:actpass
m=audio 19305 RTP/AVP 0 101
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=rtcp-mux
a=candidate:1 1 UDP 1 74.125.39.58 19305 typ host
a=candidate:2 1 UDP 2 2001:4860:4864:2::58 19305 typ host
a=sendrecv
 
[Jun 30 08:48:31] DEBUG[20545] pjproject: 	        sip_endpoint.c Distributing rdata to modules: Request msg INVITE/cseq=401803 (rdata0x7f17100dd308)
[Jun 30 08:48:31] NOTICE[20545] res_pjsip/pjsip_distributor.c: Request 'INVITE' from '"1XXXXXXXXXX" <sip:+1XXXXXXXXXX@XXX.XXX.XXX.XXX>' failed for '64.9.242.108:5061' (callid: lioEg8YOdQ3MEm1E_5277376555914828871) - No matching endpoint found
[Jun 30 08:48:31] DEBUG[20545] pjproject: 	              endpoint .Response msg 401/INVITE/cseq=401803 (tdta0x7f1710024be8) created
[Jun 30 08:48:31] VERBOSE[20545] res_pjsip_logger.c: <--- Transmitting SIP response (1180 bytes) to TLS:64.9.242.108:5061 --->
SIP/2.0 401 Unauthorized
Via: SIP/2.0/TLS 64.9.242.108:5061;rport=5061;received=64.9.242.108;branch=z9hG4bK-524287-1---d6ccdcc94b7fc554c8e5c9e2747411b8
Via: SIP/2.0/UDP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:5060;branch=z9hG4bK-524287-1---768289f9d8608d80a0cd31660c03621c;econt=FJZP4G6R4FIFOGQUYRI
Via: SIP/2.0/UDP XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:5060;branch=z9hG4bK1901590842;econt=2DBTL5NSVXDZB75TIRFCQSADBB7T5MX5JZMOFHUMVANAEVHOOACC6XABO
Record-Route: <sip:64.9.242.108:5061;transport=tls;lr>
Record-Route: <sip:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX:5060;transport=udp;lr;uri-econt=SPBC3OJEB>
Call-ID: lioEg8YOdQ3MEm1E_5277376555914828871
From: "1XXXXXXXXXX" <sip:+1XXXXXXXXXX@XXX.XXX.XXX.XXX>;tag=2121373302
To: <sip:XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX===@obihai.sip.google.com>;tag=z9hG4bK-524287-1---d6ccdcc94b7fc554c8e5c9e2747411b8
CSeq: 401803 INVITE
WWW-Authenticate: Digest  realm="asterisk",nonce="1530362911/59b26dafd9edcf8c82542bf290fc118d",opaque="421418363803a500",algorithm=md5,qop="auth"
Server: Asterisk PBX GIT-master-8990562e28
Content-Length:  0
 

ha, your asterisk responds to GV's INVITE to tell google *it* is unauthorized. bold.

but the "No matching endpoint found" is informative. it just means something in the config is borked, like the identify or whatever (someone who actually knows asterisk will be able to help).

can you post your pjsip.conf (with the refresh_token removed obviously)?

file
join:2011-03-29
Riverview, NB

file

Member

It means no identify section matched the IP address to an endpoint. You can try using the line functionality[1] which adds some data to the Contact which may or may not work with Google, which removes the need for an identify section. It requires the remote side to preserve the information (which they should according to the RFC) but sometimes don't.

[1] »blogs.asterisk.org/2016/ ··· -option/
naf
join:2017-12-12

naf

Member

(to contradict myself) but strangely it can find the endpoint at 9:52, with presumably the same config... ?

file
join:2011-03-29
Riverview, NB

file

Member

The hostname is giving me a different IP address, and it doesn't appear Google is returning multiple results (the identify section will match on any of the IP addresses returned by a DNS lookup if multiple are returned). If a reload were issued and a new IP address was returned, then subsequent requests would not match it. That's the only thing that comes to mind.

AllThumbs
join:2006-02-07
Charleston, SC

1 edit

1 recommendation

AllThumbs to naf

Member

to naf
asterisklog.txt
13,296 bytes
The SSL error kills inbound calls on our RasPi test machine. The workaround for us has been to issue: pjsip send register gvsip. We built a little cron job to issue the command every 5 minutes and it seems to be stabilizing inbound calls. The register command doesn't kill calls in progress, by the way.

asterisk -rx "pjproject set log level 5"
asterisk -rx "pjsip send register gvsip"
sleep 15
TEST=`tail -n 40 /var/log/asterisk/full | grep service-route`
if [[ -z "$TEST" ]]; then
 echo "ssl error. restarting..."
 asterisk -rx "pjsip send register gvsip"
 sleep 15
 TEST=`tail -n 40 /var/log/asterisk/full | grep service-route`
 if [[ -z "$TEST" ]]; then
  asterisk -rx "pjsip send register gvsip"
 fi
else
 echo ok
fi
 
 
naf
join:2017-12-12

1 edit

1 recommendation

naf to file

Member

to file
said by file:

The hostname is giving me a different IP address, and it doesn't appear Google is returning multiple results (the identify section will match on any of the IP addresses returned by a DNS lookup if multiple are returned). If a reload were issued and a new IP address was returned, then subsequent requests would not match it. That's the only thing that comes to mind.

confirmed that google does relay the line param back to us in the invite, so lets remove the identify section completely and use that instead, for the dns reasons you state. ill update the recommended config...

maxm, can you update the config like this: »github.com/naf419/asteri ··· 326d5d0f and try inbound consistency again?
maxm
join:2002-10-14
Atlanta, GA

maxm to naf

Member

to naf
I copied your pjsip.conf and only added the following line for my ip phone. I'll test the new pjsip.conf with identify removed.

[6001]
type = endpoint
context = from-internal
disallow = all
allow = ulaw
aors = 6001
auth = auth6001

[6001]
type = aor
max_contacts = 1

[auth6001]
type=auth
auth_type=userpass
password=mypassword
username=6001
dziny
join:2015-06-22

1 recommendation

dziny to naf

Member

to naf
said by naf:

can you update the config like this: »github.com/naf419/asteri ··· 326d5d0f and try inbound consistency again?

My outbound calls started to fail after this change. Not always, just inconsistent.
naf
join:2017-12-12

naf

Member

said by dziny:

said by naf:

can you update the config like this: »github.com/naf419/asteri ··· 326d5d0f and try inbound consistency again?

My outbound calls started to fail after this change. Not always, just inconsistent.

probably unrelated? post or pm me log of sip message traffic so we can see if its the double-clutch registers or something new
naf

naf to AllThumbs

Member

to AllThumbs
said by AllThumbs:

The SSL error kills inbound calls on our RasPi test machine. The workaround for us has been to issue: pjsip send register gvsip. We built a little cron job to issue the command every 5 minutes and it seems to be stabilizing inbound calls. The register command doesn't kill calls in progress, by the way.

that log shows something different than what im calling the double-clutch register. in the double-clutch case, the first REGISTER received an OK response, but 5-15seconds later the connection drops (SSL_ERROR_ZERO_RETURN) and asterisk automatically re-REGISTERs which also returns a successful response, but the subsequent outbound calls are rejected with 421.

in your log, the REGISTER response is not a success. asterisk already handle the 603 response by retrying at the specified interval, and it could handle the 421 in a similar manner if so configured, although it would be better to resolve whats causing the 421 instead. no scripts necessary in either case.

p.s. need to get that verbose message traffic in your logs to see the actual sip messages. i keep having to issue this on every restart with asterisk13: pjsip set logger on
xekon
join:2017-09-15
Hoodsport, WA

1 edit

xekon to naf

Member

to naf
I have been working on getting this installed/built from scratch.

Edit: resolved now.
dziny
join:2015-06-22

1 recommendation

dziny to naf

Member

to naf
said by naf:

said by dziny:

said by naf:

can you update the config like this: »github.com/naf419/asteri ··· 326d5d0f and try inbound consistency again?

My outbound calls started to fail after this change. Not always, just inconsistent.

probably unrelated? post or pm me log of sip message traffic so we can see if its the double-clutch registers or something new

Never mind, it was fail2ban acting up and banning of one the IPs google is using (136.22.68.172). The clue was suddenly one way sip message traffic.

AllThumbs
join:2006-02-07
Charleston, SC

AllThumbs to naf

Member

to naf
asterisklog.txt
27,259 bytes
said by naf:

said by AllThumbs:

The SSL error kills inbound calls on our RasPi test machine. The workaround for us has been to issue: pjsip send register gvsip. We built a little cron job to issue the command every 5 minutes and it seems to be stabilizing inbound calls. The register command doesn't kill calls in progress, by the way.

that log shows something different than what im calling the double-clutch register. in the double-clutch case, the first REGISTER received an OK response, but 5-15seconds later the connection drops (SSL_ERROR_ZERO_RETURN) and asterisk automatically re-REGISTERs which also returns a successful response, but the subsequent outbound calls are rejected with 421.

p.s. need to get that verbose message traffic in your logs to see the actual sip messages. i keep having to issue this on every restart with asterisk13: pjsip set logger on

Here you go...
naf
join:2017-12-12

1 edit

1 recommendation

naf

Member

said by AllThumbs:

said by naf:

said by AllThumbs:

The SSL error kills inbound calls on our RasPi test machine. The workaround for us has been to issue: pjsip send register gvsip. We built a little cron job to issue the command every 5 minutes and it seems to be stabilizing inbound calls. The register command doesn't kill calls in progress, by the way.

that log shows something different than what im calling the double-clutch register. in the double-clutch case, the first REGISTER received an OK response, but 5-15seconds later the connection drops (SSL_ERROR_ZERO_RETURN) and asterisk automatically re-REGISTERs which also returns a successful response, but the subsequent outbound calls are rejected with 421.

p.s. need to get that verbose message traffic in your logs to see the actual sip messages. i keep having to issue this on every restart with asterisk13: pjsip set logger on

Here you go...

Ya, those 603 Rejected Retry-After: 600 responses just mean you've been naughty and tried REGISTERing a bunch in succession and you need to just wait the 10 minutes (asterisk will do this automatically) before retrying.

Those 421 Extension Required Require: path responses are because the REGISTER doesn't have the "Supported: path, outbound" like it should, either because the config'd registration doesnt have 'support_path=yes' and 'support_outbound=yes' or because i missed a spot in the code that is needed to add them when using the cli register, or because you're not up-to-date with the current code?
naf

1 edit

naf to xekon

Member

to xekon
said by xekon:

Was there a way I could have git cloned that would not be reporting the asterisk version as GIT-master-2fd0a875d4

I assume its ok for me to be asking for help here for setting up the GVsip code, if not then let me know and I can start a thread somewhere else. Thank you.

yes, this is the right place: cant report test results if you dont get it setup, right?

"GIT-master-2fd0a875d4" is fine: asterisk's get-version-from-git script just hardcodes the branch name as master without looking, so that's just how its going to show up

[also, i stole your one-liner clone command and put it in the intro post]
xekon
join:2017-09-15
Hoodsport, WA

xekon

Member

Thanks! one more question, I am assuming because it says master, thats because gvsip is a fork of master? That would mean your gvsip branch is based off Asterisk 15 correct? If not, what branch of Asterisk is gvsip based on? I know plenty of people are still using Asterisk 13 as well, so I figure I better ask.

I see your opening post says:

download the gvsip branch as a patch and apply it against asterisk 13.21.1

so maybe asterisk 13.21.1 is what gvsip is forked from?
naf
join:2017-12-12

2 recommendations

naf

Member

it just says master, cause thats whats hardcoded as MAINLINE_BRANCH in build_tools/make_version

but yes, i forked their master branch. but there's not any conflicting changes between 13 and master, so you can apply it against either.
maxm
join:2002-10-14
Atlanta, GA

2 edits

maxm

Member

naf:

Here is something interesting:

Inbound is working fine even after SSL error now.

Outbound will fail after SSL error, but after I take a incoming call, it will work again...

I sent you a new log

--edit

Scratch that, I just tested again. Incoming works, but outgoing still fails after SSL error
jebs
join:2018-06-30
North Vancouver, BC

jebs to WhyADuck

Member

to WhyADuck
sorry not trying to ruffle any feathers, but i'm just trying to figure out how to remove the 48 dial plan
deleting just 48 from the .conf file doesn't seem to work

any help would be appreciated

thanks

WhyADuck
Premium Member
join:2003-03-05

WhyADuck

Premium Member

jebs, did you remember to reload the configuration after you made the changes? Please start a new thread if you need any more help with this.
maxm
join:2002-10-14
Atlanta, GA

1 recommendation

maxm to naf

Member

to naf
I tried fooling around with pjsip register and found following:

pjsip send unregister gvsip seems to giving me "SSL 6 [SSL_ERROR_ZERO_RETURN]" reliably.

Then when i try pjsip send register gvsip, It will show rejected first then after 60s it will register.
xekon
join:2017-09-15
Hoodsport, WA

xekon to naf

Member

to naf
I have the GVsip git clone asterisk built and installed as well as freepbx, and my extensions are registered.

I think all that is left is to implement pjsip_custom and modify rtp.conf and extensions.conf according to the github page: »github.com/naf419/asteri ··· ee/gvsip

Is the posted pjsip config on the github page still the recommended setup, or has anything changed?
c4pt00
join:2018-07-01
New York, NY

c4pt00 to xekon

Member

to xekon
its the media transport dropping one side of the stream check your firewall for inbound outbound ports for the Real Time Protocol* 10000-20000?
check other relevant ports, with a network top like "jnettop" or pfTop

Outbound calls however, The other end can hear me, but I cannot hear them.
c4pt00

c4pt00 to xekon

Member

to xekon
this is a port or NAT problem
c4pt00

c4pt00 to jsolo1

Member

to jsolo1
check port, NAT settings, check other settings in your config
c4pt00

c4pt00 to TheTechGuru

Member

to TheTechGuru
@TheTechGuru see the post about one sided media streams with the media transport
naf
join:2017-12-12

naf to maxm

Member

to maxm
said by maxm:

one observation:

The SSL error time is not random. It's the exact time when the registration time is set to expire.

Asterisk refresh the registration 10s before expiration. Sometime google still let it expire after successful refresh.

Is it possible to refresh registration sooner?

If you want to try it, increase the value of REREGISTER_BUFFER_TIME in res/res_pjsip_outbound_registration.c
Brown
join:2018-01-21

1 edit

Brown to naf

Member

to naf
I've noticed that people using naf Asterisk or Simonics GVSIP still have 'chat' available (switchable) in their GV accounts but people using Obi200's are fully converted over to GV-SIP. Could this be why you're seeing issues with Asterisk? Does everyone maybe have to 'fully' convert?
Edit: reduced number of questions.
GIvic
join:2018-06-30
Mountain View, CA

GIvic to xekon

Member

to xekon
That is the current latest for testing. Last commit is, »github.com/naf419/asteri ··· 326d5d0f