[Asterisk-Users] REGISTER headers changed

Jason Frisch jfrisch at tsukaeru.net
Thu Mar 9 20:54:19 MST 2006


Problem was:
make sure you put nat=never (or maybe no) in globals as you need
this bit of code to work:

static void build_via(struct sip_pvt *p, char *buf, int len)
{
char iabuf[INET_ADDRSTRLEN];

/* z9hG4bK is a magic cookie. See RFC 3261 section 8.1.1.7 */
if (ast_test_flag(p, SIP_NAT) & SIP_NAT_RFC3581)
snprintf(buf, len, "SIP/2.0/UDP %s:%d;branch=z9hG4bK%08x;rport",
ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport, p->branch);
else /* Work around buggy UNIDEN UIP200 firmware and <----------- needed
for certain providers in japan */
snprintf(buf, len, "SIP/2.0/UDP %s:%d;branch=z9hG4bK%08x",
ast_inet_ntoa(iabuf, sizeof(iabuf), p->ourip), ourport, p->branch);
}

>
>Jason Frisch wrote:
>
>  
>
>>Can someone help me with upgrading to the lastest version. I am using the
>>same sip.conf file, but the headers have changed and registration fails.
>>Has something change in the conf file that would cause this?
>>
>>Notice 1.2.5 has no Authoization at all...
>>
>>Regards,
>>
>>Jason
>>
>>
>>Version 1.0.9
>>---------------------------
>>REGISTER sip:voip-ca35323.ocn.ne.jp SIP/2.0
>>Via: SIP/2.0/UDP xxxx:5060;branch=z9hG4bK035070d8
>>From: <sip:xxxx at ocn.ne.jp>;tag=as1cdfeadf
>>To: <sip:xxxx at ocn.ne.jp>
>>Call-ID: 509854610f13c5186000ed10283e8925 at 127.0.0.1
>>CSeq: 103 REGISTER
>>User-Agent: Asterisk PBX
>>Authorization: Digest username="someusername",
>>realm="nc01.ipp.biglobe.ne.jp", algorithm=MD5, uri="sip:2
>>10.227.109.232", nonce="1141805370",
>>response="016070a49b3caa88a3fb76e8b7a91aa1", opaque=""
>>Expires: 120
>>Contact: <sip:xxxx at 60.32.160.80>
>>Event: registration
>>Content-Length: 0
>>
>>(no NAT) to 210.227.109.232:5060
>>denwa*CLI>
>>
>>Sip read:
>>SIP/2.0 200 OK
>>v: SIP/2.0/UDP xxx:5060;branch=z9hG4bK035070d8
>>From: <sip:xxxx at ocn.ne.jp>;tag=as1cdfeadf
>>To: <sip:xxxx at ocn.ne.jp>
>>Call-ID: 509854610f13c5186000ed10283e8925 at 127.0.0.1
>>CSeq: 103 REGISTER
>>User-Agent: Asterisk PBX
>>Expires: 7200
>>m: <sip:xxxx at xxxx:5060>;expires=7200
>>Event: registration
>>Content-Length: 0
>>Date: Wed, 08 Mar 2006 08:55:11 GMT
>>
>>
>>--------------------------
>>Version 1.2.5
>>--------------------------
>>REGISTER sip:voip-ca35323.ocn.ne.jp SIP/2.0
>>Via: SIP/2.0/UDP xxxx:5060;branch=z9hG4bK08b2597f;rport
>>From: <sip:xxxx at ocn.ne.jp>;tag=as6d23ff7d
>>To: <sip:xxxx at ocn.ne.jp>
>>Call-ID: 138ded9c33f3eb22537fa1bd59463623 at 127.0.0.1
>>CSeq: 102 REGISTER
>>User-Agent: Asterisk PBX
>>Max-Forwards: 70
>>Expires: 120
>>Contact: <sip:xxxx at xxxx>
>>Event: registration
>>Content-Length: 0
>>
>><-- SIP read from xxxx:5060:
>>SIP/2.0 400 Bad Request
>>v: SIP/2.0/UDP xxxx:5060;branch=z9hG4bK08b2597f
>>From: <sip:xxxx at ocn.ne.jp>;tag=as6d23ff7d
>>To: <sip:xxxx at ocn.ne.jp>
>>Call-ID: 138ded9c33f3eb22537fa1bd59463623 at 127.0.0.1
>>CSeq: 102 REGISTER
>>User-Agent: Asterisk PBX
>>Expires: 120
>>Event: registration
>>l: 0
>>
>>
>>
>>_______________________________________________
>>--Bandwidth and Colocation provided by Easynews.com --
>>
>>Asterisk-Users mailing list
>>To UNSUBSCRIBE or update options visit:
>>  http://lists.digium.com/mailman/listinfo/asterisk-users
>> 
>>
>>    
>>
>
>  
>




More information about the asterisk-users mailing list