Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-22 Thread Walter Stanish
 Try to delete whole column 'md5secret' from DB peers table.

 Leave only 'secret'. And try then.

Same result.

Regards,
Walter Stanish
Owner / Director
Occident Systems
(+86 15808 700 801)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-22 Thread Grey Man
On Mon, Jul 21, 2008 at 6:40 PM, Walter Stanish
[EMAIL PROTECTED] wrote:
 [Jul 21 15:28:21] DEBUG[2028] chan_sip.c:  Received REGISTER (2) -
 Command in SIP REGISTER
 [Jul 21 15:28:21] DEBUG[2028] chan_sip.c: SIP message could not be
 handled, bad request: ZjFhZjZlNmZmZjM3OWFlYzE0MGYzZDYwYzJmODAwNDg.

 It looks like Asterisk is unhappy with the SIP REGISTER request coming
 from your softphone for some reason. It's very strange that it's
 occurring for two different softphones though.

 Trun on SIP debugging by typing sip debug on your Asterisk console
 and then post up the 4 SIP messages invloved in the register
 transaction so we can take a look and spot why it could be getting
 rejected.

 Sure.

 Here's what happens when kphone starts up:

 ==
 --- SIP read from 192.168.0.25:5060 ---
 REGISTER sip:192.168.0.2 SIP/2.0
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK5760BF8C
 CSeq: 35 REGISTER
 To: Walter sip:[EMAIL PROTECTED]
 Expires: 900
 From: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 Content-Length: 0
 User-Agent: kphone/4.2
 Event: registration
 Allow-Events: presence
 Contact: Walter
 sip:[EMAIL PROTECTED];transport=udp;methods=INVITE, MESSAGE,
 INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER
 black*CLI

 -
 --- (12 headers 0 lines) ---
 Using latest REGISTER request as basis request
 Sending to 192.168.0.25 : 5060 (no NAT)

 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 100 Trying
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK5760BF8C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 CSeq: 35 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 Contact: sip:[EMAIL PROTECTED]
 Content-Length: 0


 

 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 401 Unauthorized
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK5760BF8C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED];tag=as59de1023
 Call-ID: [EMAIL PROTECTED]
 CSeq: 35 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 WWW-Authenticate: Digest algorithm=MD5, realm=asterisk, nonce=7864265a
 Content-Length: 0


 
 Scheduling destruction of SIP dialog '[EMAIL PROTECTED]' in
 32000 ms (Method: REGISTER)
 ==

 Kphone prompts for a password, then the following occurs.

 ==
 --- SIP read from 192.168.0.25:5060 ---
 REGISTER sip:192.168.0.2 SIP/2.0
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK36B0646C
 CSeq: 36 REGISTER
 To: Walter sip:[EMAIL PROTECTED]
 Authorization: Digest username=walter, realm=asterisk,
 nonce=7864265a, uri=sip:192.168.0.2, cnonce=abcdefghi,
 nc=0001, response=10a7024959390c04b4d09c708fac6130, opaque=,
 algorithm=MD5
 Expires: 900
 From: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 Content-Length: 0
 User-Agent: kphone/4.2
 Event: registration
 Allow-Events: presence
 Contact: Walter
 sip:[EMAIL PROTECTED];transport=udp;methods=INVITE, MESSAGE,
 INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER


 -
 --- (13 headers 0 lines) ---
 Using latest REGISTER request as basis request
 Sending to 192.168.0.25 : 5060 (no NAT)

 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 100 Trying
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK36B0646C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 CSeq: 36 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 Contact: sip:[EMAIL PROTECTED]
 Content-Length: 0


 

 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 403 Forbidden (Bad auth)
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK36B0646C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED];tag=as59de1023
 Call-ID: [EMAIL PROTECTED]
 CSeq: 36 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 Content-Length: 0


 
 [Jul 22 00:59:38] NOTICE[2414]: chan_sip.c:15049
 handle_request_register: Registration from 'Walter
 sip:[EMAIL PROTECTED]' failed for '192.168.0.25' - Wrong password
 Scheduling destruction of SIP dialog '[EMAIL PROTECTED]' in
 32000 ms (Method: REGISTER)
 Really destroying SIP dialog '[EMAIL PROTECTED]' Method: REGISTER
 ==

 Just to confirm, the password supplied was 'aaa'.

 In MySQL md5secret = md5('aaa') and secret = 'aaa'.

 Here's what happens with zoiper (one registration click only)...
 ==
 --- SIP read from 

Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-22 Thread Walter Stanish
 It looks like Asterisk is unhappy with the SIP REGISTER request coming
 from your softphone for some reason. It's very strange that it's
 occurring for two different softphones though.

 I couldn't see any sign of the console message from your first trace
 [Jul 21 15:40:47] DEBUG[2105]: chan_sip.c:15372 sipsock_read: SIP
 message could not be handled, bad request: [EMAIL PROTECTED]
 which is a bit strange.

 The 403 Forbidden message you are getting with the KPHone is
 definitely realted to credentials, either the username or password is
 configured incorrectly somewhere. You can test by adding the SIP
 account into sip.conf to get ti working and then after that move onto
 your relatime config.

It definitely seems to be an asterisk realtime config issue.

Just to confirm, the client and server _are_ on the same network
with no intermediate firewalls or NAT.

I just switched back to static config with the same username/password
and authentication worked first time in kphone, as it was working
before.

Zoiper, however, still has issues - unsure why, probably something
related to the fact it's pulling that external IP from somewhere.
(Some kind of automated NAT detection/STUN initialisation?)

At this point I'm unable to get any results from realtime
except a different response when I enter a username that doesn't
exist at all in the realtime tables.

Any further ideas?

Other than trying a different asterisk version, I'm feeling pretty stuck.

Regards,
Walter Stanish
Owner / Director
Occident Systems
(+86 15808 700 801)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-22 Thread Grey Man
On Tue, Jul 22, 2008 at 10:32 AM, Walter Stanish
[EMAIL PROTECTED] wrote:
 Any further ideas?

 Other than trying a different asterisk version, I'm feeling pretty stuck.

Is there an equivalent of the Asterisk console odbc show command for
MySQL? That would show you whether Asterisk has a connection yo your
db.

Can you post up the contents of your extconfig.conf for us to have a look at?

Regards,

Greyman.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-22 Thread Walter Stanish
extconfig.conf contents (as per first message) were:

sipusers = mysql,asterisk_config,sip_users
sippeers = mysql,asterisk_config,sip_peers

However, I've now commented them all out to static config
for testing purposes.

I was unable to locate a long-term changelog, so I'm
currently compiling 1.4.21.1 to see if that makes any
difference.

 Is there an equivalent of the Asterisk console odbc show command for
 MySQL? That would show you whether Asterisk has a connection yo your
 db.

I tried this before posting here (ie: with the two extconfig.conf lines
enabled), and it reported the status as fine.

MySQL is version 14.12 Distrib 5.0.54

Regards,
Walter Stanish
Owner / Director
Occident Systems
(+86 15808 700 801)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP [SOLVED!]

2008-07-22 Thread Walter Stanish
After upgrading to 1.4.21.1 I received some more verbose debug messages.

Apparently the cause of the problem was that the following table
columns MUST exist for a SIP peer to register.

 ipaddr (i used varchar(32))
 port (i used int unsigned)
 regseconds (i used bigint unsigned)

This is apparently because realtime stores the IP address, port and
registration time for a dynamic IP, realtime peer in the database
along with the static accounting information.

After adding those columns I was able to register fine with asterisk
from kphone.

Unfortunately the console commands 'sip show peers', 'sip show
registry', etc. don't seem to work (is this normal?) ... but otherwise
all is fine.

Thanks to all who offered help while debugging this issue.

Regards,
Walter Stanish
Owner / Director
Occident Systems
(+86 15808 700 801)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-21 Thread Walter Stanish
Hi all, Asterisk is great but I'm having issues with setting up
realtime for our call center, which is needed for login integration
with the rest of our applications (telephonists' web interface, etc.).

I have reviewed a large number of previous posts to the mailing list
and the voip-info wiki to no avail.

Setup is as follows:
 Linux 2.6.23 (gentoo) / AMD Athlon(tm) 64 Processor 3000+ / 2GB RAM
 Sangoma  A102 card + E1 (30 channels)
 Asterisk 1.4.17 (custom compile from source, not using gentoo package
or any patches)
 Wanpipe drivers 3.2.3.0
 Iaxmodem + libiax 2-0.2.3-SVN-20071223+

I have tried both kphone and zoiper (linux) clients.  On kphone the
interface's register result is 'bad password', on zoiper registration
continues indefinitely but after the first request it is ignored by
asterisk due to being duplicate, after a time it fails silently.

The debug log:
[Jul 21 15:28:21] DEBUG[2028] chan_sip.c: = No match Their Call ID:
NDcxYjAyNTc4ZDQwZjZhMzM5OGE0MWYxYjg0YzZhZDk. Their Tag a9a71835 Our
tag: as0a26e7a5
[Jul 21 15:28:21] DEBUG[2028] chan_sip.c: Allocating new SIP dialog
for ZjFhZjZlNmZmZjM3OWFlYzE0MGYzZDYwYzJmODAwNDg. - REGISTER (No RTP)
[Jul 21 15:28:21] DEBUG[2028] chan_sip.c:  Received REGISTER (2) -
Command in SIP REGISTER
[Jul 21 15:28:21] DEBUG[2028] chan_sip.c: = Found Their Call ID:
ZjFhZjZlNmZmZjM3OWFlYzE0MGYzZDYwYzJmODAwNDg. Their Tag f1b0df07 Our
tag: as25a61774
[Jul 21 15:28:21] DEBUG[2028] chan_sip.c:  Received REGISTER (2) -
Command in SIP REGISTER
[Jul 21 15:28:21] DEBUG[2028] chan_sip.c: SIP message could not be
handled, bad request: ZjFhZjZlNmZmZjM3OWFlYzE0MGYzZDYwYzJmODAwNDg.

Console output:
*CLI [Jul 21 15:40:47] DEBUG[2105]: chan_sip.c:4562 find_call: =
Found Their Call ID: [EMAIL PROTECTED] Their Tag  Our tag:
as60d9fbbb
[Jul 21 15:40:47] DEBUG[2105]: chan_sip.c:15154 handle_request: 
Received REGISTER (2) - Command in SIP REGISTER
[Jul 21 15:40:47] NOTICE[2105]: chan_sip.c:15049
handle_request_register: Registration from 'walter
sip:[EMAIL PROTECTED]' failed for '192.168.0.25' - Wrong password
[Jul 21 15:40:47] DEBUG[2105]: chan_sip.c:15372 sipsock_read: SIP
message could not be handled, bad request: [EMAIL PROTECTED]

This error is different to the error that is received if a username
that is not in the MySQL sip_peers / sip_users table is specified.
Therefore at least the MySQL connection appears to be working.

extconfig.conf:
sipusers = mysql,asterisk_config
sippeers = mysql,asterisk_config

I have also tried explicitly adding ',sip_users' and ',sip_peers' to
these lines, but asterisk behaved similarly.

res_mysql.conf
dbhost = 127.0.0.1
dbname = asterisk_config
dbuser = asterisk
dbpass =snip
;dbport = 3306
dbsock = /tmp/mysql.sock

MySQL tables follow.  They are static right now for debugging
purposes, actually we will use views.  We will use md5 passwords, but
I have both in there right now for testing.

mysql select * from sip_peers;
++++-+--+-+--+--++
| user   | type   | secret | host| context  | pickupgroup |
md5secret| username | name   |
++++-+--+-+--+--++
| walter | friend | aaa| dynamic | outgoing |   1 |
47bce5c74f589f4867dbd57e9ca9f808 | walter   | walter |
++++-+--+-+--+--++
1 row in set (0.00 sec)

mysql select * from sip_users;
++++-+--+-+--++--+
| user   | type   | secret | host| context  | pickupgroup |
md5secret| name   | username |
++++-+--+-+--++--+
| walter | friend | aaa| dynamic | outgoing |   1 |
47bce5c74f589f4867dbd57e9ca9f808 | walter | walter   |
++++-+--+-+--++--+
1 row in set (0.00 sec)

Thanks for any help you can offer.

Regards,
Walter Stanish
Owner / Director
Occident Systems
(+86 15808 700 801)

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-21 Thread Grey Man
On Mon, Jul 21, 2008 at 9:11 AM, Walter Stanish
[EMAIL PROTECTED] wrote:
 [Jul 21 15:28:21] DEBUG[2028] chan_sip.c:  Received REGISTER (2) -
 Command in SIP REGISTER
 [Jul 21 15:28:21] DEBUG[2028] chan_sip.c: SIP message could not be
 handled, bad request: ZjFhZjZlNmZmZjM3OWFlYzE0MGYzZDYwYzJmODAwNDg.


Hi Walter.

It looks like Asterisk is unhappy with the SIP REGISTER request coming
from your softphone for some reason. It's very strange that it's
occurring for two different softphones though.

Trun on SIP debugging by typing sip debug on your Asterisk console
and then post up the 4 SIP messages invloved in the register
transaction so we can take a look and spot why it could be getting
rejected.

Regards,

Greyman.

___
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

AstriCon 2008 - September 22 - 25 Phoenix, Arizona
Register Now: http://www.astricon.net

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-21 Thread Walter Stanish
 [Jul 21 15:28:21] DEBUG[2028] chan_sip.c:  Received REGISTER (2) -
 Command in SIP REGISTER
 [Jul 21 15:28:21] DEBUG[2028] chan_sip.c: SIP message could not be
 handled, bad request: ZjFhZjZlNmZmZjM3OWFlYzE0MGYzZDYwYzJmODAwNDg.

 It looks like Asterisk is unhappy with the SIP REGISTER request coming
 from your softphone for some reason. It's very strange that it's
 occurring for two different softphones though.

 Trun on SIP debugging by typing sip debug on your Asterisk console
 and then post up the 4 SIP messages invloved in the register
 transaction so we can take a look and spot why it could be getting
 rejected.

Sure.

Here's what happens when kphone starts up:

==
--- SIP read from 192.168.0.25:5060 ---
REGISTER sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK5760BF8C
CSeq: 35 REGISTER
To: Walter sip:[EMAIL PROTECTED]
Expires: 900
From: Walter sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
Content-Length: 0
User-Agent: kphone/4.2
Event: registration
Allow-Events: presence
Contact: Walter
sip:[EMAIL PROTECTED];transport=udp;methods=INVITE, MESSAGE,
INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER
black*CLI

-
--- (12 headers 0 lines) ---
Using latest REGISTER request as basis request
Sending to 192.168.0.25 : 5060 (no NAT)

--- Transmitting (no NAT) to 192.168.0.25:5060 ---
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK5760BF8C;received=192.168.0.25
From: Walter sip:[EMAIL PROTECTED]
To: Walter sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
CSeq: 35 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:[EMAIL PROTECTED]
Content-Length: 0




--- Transmitting (no NAT) to 192.168.0.25:5060 ---
SIP/2.0 401 Unauthorized
Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK5760BF8C;received=192.168.0.25
From: Walter sip:[EMAIL PROTECTED]
To: Walter sip:[EMAIL PROTECTED];tag=as59de1023
Call-ID: [EMAIL PROTECTED]
CSeq: 35 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
WWW-Authenticate: Digest algorithm=MD5, realm=asterisk, nonce=7864265a
Content-Length: 0



Scheduling destruction of SIP dialog '[EMAIL PROTECTED]' in
32000 ms (Method: REGISTER)
==

Kphone prompts for a password, then the following occurs.

==
--- SIP read from 192.168.0.25:5060 ---
REGISTER sip:192.168.0.2 SIP/2.0
Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK36B0646C
CSeq: 36 REGISTER
To: Walter sip:[EMAIL PROTECTED]
Authorization: Digest username=walter, realm=asterisk,
nonce=7864265a, uri=sip:192.168.0.2, cnonce=abcdefghi,
nc=0001, response=10a7024959390c04b4d09c708fac6130, opaque=,
algorithm=MD5
Expires: 900
From: Walter sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
Content-Length: 0
User-Agent: kphone/4.2
Event: registration
Allow-Events: presence
Contact: Walter
sip:[EMAIL PROTECTED];transport=udp;methods=INVITE, MESSAGE,
INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER


-
--- (13 headers 0 lines) ---
Using latest REGISTER request as basis request
Sending to 192.168.0.25 : 5060 (no NAT)

--- Transmitting (no NAT) to 192.168.0.25:5060 ---
SIP/2.0 100 Trying
Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK36B0646C;received=192.168.0.25
From: Walter sip:[EMAIL PROTECTED]
To: Walter sip:[EMAIL PROTECTED]
Call-ID: [EMAIL PROTECTED]
CSeq: 36 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Contact: sip:[EMAIL PROTECTED]
Content-Length: 0




--- Transmitting (no NAT) to 192.168.0.25:5060 ---
SIP/2.0 403 Forbidden (Bad auth)
Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK36B0646C;received=192.168.0.25
From: Walter sip:[EMAIL PROTECTED]
To: Walter sip:[EMAIL PROTECTED];tag=as59de1023
Call-ID: [EMAIL PROTECTED]
CSeq: 36 REGISTER
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Supported: replaces
Content-Length: 0



[Jul 22 00:59:38] NOTICE[2414]: chan_sip.c:15049
handle_request_register: Registration from 'Walter
sip:[EMAIL PROTECTED]' failed for '192.168.0.25' - Wrong password
Scheduling destruction of SIP dialog '[EMAIL PROTECTED]' in
32000 ms (Method: REGISTER)
Really destroying SIP dialog '[EMAIL PROTECTED]' Method: REGISTER
==

Just to confirm, the password supplied was 'aaa'.

In MySQL md5secret = md5('aaa') and secret = 'aaa'.

Here's what happens with zoiper (one registration click only)...
==
--- SIP read from 192.168.0.25:5060 ---
REGISTER sip:192.168.0.2;transport=UDP SIP/2.0
Via: SIP/2.0/UDP
snip:5060;branch=z9hG4bK-d8754z-9eb0f4d56eb2c53a-1---d8754z-;rport
Max-Forwards: 70
Contact: 

Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL + SIP

2008-07-21 Thread Mindaugas Kezys
Hi,

Try to delete whole column 'md5secret' from DB peers table.

Leave only 'secret'. And try then.

Regards,
Mindaugas Kezys
http://www.kolmisoft.com


 -Original Message-
 From: [EMAIL PROTECTED] [mailto:asterisk-users-
 [EMAIL PROTECTED] On Behalf Of Walter Stanish
 Sent: Monday, July 21, 2008 8:40 PM
 To: Asterisk Users Mailing List - Non-Commercial Discussion
 Subject: Re: [asterisk-users] Problems w/Asterisk Realtime + MySQL +
 SIP
 
  [Jul 21 15:28:21] DEBUG[2028] chan_sip.c:  Received REGISTER (2)
 -
  Command in SIP REGISTER
  [Jul 21 15:28:21] DEBUG[2028] chan_sip.c: SIP message could not be
  handled, bad request: ZjFhZjZlNmZmZjM3OWFlYzE0MGYzZDYwYzJmODAwNDg.
 
  It looks like Asterisk is unhappy with the SIP REGISTER request
 coming
  from your softphone for some reason. It's very strange that it's
  occurring for two different softphones though.
 
  Trun on SIP debugging by typing sip debug on your Asterisk console
  and then post up the 4 SIP messages invloved in the register
  transaction so we can take a look and spot why it could be getting
  rejected.
 
 Sure.
 
 Here's what happens when kphone starts up:
 
 ==
 --- SIP read from 192.168.0.25:5060 ---
 REGISTER sip:192.168.0.2 SIP/2.0
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK5760BF8C
 CSeq: 35 REGISTER
 To: Walter sip:[EMAIL PROTECTED]
 Expires: 900
 From: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 Content-Length: 0
 User-Agent: kphone/4.2
 Event: registration
 Allow-Events: presence
 Contact: Walter
 sip:[EMAIL PROTECTED];transport=udp;methods=INVITE, MESSAGE,
 INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER
 black*CLI
 
 -
 --- (12 headers 0 lines) ---
 Using latest REGISTER request as basis request
 Sending to 192.168.0.25 : 5060 (no NAT)
 
 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 100 Trying
 Via: SIP/2.0/UDP
 192.168.0.25;branch=z9hG4bK5760BF8C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 CSeq: 35 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 Contact: sip:[EMAIL PROTECTED]
 Content-Length: 0
 
 
 
 
 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 401 Unauthorized
 Via: SIP/2.0/UDP
 192.168.0.25;branch=z9hG4bK5760BF8C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED];tag=as59de1023
 Call-ID: [EMAIL PROTECTED]
 CSeq: 35 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 WWW-Authenticate: Digest algorithm=MD5, realm=asterisk,
 nonce=7864265a
 Content-Length: 0
 
 
 
 Scheduling destruction of SIP dialog '[EMAIL PROTECTED]' in
 32000 ms (Method: REGISTER)
 ==
 
 Kphone prompts for a password, then the following occurs.
 
 ==
 --- SIP read from 192.168.0.25:5060 ---
 REGISTER sip:192.168.0.2 SIP/2.0
 Via: SIP/2.0/UDP 192.168.0.25;branch=z9hG4bK36B0646C
 CSeq: 36 REGISTER
 To: Walter sip:[EMAIL PROTECTED]
 Authorization: Digest username=walter, realm=asterisk,
 nonce=7864265a, uri=sip:192.168.0.2, cnonce=abcdefghi,
 nc=0001, response=10a7024959390c04b4d09c708fac6130, opaque=,
 algorithm=MD5
 Expires: 900
 From: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 Content-Length: 0
 User-Agent: kphone/4.2
 Event: registration
 Allow-Events: presence
 Contact: Walter
 sip:[EMAIL PROTECTED];transport=udp;methods=INVITE, MESSAGE,
 INFO, SUBSCRIBE, OPTIONS, BYE, CANCEL, NOTIFY, ACK, REFER
 
 
 -
 --- (13 headers 0 lines) ---
 Using latest REGISTER request as basis request
 Sending to 192.168.0.25 : 5060 (no NAT)
 
 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 100 Trying
 Via: SIP/2.0/UDP
 192.168.0.25;branch=z9hG4bK36B0646C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED]
 Call-ID: [EMAIL PROTECTED]
 CSeq: 36 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 Contact: sip:[EMAIL PROTECTED]
 Content-Length: 0
 
 
 
 
 --- Transmitting (no NAT) to 192.168.0.25:5060 ---
 SIP/2.0 403 Forbidden (Bad auth)
 Via: SIP/2.0/UDP
 192.168.0.25;branch=z9hG4bK36B0646C;received=192.168.0.25
 From: Walter sip:[EMAIL PROTECTED]
 To: Walter sip:[EMAIL PROTECTED];tag=as59de1023
 Call-ID: [EMAIL PROTECTED]
 CSeq: 36 REGISTER
 User-Agent: Asterisk PBX
 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
 Supported: replaces
 Content-Length: 0
 
 
 
 [Jul 22 00:59:38] NOTICE[2414]: chan_sip.c:15049
 handle_request_register: Registration from 'Walter
 sip:[EMAIL PROTECTED]' failed for '192.168.0.25' - Wrong password
 Scheduling destruction of SIP dialog '[EMAIL