Re: [asterisk-users] Realtime integration: Unregistered clients showing as registered?
It is the way it works. First the phone sends a REGISTER without any password. Asterisk answers with a Unauthorized and provide a nonce to be used for the next registration attempt, using it to encrypt the password. Leandro 2014-05-14 13:12 GMT+02:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com: Hello, After a small break from working on this, I got the idea of tcpdumping the correct ports. What I see is REGISTER messages from Kamailio port to Asterisk, which are replied with 401 Unauthorized. Why is this happening? In my sippeers table the secret field has no value (tried both NULL and empty string) and the added field sippasswd has the correct password for the user. The above might be the cause of my problem, would anyone be able to advice me to get to correct behaviour? Now Kamailio sees the clients as registered, which would be wrong if Asterisk doesn't. cheers, Olli 2014-04-24 11:27 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com : Hello all, I've been testing a Kamailio Asterisk Realtime integration, and found a strange situation. My problem is that when using the integration, everything seems ok but Asterisk does not see the clients as registered. Kamailio and the clients report registered clients. Also calls fail. In Asterisk cli sip show peers shows nothing but for example realtime load sipusers name 660 shows the user data. Field regseconds has a value and fullcontact has value 'sip:660@127.0.0.1:5060' (kamailio ip:port as they are on the same machine). I have a very simple dialplan: [general] [default] exten = _XXX,1,NoOp(general : Dialed ${EXTEN}) same = n,Dial(SIP/${EXTEN},3600,rt) same = n,Hangup Here's more on my problem and background to it, guys on the Kamailio list helped out but looks like I need to check my Asterisk configuration. https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18555.html My goal is to have all clients in the asterisk database, asterisk (one at this point, several later) handling the calls and Kamailio as proxy. In Kamailio I have the WITH_MULTIDOMAIN directive on but I'm using only one domain 'testers.com'. I have Asterisk 11.8.1 and Kamailio 4.2.0-dev4 on CentOS 6.5, all are on the same rental virtual server. Clients are in my home network behind nat. In MySQL I have database asterisk with table sippeers, where I have clients added like this: INSERT INTO sippeers (name,defaultuser,host,sippasswd,fromuser,fromdomain,callbackextension,type) VALUES ('660', '660', 'dynamic', 'password', '660', 'testers.com ','660','friend'); In this message there are some outputs and a sip trace of a register: https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18558.html What I don't know is how to configure sip.conf, so far I've just been making guesses based on online examples and documentation. My current sip.conf looks like this: [general] bindport = 5070 bindaddr = 127.0.0.1 tcpbindaddr = 127.0.0.1:5070 tcpenable = no limitonpeers = yes ;rtcachefriends = yes tos_sip=cs3 tos_audio=ef realm = testers.com I've tried defining realm and domain values, but I lack proper understanding of those. Can you guys help me out? Are there any other configurations I need to check? Respectfully, Olli -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Realtime integration: Unregistered clients showing as registered?
Hello, Thank you for your response. Actually, I managed to solve a part of the problem; as I use Kamailio to handle authentication, problem was that even though authentication went ok through Kamailio, Asterisk refused to accept messages from Kamailio. That's why Asterisk sent the 401. I think I had incorrect values in the realtime sippeers table rows, and also I had to add values to deny and permit fields, which in fact were in the wrong order. So no wonder I was having problems with authentication! (and yes, I do know how digest authentication works ;)) I fixed the deny values to 0.0.0.0/0.0.0.0 and permit value to Kamailio ip. Even after this I had problems having Asterisk accept the authentications. Asterisk cli was saying: ERROR[20605]: chan_sip.c:30790 build_peer: Bad ACL entry in configuration line 0 : kamailioip:5060 ... that was because I had tried to define kamailio ip with port, as Kamailio and Asterisk are on the same machine, but removing the port solved that (not sure but I guess it is good I use 5060 for Kamailio and 5070 for Asterisk instead of vice versa, perhaps this solution wouldn't work then). Then I found that I had to add values to fields: nat (to force_rport) and defaultip (to 0.0.0.0), and only after that I got Asterisk to see the registered peers. So now everything looks ok from both Asterisk and Kamailio when it comes to authentication. I still can't get calls going though, in the asterisk cli I get 'Everyone is busy/congested at this time', so I'm going to continue investigating that. If you guys have good advice for me at this time I'll be most happy to take them. cheers, Olli 2014-05-15 17:17 GMT+03:00 Leandro Dardini ldard...@gmail.com: It is the way it works. First the phone sends a REGISTER without any password. Asterisk answers with a Unauthorized and provide a nonce to be used for the next registration attempt, using it to encrypt the password. Leandro 2014-05-14 13:12 GMT+02:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com : Hello, After a small break from working on this, I got the idea of tcpdumping the correct ports. What I see is REGISTER messages from Kamailio port to Asterisk, which are replied with 401 Unauthorized. Why is this happening? In my sippeers table the secret field has no value (tried both NULL and empty string) and the added field sippasswd has the correct password for the user. The above might be the cause of my problem, would anyone be able to advice me to get to correct behaviour? Now Kamailio sees the clients as registered, which would be wrong if Asterisk doesn't. cheers, Olli 2014-04-24 11:27 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com : Hello all, I've been testing a Kamailio Asterisk Realtime integration, and found a strange situation. My problem is that when using the integration, everything seems ok but Asterisk does not see the clients as registered. Kamailio and the clients report registered clients. Also calls fail. In Asterisk cli sip show peers shows nothing but for example realtime load sipusers name 660 shows the user data. Field regseconds has a value and fullcontact has value 'sip:660@127.0.0.1:5060' (kamailio ip:port as they are on the same machine). I have a very simple dialplan: [general] [default] exten = _XXX,1,NoOp(general : Dialed ${EXTEN}) same = n,Dial(SIP/${EXTEN},3600,rt) same = n,Hangup Here's more on my problem and background to it, guys on the Kamailio list helped out but looks like I need to check my Asterisk configuration. https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18555.html My goal is to have all clients in the asterisk database, asterisk (one at this point, several later) handling the calls and Kamailio as proxy. In Kamailio I have the WITH_MULTIDOMAIN directive on but I'm using only one domain 'testers.com'. I have Asterisk 11.8.1 and Kamailio 4.2.0-dev4 on CentOS 6.5, all are on the same rental virtual server. Clients are in my home network behind nat. In MySQL I have database asterisk with table sippeers, where I have clients added like this: INSERT INTO sippeers (name,defaultuser,host,sippasswd,fromuser,fromdomain,callbackextension,type) VALUES ('660', '660', 'dynamic', 'password', '660', 'testers.com ','660','friend'); In this message there are some outputs and a sip trace of a register: https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18558.html What I don't know is how to configure sip.conf, so far I've just been making guesses based on online examples and documentation. My current sip.conf looks like this: [general] bindport = 5070 bindaddr = 127.0.0.1 tcpbindaddr = 127.0.0.1:5070 tcpenable = no limitonpeers = yes ;rtcachefriends = yes tos_sip=cs3 tos_audio=ef realm = testers.com I've tried defining realm and domain values, but I lack proper understanding of those. Can you guys help me out? Are there any other configurations I need to check?
Re: [asterisk-users] Realtime integration: Unregistered clients showing as registered?
Hello, After a small break from working on this, I got the idea of tcpdumping the correct ports. What I see is REGISTER messages from Kamailio port to Asterisk, which are replied with 401 Unauthorized. Why is this happening? In my sippeers table the secret field has no value (tried both NULL and empty string) and the added field sippasswd has the correct password for the user. The above might be the cause of my problem, would anyone be able to advice me to get to correct behaviour? Now Kamailio sees the clients as registered, which would be wrong if Asterisk doesn't. cheers, Olli 2014-04-24 11:27 GMT+03:00 Olli Heiskanen ohjelmistoarkkite...@gmail.com: Hello all, I've been testing a Kamailio Asterisk Realtime integration, and found a strange situation. My problem is that when using the integration, everything seems ok but Asterisk does not see the clients as registered. Kamailio and the clients report registered clients. Also calls fail. In Asterisk cli sip show peers shows nothing but for example realtime load sipusers name 660 shows the user data. Field regseconds has a value and fullcontact has value 'sip:660@127.0.0.1:5060' (kamailio ip:port as they are on the same machine). I have a very simple dialplan: [general] [default] exten = _XXX,1,NoOp(general : Dialed ${EXTEN}) same = n,Dial(SIP/${EXTEN},3600,rt) same = n,Hangup Here's more on my problem and background to it, guys on the Kamailio list helped out but looks like I need to check my Asterisk configuration. https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18555.html My goal is to have all clients in the asterisk database, asterisk (one at this point, several later) handling the calls and Kamailio as proxy. In Kamailio I have the WITH_MULTIDOMAIN directive on but I'm using only one domain 'testers.com'. I have Asterisk 11.8.1 and Kamailio 4.2.0-dev4 on CentOS 6.5, all are on the same rental virtual server. Clients are in my home network behind nat. In MySQL I have database asterisk with table sippeers, where I have clients added like this: INSERT INTO sippeers (name,defaultuser,host,sippasswd,fromuser,fromdomain,callbackextension,type) VALUES ('660', '660', 'dynamic', 'password', '660', 'testers.com ','660','friend'); In this message there are some outputs and a sip trace of a register: https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18558.html What I don't know is how to configure sip.conf, so far I've just been making guesses based on online examples and documentation. My current sip.conf looks like this: [general] bindport = 5070 bindaddr = 127.0.0.1 tcpbindaddr = 127.0.0.1:5070 tcpenable = no limitonpeers = yes ;rtcachefriends = yes tos_sip=cs3 tos_audio=ef realm = testers.com I've tried defining realm and domain values, but I lack proper understanding of those. Can you guys help me out? Are there any other configurations I need to check? Respectfully, Olli -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Realtime integration: Unregistered clients showing as registered?
Hello all, I've been testing a Kamailio Asterisk Realtime integration, and found a strange situation. My problem is that when using the integration, everything seems ok but Asterisk does not see the clients as registered. Kamailio and the clients report registered clients. Also calls fail. In Asterisk cli sip show peers shows nothing but for example realtime load sipusers name 660 shows the user data. Field regseconds has a value and fullcontact has value 'sip:660@127.0.0.1:5060' (kamailio ip:port as they are on the same machine). I have a very simple dialplan: [general] [default] exten = _XXX,1,NoOp(general : Dialed ${EXTEN}) same = n,Dial(SIP/${EXTEN},3600,rt) same = n,Hangup Here's more on my problem and background to it, guys on the Kamailio list helped out but looks like I need to check my Asterisk configuration. https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18555.html My goal is to have all clients in the asterisk database, asterisk (one at this point, several later) handling the calls and Kamailio as proxy. In Kamailio I have the WITH_MULTIDOMAIN directive on but I'm using only one domain 'testers.com'. I have Asterisk 11.8.1 and Kamailio 4.2.0-dev4 on CentOS 6.5, all are on the same rental virtual server. Clients are in my home network behind nat. In MySQL I have database asterisk with table sippeers, where I have clients added like this: INSERT INTO sippeers (name,defaultuser,host,sippasswd,fromuser,fromdomain,callbackextension,type) VALUES ('660', '660', 'dynamic', 'password', '660', 'testers.com ','660','friend'); In this message there are some outputs and a sip trace of a register: https://www.mail-archive.com/sr-users@lists.sip-router.org/msg18558.html What I don't know is how to configure sip.conf, so far I've just been making guesses based on online examples and documentation. My current sip.conf looks like this: [general] bindport = 5070 bindaddr = 127.0.0.1 tcpbindaddr = 127.0.0.1:5070 tcpenable = no limitonpeers = yes ;rtcachefriends = yes tos_sip=cs3 tos_audio=ef realm = testers.com I've tried defining realm and domain values, but I lack proper understanding of those. Can you guys help me out? Are there any other configurations I need to check? Respectfully, Olli -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users