It looks alright to me. What's the problem anyway? -benny On Wed, Jun 3, 2009 at 9:23 PM, Davide Marrone <davide at skebby.com> wrote: > Hi all, > I have a problem with the registration process to the sip server, this is > the code that I'm using: > > > /* Register to SIP server by creating SIP account. */ > { > pjsua_acc_config cfg; > > pjsua_acc_config_default(&cfg); > cfg.id = id; > cfg.reg_uri = reg_uri; > cfg.cred_count = 1; > cfg.cred_info[0].realm = realm; > cfg.cred_info[0].scheme = pj_str("digest"); > cfg.cred_info[0].username = user; > cfg.cred_info[0].data_type = PJSIP_CRED_DATA_PLAIN_PASSWD; > cfg.cred_info[0].data = pass; > if (use_proxy){ > cfg.proxy_cnt = 1; > cfg.proxy[0] = proxy; > } > > status = pjsua_acc_add(&cfg, PJ_TRUE, &acc_id); > if (status != PJ_SUCCESS) error_exit("Error adding account", status); > } > > with the stack version 0.8.0 all works fine, I can register to the > server and the I can do all I need without any problem but with any > version > 0.8.0 I have some problem, the registration process fails. > This is the network traffic that is generated from the same source of > code with the two different stack. > > > ////////////////////////////////////// > with 0.8.0 (all works fine) > ////////////////////////////////////// > > U 192.168.203.13:5062 -> 192.168.203.200:5060 > REGISTER sip:192.168.203.200 SIP/2.0. > Via: SIP/2.0/UDP > 192.168.103.193:5062;rport;branch=z9hG4bKPj2f430000000367458b6b. > Max-Forwards: 70. > From: <sip:801@192.168.203.200 <sip%3A801 at 192.168.203.200> > >;tag=2f430000000267458b6b. > To: <sip:801 at 192.168.203.200 <sip%3A801 at 192.168.203.200>>. > Call-ID: 2f430000000167458b6b. > CSeq: 64678 REGISTER. > User-Agent: SIP client. > Contact: <sip:801 at 192.168.103.193:5062;transport=UDP>. > Expires: 300. > Content-Length: 0. > . > > # > U 192.168.203.200:5060 -> 192.168.203.13:5062 > SIP/2.0 401 Unauthorized. > Via: SIP/2.0/UDP > 192.168.103.193:5062;rport;branch=z9hG4bKPj2f430000000367458b6b. > From: <sip:801@192.168.203.200 <sip%3A801 at 192.168.203.200> > >;tag=2f430000000267458b6b. > To: <sip:801 at 192.168.203.200 <sip%3A801 at 192.168.203.200>>;tag=1244033933. > Call-ID: 2f430000000167458b6b. > CSeq: 64678 REGISTER. > WWW-Authenticate: Digest realm="192.168.203.200", > nonce="72963dba000000c", opaque="4a26738d", stale=false, algorithm=MD5, > qop="auth". > Content-Length: 0. > . > > # > U 192.168.203.13:5062 -> 192.168.203.200:5060 > REGISTER sip:192.168.203.200 SIP/2.0. > Via: SIP/2.0/UDP > 192.168.103.193:5062;rport;branch=z9hG4bKPj2f430000000567458b6b. > Max-Forwards: 70. > From: <sip:801@192.168.203.200 <sip%3A801 at 192.168.203.200> > >;tag=2f430000000267458b6b. > To: <sip:801 at 192.168.203.200 <sip%3A801 at 192.168.203.200>>. > Call-ID: 2f430000000167458b6b. > CSeq: 64679 REGISTER. > User-Agent: SIP client. > Contact: <sip:801 at 192.168.103.193:5062;transport=UDP>. > Expires: 300. > Authorization: Digest username="801", realm="192.168.203.200", > nonce="72963dba000000c", uri="sip:192.168.203.200", > response="6891adac782043270f386a165073d3f1", algorithm=MD5, > cnonce="2f430000000467458b6b", opaque="4a26738d", qop=auth, nc=00000001. > Content-Length: 0. > . > > # > U 192.168.203.200:5060 -> 192.168.203.13:5062 > SIP/2.0 200 OK. > Via: SIP/2.0/UDP > 192.168.103.193:5062;rport;branch=z9hG4bKPj2f430000000567458b6b. > From: <sip:801@192.168.203.200 <sip%3A801 at 192.168.203.200> > >;tag=2f430000000267458b6b. > To: <sip:801 at 192.168.203.200 <sip%3A801 at 192.168.203.200>>;tag=1244033933. > Call-ID: 2f430000000167458b6b. > CSeq: 64679 REGISTER. > Contact: <sip:801 at 192.168.103.193:5062;transport=UDP>;expires=300. > Expires: 300. > Content-Length: 0. > . > > > > > > ////////////////////////////////////// > with > 0.8.0 > ////////////////////////////////////// > > interface: eth0 (192.168.103.0/255.255.255.0) > filter: (ip or ip6) and ( port 5060 ) > # > U 192.168.203.13:5062 -> 192.168.203.200:5060 > REGISTER sip:192.168.203.200 SIP/2.0. > Via: SIP/2.0/UDP > 192.168.103.193:5062 > ;rport;branch=z9hG4bKPjUed8.SMoINSaGdw3-mbsyubZaogiXJ0L. > Max-Forwards: 70. > From: <sip:804@192.168.203.200 <sip%3A804 at 192.168.203.200> > >;tag=VY4jKo4o.IdDvuFfRrPJr4i0lk2lQOvM. > To: <sip:804 at 192.168.203.200 <sip%3A804 at 192.168.203.200>>. > Call-ID: DOf4tunlabtfaJtiUqIJchVk4SBI-WIp. > CSeq: 53673 REGISTER. > User-Agent: SIP client. > Contact: <sip:804 at 192.168.103.193:5062>. > Expires: 300. > Content-Length: 0. > . > > # > U 192.168.203.200:5060 -> 192.168.203.13:5062 > SIP/2.0 401 Unauthorized. > Via: SIP/2.0/UDP > 192.168.103.193:5062 > ;rport;branch=z9hG4bKPjUed8.SMoINSaGdw3-mbsyubZaogiXJ0L. > From: <sip:804@192.168.203.200 <sip%3A804 at 192.168.203.200> > >;tag=VY4jKo4o.IdDvuFfRrPJr4i0lk2lQOvM. > To: <sip:804 at 192.168.203.200 <sip%3A804 at 192.168.203.200>>;tag=1244033596. > Call-ID: DOf4tunlabtfaJtiUqIJchVk4SBI-WIp. > CSeq: 53673 REGISTER. > WWW-Authenticate: Digest realm="192.168.203.200", > nonce="24e20ee8a000000f", opaque="4a26723c", stale=false, algorithm=MD5, > qop="auth". > Content-Length: 0. > . > > # > U 192.168.203.13:5062 -> 192.168.203.200:5060 > REGISTER sip:192.168.203.200 SIP/2.0. > Via: SIP/2.0/UDP > 192.168.103.193:5062 > ;rport;branch=z9hG4bKPjstw7v39FoDAf.hnUh2yATTMpdNQcM9qj. > Max-Forwards: 70. > From: <sip:804@192.168.203.200 <sip%3A804 at 192.168.203.200> > >;tag=VY4jKo4o.IdDvuFfRrPJr4i0lk2lQOvM. > To: <sip:804 at 192.168.203.200 <sip%3A804 at 192.168.203.200>>. > Call-ID: DOf4tunlabtfaJtiUqIJchVk4SBI-WIp. > CSeq: 53674 REGISTER. > User-Agent: SIP client. > Contact: <sip:804 at 192.168.103.193:5062>. > Expires: 300. > Authorization: Digest username="804", realm="192.168.203.200", > nonce="24e20ee8a000000f", uri="sip:192.168.203.200", > response="7efdaf20fc83d0b1beb144d57d905ad5", algorithm=MD5, > cnonce="iwH347HDqfxXSoG0LgIqT02VJaJpWhdJ", opaque="4a26723c", qop=auth, > nc=00000001. > Content-Length: 0. > . > > > any suggentions? > thank you > Davide > > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip at lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20090608/25b8af41/attachment-0001.html>