Summary: | ASTERISK-07585: problem with authorisation when reload asterisk which register => user:secret... to another asterisk | ||
Reporter: | Martin Vit (festr) | Labels: | |
Date Opened: | 2006-09-27 14:09:52 | Date Closed: | 2007-01-09 13:02:23.000-0600 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/Registration |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) sip-debug-failed_2.txt ( 1) sip-debug-good_2.txt ( 2) sip-debug-workaround_2.txt | |
Description: | First i would like to describe setup: two asterisk boxes: asterisk A and asterisk PROXY. asterisk A: sip.conf: register => test:some:test@HOST [test] username=test type=friend secret=some accountcode=SIP_9 host=HOST nat=yes canreinvite=no dtmfmode=RFC2833 disallow=all allow=g729 allow=ilbc allow=gsm allow=alaw allow=ulaw context=some language=cz qualify=500 deny= permit= asterisk PROXY: sip.conf: [test] username=test type=friend callerid="test"<12> secret=some accountcode=SIP_169 host=dynamic nat=no canreinvite=no dtmfmode=RFC2833 disallow=all allow=g729 context=in_189 qualify=no deny= permit= Scenario: --------- start asterisk A and PROXY. On PROXY sip show peer test: --- cut --- Reg. Contact : sip:s@HOST --- cut --- on asterisk PROXY: Dial(SIP/test): everything is ok, call is accepted. But after doing "CLI> reload" on asterisk A, call is rejected: "Failed to authenticate user..." because "Digest username" is changed from "test" to "s" and comparision user == digestuser will fail (chan_sip.c lines about this comment /* Verify that digest username matches the username we auth as */ Here is shortened debug (sip debug) Good call: Proxy-Authorization: Digest username="test", realm="asterisk", algorithm=MD5... Bad call (after asterisk A invoke reload from CLI) Proxy-Authorization: Digest username="s", realm="asterisk", algorithm=MD5... When reload chan_sip.so on asterisk PROXY, Digest username is again "test" until again reload on asterisk A when it return to "s". Workaround for this is: ----------------------- append "test" to the end of register: register => test:some:test@HOST/test when on PROXY CLI> sip show peer --- cut --- Reg. Contact : sip:test@HOST --- cut --- but now, if i Dial(SIP/test) it will call A not by extension "s" but with extension "test" (every time reload is made on both asterisks) so i have to Dial(SIP/test/s). Resume: ------- I think, that this is bug, because state of registered user is another before reload and after it. p.s.: my english is not well, so i hope, that you understand to this :) | ||
Comments: | By: Martin Vit (festr) 2006-09-27 15:22:42 I've attached SIP debugs as requested. By: Serge Vecher (serge-v) 2006-09-27 15:33:49 hmm, I don't see the [debug] part .... Make sure your logger.conf has the following line and redo the logs, please: console => notice,warning,error,debug By: Martin Vit (festr) 2006-09-27 17:06:25 sorry, i've reread bug guidelines and corrected debugs with debug and verbose levels of 4. debug level was 1 and verbose was 3. I've uploaded new ones. By: Olle Johansson (oej) 2006-09-28 13:11:31 Don't use the "username" setting. It confuses you. By: Martin Vit (festr) 2006-09-28 14:08:12 i dont understand By: Olle Johansson (oej) 2006-10-29 10:39:54.000-0600 In the config above you use "username=". Remove that and test again. By: jmls (jmls) 2006-11-19 13:32:23.000-0600 festr: did you removed "username=" ? By: Serge Vecher (serge-v) 2007-01-09 13:02:22.000-0600 no response from festr |