SOLVED Register packet difference between clients

Status
Not open for further replies.

TurabG

Member
Aug 25, 2022
77
6
8
44
Hi.

I have Yealink phones work with auto provisioning. When I watch the register request these phones send, I see that it registers with only one request like:

Code:
Via: SIP/2.0/TCP 10.0.0.144:12465;branch=z9hG4bK128604767;rport
From: "1001" <sip:1001@domain>;tag=1642326358
To: "1001" <sip:1001@domain>
Call-ID: 0_1934327449
CSeq: 397 REGISTER
Contact: <sip:1001@10.0.0.144:12465;transport=TCP>
Authorization: Digest username="1001", realm="domain", nonce="xxxxxxxxxxxxxxxxxxxxxxxx", ur
"sip:domain", response="xxxxxxxxxxxxxxxxxxxxxxxx", algorithm=MD5, cnonce="xxxxxxxxx", qop=auth,
=00000396
Allow: INVITE, INFO, PRACK, ACK, BYE, CANCEL, OPTIONS, NOTIFY, REGISTER, SUBSCRIBE, REFER, PUBLISH, UPDA
, MESSAGE
Max-Forwards: 70
User-Agent: Yealink SIP-T21P_E2 52.84.0.140
Expires: 1200
Allow-Events: talk,hold,conference,refer,check-sync
Content-Length: 0

Here, "domain" is a one word domain name like "company1". Not a tld and not FQDN. This request is responded with a 200, registering it successfully.

Now I am trying the same settings on a mobile phone with GS Wave, I fill the fields exactly as the same I see on Yealink phone management panel. But GS wave sends two requests at first of which is the one expecting a 401 and later sends an auth. But the request content is different and it keeps getting 403 back.

First request:
Code:
Via: SIP/2.0/TCP 10.0.0.186:12036;branch=z9hG4bK1397466438;rport
From: <sip:1001@domain@fqdn.tld:5080>;tag=829762152
To: <sip:1001@domain@fqdn.tld:5080>
Call-ID: 1068685397-12036-1@BA.B.D.BIG
CSeq: 2000 REGISTER
Contact: <sip:1001@domain@10.0.0.186:12036>;expires=0
Max-Forwards: 70
User-Agent: Grandstream Wave 1.0.3.34
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

Here, domain is the domain as above. fqdn.tld is the fully qualified domain name, the Fusion server which exactly appears in Yealink "host" field. This request is responded with a 401 and then it makes the second request like:

Code:
Via: SIP/2.0/TCP 10.0.0.186:12036;branch=z9hG4bK1397466438;rport
From: <sip:1001@domain@fqdn.tld:5080>;tag=829762152
To: <sip:1001@domain@fqdn.tld:5080>
Call-ID: 1068685397-12036-1@BA.B.D.BIG
CSeq: 2001 REGISTER
Contact: <sip:1001@domain@10.0.0.186:12036>;expires=0
Authorization: Digest username="1001", realm="domain@fqdn.tld", nonce="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", uri="sip:fqdn:5080", response="xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", algorithm=MD5, cnonce="xxxxxxxxxxx", qop=auth, nc=00000001
Max-Forwards: 70
User-Agent: Grandstream Wave 1.0.3.34
Allow: INVITE, ACK, OPTIONS, CANCEL, BYE, SUBSCRIBE, NOTIFY, INFO, REFER, UPDATE, MESSAGE
Content-Length: 0

Both have exactly same things typed into the respective fields but the "from", "to", "realm", "contact" and sip URIs are completely in different format in the requests. Why is that and how can I fix it?
 

TurabG

Member
Aug 25, 2022
77
6
8
44
In particular, here are the format differences:

Yealink From and To: "1020" <sip:1020@company1> (As company1 is being the "domain", I am using one word domain for tenants.)
Softphone From and To: "1020"<sip:1020@company1@public_sip_host_fqdn: port>

Yealink realm: "company1"
Softphone realm: "company1@public_sip_host_fqdn"

Yealink contact: "<sip:1020@client's_public_or_local_ip: port;transport=TCP>"
Some of the softphones are the same with Yealink and some are: "<sip:1020@company1@client's_local_ip: port;transport=TCP>"

Yealink uri: "sip:company1"
Softphone uri: "sip:company1@public_sip_host_fqdn: port"

As another difference, I see "alias" chained on Via header of the softphone while it is absent in Yealink's.
 
Last edited:

DigitalDaz

Administrator
Staff member
Sep 29, 2016
3,044
565
113
Really, you need to use fqdn for each tenant, it is far easier this way
 

TurabG

Member
Aug 25, 2022
77
6
8
44
Thank you. Yes I figured that now. Why I thought this could be a viable approach was that because pretty much interestingly, Yealink phones worked without a fqdn, by just typing "user@domain" into the username field. I wouldn't have expected that to work now knowing that fqdn is the way to go.

Now I have a fqdn for the tenant and username is just the extension number and the host name is the fqdn of the tenant rather than the one I actually used for web GUI.
 
Status
Not open for further replies.