Thanks for answer. Contact is Ok. It is just literal mistake at dump. This error happens because CSeq not incremented by kamailio. Already talking about this with Daniel at the another List. 

2014-10-31 1:37 GMT+04:00 Gonzalo Gasca <gascagonzalo@gmail.com>:
What about the Contact header,
Contact:<sip:Vebinar-gw2@sip.myservice.com:5068>
Can you verify is a valid one.




On Wed, Oct 29, 2014 at 3:56 PM, Yuriy Gorlichenko <ovoshlook@gmail.com> wrote:
Hello. I use kamailio for calling to porvider. My providr seccefuully registered from UAC module, but when I try to call through it? it back 401 Unauthorised. I send second try with Digest Auth header at INVITE and it receive me 401 too...

I register this provider from asterisk and call succesfully Ok. So i get dump from asterisk This is successfull INVITE:

Via: SIP/2.0/UDP 17.4.28.7:50600;branch=z9hG4bK5f118681;rport
Max-Forwards: 70
From: <sip:gw2@17.4.28.7:50600>;tag=as33192a38
CSeq: 103 INVITE
User-Agent: Asterisk PBX 12.6.1
Authorization: Digest username="gw2", realm="provider.com", algorithm=MD5, uri="sip:89126975590@sip.provider.com", nonce="014d80ca", response="67bad8a0c97afc2b6747b471a56bca9f"
Date: Wed, 29 Oct 2014 18:50:50 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 253

v=0
o=root 1098729670 1098729671 IN IP4 17.4.28.7
s=Asterisk PBX 12.6.1
c=IN IP4 17.4.28.7
t=0 0
m=audio 10088 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv


Then I get dump from my kamailio (unsuccessfull INVITE)

Record-Route: <sip:sip.myservice.com:5068;nat=yes;ftag=as4684d4b9;lr=on>
Via: SIP/2.0/UDP sip.myservice.com:5068;branch=z9hG4bK600b.1d5ff0fd59d4f3d2a1a06d722c0daa92.2
Via: SIP/2.0/UDP my.aterisk:50600;branch=z9hG4bK2b8d9b09;rport=50600
Max-Forwards: 70
From: <sip:gw2@sip.myservice.com:5068>;tag=as4684d4b9
CSeq: 102 INVITE
User-Agent: SoftSwitch
Date: Wed, 29 Oct 2014 22:32:32 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 312
Authorization: Digest username="gw2", realm="provider.com", nonce="10129bde", uri="sip:89126975590@sip.provider.com ", response="6d3411b24cbb57ad72271790ec01b453", algorithm=MD5

v=0
o=root 468654998 468654998 IN IP4 1.2.3.4
s=SoftSwitch
c=IN IP4 1.2.3.4
t=0 0
m=audio 30104 RTP/AVP 8 3 0 101
a=rtpmap:8 PCMA/8000
a=rtpmap:3 GSM/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=maxptime:150
a=sendrecv
a=rtcp:30105


I see difference between packetts only at SDP (not inportant things) and at VIA and request route Headers. All other fields identical. 

So -why Asterisk call successull and Kamailio kall unsuccessfull? What the differense?

_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users



_______________________________________________
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list
sr-users@lists.sip-router.org
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users