Summary: | ASTERISK-12743: 0007016: Nonce blanked in Elastix system | ||
Reporter: | hezude (hezude) | Labels: | |
Date Opened: | 2008-09-16 18:49:24 | Date Closed: | 2011-06-07 14:02:48 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Registration |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) log.txt | |
Description: | asterisk (as client) -------> registers ------------> zte-softswitch zte-ss ----> 401 (nonce="5e527958cfb8005ef60c415f765785d1") ----> ast ast -------------> register with blank nonce! ----------> zte-ss ****** ADDITIONAL INFORMATION ****** i think i encountered something like a bug in chan_sip (asterisk 1.4.21.2 stable). i have here a registration from 2 clients, one x-lite and the other asterisk both registering to a ZTE softswitch. i did "pedantic=yes" in sip.conf but it is not registered. fromdomain=IP-ZTE fromuser=98681430 host=IP-ZTE pedantic=yes secret=Secret type=peer username=98681430 here is the x-lite register: [08-09-17]00:00:17.237 | Info | RESIP:DUM | "Got: SipResp: 200 tid=ed7f62589e032649 cseq=REGISTER contact=98681430@192.168.178.21:25518 / 2 from(wire)" | [08-09-17]00:00:17.237 | Info | RESIP:DUM | "Removing binding" | [08-09-17]00:00:17.556 | Info | RESIP:DUM | "Got: SipResp: 401 tid=9142c4591c415a3d cseq=REGISTER / 3 from(wire)" | [08-09-17]00:00:17.879 | Info | RESIP:DUM | "Got: SipResp: 200 tid=da446b6086014754 cseq=REGISTER / 4 from(wire)" | [08-09-17]00:00:17.879 | Info | RESIP:DUM | "Finished removing registration ClientRegistration sip:98681430@IP-ZTE mEndWhenDone=0" | [08-09-17]00:00:17.879 | Info | RESIP:DUM | "Sending queued request: REGISTER sip:IP-ZTE SIP/2.0 Via: SIP/2.0/ ;branch=z9hG4bK-d8754z-da446b6086014754-1---d8754z-;rport Max-Forwards: 70 Contact: <sip:98681430@IP-DSL:25518;rinstance=9a8ebc3de66d045d> To: ""G-Mobile""<sip:98681430@IP-ZTE> From: ""G-Mobile""<sip:98681430@IP-ZTE>;tag=ae491c4b Call-ID: MDcwNDA5OTM5NDFkN2M0MGRiY2Y4YjY5ZTBjYjUyOTg. CSeq: 5 REGISTER Expires: 3600 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, MESSAGE, SUBSCRIBE, INFO User-Agent: X-Lite release 1100l stamp 47546 Authorization: Digest username=""98681430"",realm="""",nonce=""e0b8456a36cf57b0bf10d835244d8ad2"",uri=""sip:IP-ZTE"",response=""e416fbee39a9ed3765bba22c8f26b534"",algorithm=MD5 Content-Length: 0 for the xlite registering to zte softswitch, everythings ok. but take a look at this trace where asterisk 1.4.21.2 is registering to zte softswitch. REGISTER 12 headers, 0 lines Reliably Transmitting (no NAT) to IP-ZTE:5060: REGISTER sip:IP-ZTE SIP/2.0 Via: SIP/2.0/UDP IP-Asterisk:5060;branch=z9hG4bK30ac4235;rport From: <sip:98681430@IP-ZTE>;tag=as73b24e7e To: <sip:98681430@IP-ZTE> Call-ID: 57af94c379000780227ebe0b715014d9@IP-Asterisk CSeq: 118 REGISTER User-Agent: Asterisk PBX Max-Forwards: 70 Expires: 120 Contact: <sip:98681430@IP-Asterisk> Event: registration Content-Length: 0 <--- SIP read from IP-ZTE:5060 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP IP-Asterisk:5060;received=IP-Asterisk;rport=5060;branch=z9hG4bK30ac4235 To: <sip:98681430@IP-ZTE> From: <sip:98681430@IP-ZTE>;tag=as73b24e7e Call-ID: 57af94c379000780227ebe0b715014d9@IP-Asterisk CSeq: 118 REGISTER User-Agent: ZTE-SoftSwitch WWW-Authenticate: Digest realm="", nonce="5e527958cfb8005ef60c415f765785d1", ZTE-ID=43be83566ad75797738decb0acb2c5e2 Content-Length: 0 Reliably Transmitting (no NAT) to IP-ZTE:5060: REGISTER sip:IP-ZTE SIP/2.0 Via: SIP/2.0/UDP IP-Asterisk:5060;branch=z9hG4bK7d336ee3;rport From: <sip:98681430@IP-ZTE>;tag=as5c337b97 To: <sip:98681430@IP-ZTE> Call-ID: 57af94c379000780227ebe0b715014d9@IP-Asterisk CSeq: 119 REGISTER User-Agent: Asterisk PBX Max-Forwards: 70 Authorization: Digest username="98681430", realm="", algorithm=MD5, uri="sip:IP-ZTE", nonce="", response="27aa0453f982dbc7d3fd88d0dca09efb", opaque="" Expires: 120 Contact: <sip:98681430@IP-Asterisk> Event: registration Content-Length: 0 <--- SIP read from IP-ZTE:5060 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP IP-Asterisk:5060;received=IP-Asterisk;rport=5060;branch=z9hG4bK7d336ee3 To: <sip:98681430@IP-ZTE> From: <sip:98681430@IP-ZTE>;tag=as5c337b97 Call-ID: 57af94c379000780227ebe0b715014d9@IP-Asterisk CSeq: 119 REGISTER User-Agent: ZTE-SoftSwitch WWW-Authenticate: Digest realm="", nonce="5e527958cfb8005ef60c415f765785d1", ZTE-ID=43be83566ad75797738decb0acb2c5e2 Content-Length: 0 | ||
Comments: | By: hezude (hezude) 2008-09-16 19:30:00 can anybody point out where this went wrong? By: Matt Maguire (mmaguire) 2008-09-16 22:25:21 I believe that this is expected behaviour. The WWW-Authenticate: header in the challenge from your ZTE challenge is multiple line. In order to parse this correctly, you need to set the "pedantic=yes" parameter in the [general] section of your sip.conf. I see you tried to specify "pedantic=yes" in your peer definition, but a quick inspection of the code shows that this is only valid in the [general] section. If you don't define "pedantic=yes" in your [general] section, then the default is taken to be "pedantic=no", and then the multiline WWW-Authenticate: header will not be properly parsed. I believe this is most likely why your nonce value in your asterisk response is empty. Please try to move the "pedantic=yes" parameter to the [general] section and retest. By: hezude (hezude) 2008-09-17 03:18:09 Thank you. Problem is solved :). It was great. |