I tried putting the username in username and from user field still the same problem.
send 606 bytes to udp/[111.111.11.1]:5060 at 13:56:24.330684:
------------------------------------------------------------------------
Via: SIP/2.0/UDP 222.222.222.22;rport;branch=z9hG4bKU188me5pZvX9m
Max-Forwards: 70
Call-ID: 153de830-4f66-11e7-b03f-23e0f427f687
CSeq: 108298228 REGISTER
Contact: <sip:gw+nameg...@222.222.222.22:5060;transport=udp;gw=namegateway_gw>
Expires: 3600
User-Agent: ASTPP
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: path, replaces
Content-Length: 0
------------------------------------------------------------------------
recv 344 bytes from udp/[111.111.11.1]:5060 at 13:56:24.356329:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 222.222.222.22;rport=5060;branch=z9hG4bKU188me5pZvX9m;received=222.222.222.22
Call-ID: 153de830-4f66-11e7-b03f-23e0f427f687
CSeq: 108298228 REGISTER
Server: ED37
Content-Length: 0
------------------------------------------------------------------------
recv 544 bytes from udp/[111.111.11.1]:5060 at 13:56:24.359663:
------------------------------------------------------------------------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 222.222.222.22;rport=5060;branch=z9hG4bKU188me5pZvX9m;received=222.222.222.22
Call-ID: 153de830-4f66-11e7-b03f-23e0f427f687
CSeq: 108298228 REGISTER
WWW-Authenticate: Digest realm="ED", nonce="44d9f0416fc8a03b71b9b06590688669.1497268568", stale=FALSE, algorithm=MD5
Server: ED37
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0
------------------------------------------------------------------------
send 829 bytes to udp/[111.111.11.1]:5060 at 13:56:24.359789:
------------------------------------------------------------------------
Via: SIP/2.0/UDP 222.222.222.22;rport;branch=z9hG4bKva21p9Ntv5Kvg
Max-Forwards: 70
Call-ID: 153de830-4f66-11e7-b03f-23e0f427f687
CSeq: 108298229 REGISTER
Contact: <sip:gw+nameg...@222.222.222.22:5060;transport=udp;gw=namegateway_gw>
Expires: 3600
User-Agent: ASTPP
Allow: INVITE, ACK, BYE, CANCEL, OPTIONS, MESSAGE, INFO, UPDATE, REGISTER, NOTIFY, PUBLISH, SUBSCRIBE
Supported: path, replaces
Authorization: Digest username="username", realm="ED", nonce="44d9f0416fc8a03b71b9b06590688669.1497268568", algorithm=MD5, uri="sip:
voip.provider.com;transport=udp", response="96c343f164b410c5ad0779a07fdd0ad1"
Content-Length: 0
------------------------------------------------------------------------
recv 344 bytes from udp/[111.111.11.1]:5060 at 13:56:24.385185:
------------------------------------------------------------------------
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 222.222.222.22;rport=5060;branch=z9hG4bKva21p9Ntv5Kvg;received=222.222.222.22
Call-ID: 153de830-4f66-11e7-b03f-23e0f427f687
CSeq: 108298229 REGISTER
Server: ED37
Content-Length: 0
------------------------------------------------------------------------
recv 544 bytes from udp/[111.111.11.1]:5060 at 13:56:24.387594:
------------------------------------------------------------------------
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 222.222.222.22;rport=5060;branch=z9hG4bKva21p9Ntv5Kvg;received=222.222.222.22
Call-ID: 153de830-4f66-11e7-b03f-23e0f427f687
CSeq: 108298229 REGISTER
WWW-Authenticate: Digest realm="ED", nonce="44d9f0416fc8a03b71b9b06590688669.1497268568", stale=FALSE, algorithm=MD5
Server: ED37
Allow: ACK, INVITE, BYE, CANCEL, REGISTER, REFER, OPTIONS, INFO, SUBSCRIBE
Content-Length: 0
------------------------------------------------------------------------
2017-06-12 13:56:24.385013 [ERR] sofia_reg.c:2429 namegateway_gw Failed Registration with status Operation has no matching challenge [904]. failure #2
2017-06-12 13:56:25.324996 [WARNING] sofia_reg.c:505 namegateway_gw Failed Registration [904], setting retry to 60 seconds.