Hello folks,
I am trying to configure this on the same server:
Kamailio v4.2 port 5060 RTPEngine v2.3 port 22222 Asterisk v11.18.0 port 5080
I am follow the Asipto tutorials, for the Kamailio and the real time configuration.
Now, I can talk between extension and PSTN without issues.
But the trouble is with the Status registration with Asterisk. And I need that Status OK because I am using queues in asterisk for call centre.
I got this from with: sip show peers
Name/username Host Dyn Forcerport Comedia ACL Port Status Description Realtime
101 (Unspecified) D Yes Yes 0 UNREACHABLE Cached RT
the status is UNREACHABLE and the asterisk table sipregs won't update after each registration. To be sure, I tried first all config only with asterisk to check that is not a problem with MySQL or something.
On my cfg file I have this for the asterisk registration:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER"; $uac_req(ruri)="sip:" + $var(rip) + ":" + $sel(cfg_get.asterisk.bindport); $uac_req(furi)="sip:" + $au + "@" + $var(rip); $uac_req(turi)="sip:" + $au + "@" + $var(rip); $uac_req(hdrs)="Contact: <sip:" + $au + "@" + $sel(cfg_get.kamailio.bindip) + ":" + $sel(cfg_get.kamailio.bindport) + ">\r\n"; if($sel(contact.expires) != $null) $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $sel(contact.expires) + "\r\n"; else $uac_req(hdrs)= $uac_req(hdrs) + "Expires: " + $hdr(Expires) + "\r\n"; uac_req_send(); }
Any clue?
Thanks!
On Tuesday 23 June 2015 21:22:26 Javier Aristizábal wrote:
On my cfg file I have this for the asterisk registration:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER";
...
uac_req_send(); }
I'm confused, why are you creating a new register request instead of forwarding the REGISTER to the asterisk server? And where are you handling this uac_send()?
I see. How can forwarding the REGISTER to asterisk? Apparently I don't handling the uac_send
On Wed, Jun 24, 2015 at 10:15 AM, Daniel Tryba d.tryba@pocos.nl wrote:
On Tuesday 23 June 2015 21:22:26 Javier Aristizábal wrote:
On my cfg file I have this for the asterisk registration:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER";
...
uac_req_send(); }
I'm confused, why are you creating a new register request instead of forwarding the REGISTER to the asterisk server? And where are you handling this uac_send()?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hi Daniel, I think that in fact I am doing the forwarding register to asterisk with the uac_req_send();
On Wed, Jun 24, 2015 at 10:58 AM, Javier Aristizábal < javieraristizabal@gmail.com> wrote:
I see. How can forwarding the REGISTER to asterisk? Apparently I don't handling the uac_send
On Wed, Jun 24, 2015 at 10:15 AM, Daniel Tryba d.tryba@pocos.nl wrote:
On Tuesday 23 June 2015 21:22:26 Javier Aristizábal wrote:
On my cfg file I have this for the asterisk registration:
route[REGFWD] { if(!is_method("REGISTER")) { return; } $var(rip) = $sel(cfg_get.asterisk.bindip); $uac_req(method)="REGISTER";
...
uac_req_send(); }
I'm confused, why are you creating a new register request instead of forwarding the REGISTER to the asterisk server? And where are you handling this uac_send()?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Javier Aristizábal
On Wednesday 24 June 2015 13:12:48 Javier Aristizábal wrote:
Hi Daniel, I think that in fact I am doing the forwarding register to asterisk with the uac_req_send();
You generate a new REGISTER to the asterisk server, but: -what will you do with the response from asterisk? -what response will go to the endpoint of the original REGISTER?
In other words: do you have a trace for a register?
Hi Daniel,
this is the trace: http://pastebin.com/ncwsptz0
Thanks!
On Wed, Jun 24, 2015 at 3:05 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wednesday 24 June 2015 13:12:48 Javier Aristizábal wrote:
Hi Daniel, I think that in fact I am doing the forwarding register to asterisk with the uac_req_send();
You generate a new REGISTER to the asterisk server, but: -what will you do with the response from asterisk? -what response will go to the endpoint of the original REGISTER?
In other words: do you have a trace for a register?
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
On Wednesday 24 June 2015 15:26:17 Javier Aristizábal wrote:
this is the trace: http://pastebin.com/ncwsptz0
Okee, I think I understand the solution.
Endpoint registers on kamailio via challenge/response. When register is succesful a new register is created for asterisk, but kamailio failes to respond to eht 401 unauthorized. So you either need to handle the challenge/response from asterisk, or tell asterisk to not authenticate registers from kamailio.
Hola Daniel!
Could you please help me with your idea? :)
this is my Routing logic: http://pastebin.com/bdWK1JW3
Thanks!
On Wed, Jun 24, 2015 at 3:48 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wednesday 24 June 2015 15:26:17 Javier Aristizábal wrote:
this is the trace: http://pastebin.com/ncwsptz0
Okee, I think I understand the solution.
Endpoint registers on kamailio via challenge/response. When register is succesful a new register is created for asterisk, but kamailio failes to respond to eht 401 unauthorized. So you either need to handle the challenge/response from asterisk, or tell asterisk to not authenticate registers from kamailio.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Daniel, is this using proxy_challenge? from the auth module?
On Wed, Jun 24, 2015 at 3:55 PM, Javier Aristizábal < javieraristizabal@gmail.com> wrote:
Hola Daniel!
Could you please help me with your idea? :)
this is my Routing logic: http://pastebin.com/bdWK1JW3
Thanks!
On Wed, Jun 24, 2015 at 3:48 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wednesday 24 June 2015 15:26:17 Javier Aristizábal wrote:
this is the trace: http://pastebin.com/ncwsptz0
Okee, I think I understand the solution.
Endpoint registers on kamailio via challenge/response. When register is succesful a new register is created for asterisk, but kamailio failes to respond to eht 401 unauthorized. So you either need to handle the challenge/response from asterisk, or tell asterisk to not authenticate registers from kamailio.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Javier Aristizábal
On Wednesday 24 June 2015 16:02:58 Javier Aristizábal wrote:
Daniel, is this using proxy_challenge? from the auth module?
You need uac_auth(): http://kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%28%2...
How you disable authentication for realtime users in asterisk, I don't know. My guess is to have an empty (NULL) secret in the asterisk table/view.
Yes, I think is with NULL in that field.
So, if I leave the secret field with NULL, I assume that I can manage the authentication with uac_auth(), right?
Or I can do it with ACL?
Thanks!
On Wed, Jun 24, 2015 at 4:20 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wednesday 24 June 2015 16:02:58 Javier Aristizábal wrote:
Daniel, is this using proxy_challenge? from the auth module?
You need uac_auth():
http://kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%28%2...
How you disable authentication for realtime users in asterisk, I don't know. My guess is to have an empty (NULL) secret in the asterisk table/view.
--
Telefoon: 088 0100 700 Sales: sales@pocos.nl | Service: servicedesk@pocos.nl http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 17097024
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hola Daniel,
I just put NULL on the secret field and I got the status OK.. strange isn't?
Name/username Host Dyn Forcerport Comedia ACL Port Status Description Realtime
101/101 192.168.1.156 D Yes Yes 5060 OK (590 ms) Cached RT
On Wed, Jun 24, 2015 at 4:31 PM, Javier Aristizábal < javieraristizabal@gmail.com> wrote:
Yes, I think is with NULL in that field.
So, if I leave the secret field with NULL, I assume that I can manage the authentication with uac_auth(), right?
Or I can do it with ACL?
Thanks!
On Wed, Jun 24, 2015 at 4:20 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wednesday 24 June 2015 16:02:58 Javier Aristizábal wrote:
Daniel, is this using proxy_challenge? from the auth module?
You need uac_auth():
http://kamailio.org/docs/modules/stable/modules/uac.html#uac.f.uac_auth%28%2...
How you disable authentication for realtime users in asterisk, I don't know. My guess is to have an empty (NULL) secret in the asterisk table/view.
--
Telefoon: 088 0100 700 Sales: sales@pocos.nl | Service: servicedesk@pocos.nl http://www.pocos.nl/ | Croy 9c, 5653 LC Eindhoven | Kamer van Koophandel 17097024
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Javier Aristizábal
Well, but in this behavior, anybody can register because the secret field is empty, how can manage a password for each extension?
On Wed, Jun 24, 2015 at 4:59 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wednesday 24 June 2015 16:46:01 Javier Aristizábal wrote:
I just put NULL on the secret field and I got the status OK.. strange
isn't?
This is intended behavior.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
Hello Daniel,
I think I understand now.. thanks a lot for your help and input :-)
On Wed, Jun 24, 2015 at 5:03 PM, Javier Aristizábal < javieraristizabal@gmail.com> wrote:
Well, but in this behavior, anybody can register because the secret field is empty, how can manage a password for each extension?
On Wed, Jun 24, 2015 at 4:59 PM, Daniel Tryba d.tryba@pocos.nl wrote:
On Wednesday 24 June 2015 16:46:01 Javier Aristizábal wrote:
I just put NULL on the secret field and I got the status OK.. strange
isn't?
This is intended behavior.
SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list sr-users@lists.sip-router.org http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users
-- Javier Aristizábal
On Wednesday 24 June 2015 17:14:03 Javier Aristizábal wrote:
I think I understand now.. thanks a lot for your help and input :-)
I'm really wondering what tutorial you followed?
http://kb.asipto.com/asterisk:realtime:kamailio-3.1.x-asterisk-1.6.2-astdb has the same route[REGFWD]. But also mentions:
sipusers is the standard table required by Asterisk to store SIP user profile, with one extra column sippasswd where will be stored the password for SIP authentication. By default, Asterisk uses the column secret for SIP user password, but if that is filled in, Asterisk will ask for authentication again, resulting in double-authentication which we want to avoid.
and
Be sure you configure Asterisk to not authenticate SIP requests coming from Kamailio.
But if you are worried about exposing asterisk to the world, if you make it communicate through kamailio you could bind it to localhost only.