I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
First thing is trying to get both servers status on opensips and make sure opensips sees them up:
https://opensips.org/html/docs/modules/2.3.x/dispatcher.html#idp5739696
On Tue, 21 Jul 2020 at 12:12, Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Aristeidis,
In your case Dispatcher module is misconfigured and it missing crutials parts like:
modparam("dispatcher", "flags", 2) # without this flag no failover will happen, as you experiencing modparam("dispatcher", "xavp_dst", "_dsdst_") # this xavps will hold the list with addresses and associated properties, without it no failover will happen modparam("dispatcher", "xavp_ctx", "_dsctx_") # The name of the XAVP which will hold some attributes specific to dispatcher routing context. I'm not 100% sure, but I think it will not work without this xavp too, in all my configurations it is there.
Jurijs
On Tue, Jul 21, 2020 at 2:22 PM David Villasmil < david.villasmil.work@gmail.com> wrote:
First thing is trying to get both servers status on opensips and make sure opensips sees them up:
https://opensips.org/html/docs/modules/2.3.x/dispatcher.html#idp5739696
On Tue, 21 Jul 2020 at 12:12, Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Regards,
David Villasmil email: david.villasmil.work@gmail.com phone: +34669448337 _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param
https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Arsen Semenov
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Aristedis,
Sorry, indeed you have module parameters.
When one asterisk is down what you see when you run:
kamcmd dispatcher.list
Jurijs
On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras tsitras@gmail.com wrote:
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param
https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Arsen Semenov
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Ah,
I see the problem, just change list file in following way:
1 sip:192.168.0.100:5080 0 0 maxload=20 1 sip:192.168.0.101:5080 0 0 maxload=20
Jurijs
On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga jurijs.ivolga@gmail.com wrote:
Hi Aristedis,
Sorry, indeed you have module parameters.
When one asterisk is down what you see when you run:
kamcmd dispatcher.list
Jurijs
On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras tsitras@gmail.com wrote:
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param
https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Arsen Semenov
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
I experience something really strange when i change the dispatcher list to have the same priority both of the servers. I am getting 401 (unauthorised) to the extensions trying to register. Even though they in asterisk they seem to be registered, the debug shows 401. Not able to call from one extension to the other. here is the console error:
*<--- Transmitting (NAT) to 192.168.0.99:5060 http://192.168.0.99:5060 --->SIP/2.0 401 UnauthorizedVia: SIP/2.0/UDP 192.168.0.99;branch=z9hG4bKe78c.2793112e87a37f021cda7a582ba8c703.0;received=192.168.0.99;rport=5060Via: SIP/2.0/UDP 192.168.0.117:5060;received=192.168.0.117;branch=z9hG4bK823694525;rport=5060From: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=580308996To: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=as4657cc95Call-ID: 822746835-5060-1@BJC.BGI.B.BBHCSeq: 2005 REGISTERServer: Asterisk PBX 11.25.3Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerWWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="73fd892f", stale=trueContent-Length: 0*
On the other hand if i change the priority to 0 & 1 the servers respectively, then no errors in asterisk console and they can call between each other. This is really odd.
Στις Τρί, 21 Ιουλ 2020 στις 3:32 μ.μ., ο/η Jurijs Ivolga < jurijs.ivolga@gmail.com> έγραψε:
Ah,
I see the problem, just change list file in following way:
1 sip:192.168.0.100:5080 0 0 maxload=20 1 sip:192.168.0.101:5080 0 0 maxload=20
Jurijs
On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga jurijs.ivolga@gmail.com wrote:
Hi Aristedis,
Sorry, indeed you have module parameters.
When one asterisk is down what you see when you run:
kamcmd dispatcher.list
Jurijs
On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras tsitras@gmail.com wrote:
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param
https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Arsen Semenov
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hello,
if you send first register to one asterisk and it replies 401, then the following up register has to be sent to same asterisk, otherwise the authentication fails if you send to 2nd asterisk and it doesn't recognize the nonce, no matter the user password is the same.
Maybe asterisk has options to "share" (generate and recognize same) nonce values across different instance, if yes, be sure it is enabled. In kamailio that is possible by setting the appropriate parameters in auth module.
Cheers, Daniel
On 22.07.20 07:16, Aristeidis Tsitras wrote:
I experience something really strange when i change the dispatcher list to have the same priority both of the servers. I am getting 401 (unauthorised) to the extensions trying to register. Even though they in asterisk they seem to be registered, the debug shows 401. Not able to call from one extension to the other. here is the console error: /*<--- Transmitting (NAT) to 192.168.0.99:5060 http://192.168.0.99:5060 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.0.99;branch=z9hG4bKe78c.2793112e87a37f021cda7a582ba8c703.0;received=192.168.0.99;rport=5060 Via: SIP/2.0/UDP 192.168.0.117:5060;received=192.168.0.117;branch=z9hG4bK823694525;rport=5060 From: <sip:500@192.168.0.99 mailto:sip%3A500@192.168.0.99>;tag=580308996 To: <sip:500@192.168.0.99 mailto:sip%3A500@192.168.0.99>;tag=as4657cc95 Call-ID: 822746835-5060-1@BJC.BGI.B.BBH CSeq: 2005 REGISTER Server: Asterisk PBX 11.25.3 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="73fd892f", stale=true Content-Length: 0*/
On the other hand if i change the priority to 0 & 1 the servers respectively, then no errors in asterisk console and they can call between each other. This is really odd.
Στις Τρί, 21 Ιουλ 2020 στις 3:32 μ.μ., ο/η Jurijs Ivolga <jurijs.ivolga@gmail.com mailto:jurijs.ivolga@gmail.com> έγραψε:
Ah, I see the problem, just change list file in following way: 1 sip:192.168.0.100:5080 <http://192.168.0.100:5080> 0 0 maxload=20 1 sip:192.168.0.101:5080 <http://192.168.0.101:5080> 0 0 maxload=20 Jurijs On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga <jurijs.ivolga@gmail.com <mailto:jurijs.ivolga@gmail.com>> wrote: Hi Aristedis, Sorry, indeed you have module parameters. When one asterisk is down what you see when you run: kamcmd dispatcher.list Jurijs On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras <tsitras@gmail.com <mailto:tsitras@gmail.com>> wrote: i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached. Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up. Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov <arsperger@gmail.com <mailto:arsperger@gmail.com>> έγραψε: Hi Aristeidis, David is right, first would be good to check the status of the destinations. In your configuration there are couple of things to have in mind: need to set correct flag param https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p.flags select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc. Cheers, On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras <tsitras@gmail.com <mailto:tsitras@gmail.com>> wrote: I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if _*some *_of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones. I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 <http://192.168.0.100:5080> 0 0 maxload=20 2 sip:192.168.0.101:5080 <http://192.168.0.101:5080> 0 0 maxload=20 In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it. I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers. _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users -- Arsen Semenov _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org <mailto:sr-users@lists.kamailio.org> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Hi Aristedis,
To use both servers simultaneously you need to have group id as 1 for both of them, because ds_select_dst("1", "4") will choose only servers from group what is in the first argument(in this case 1) and group 2 will never be used in your case.
To make this work probably you need to look into Asterisk Realtime, in that case Asterisk will have to have a shared DB with shared registrations. Some time ago realtime asterisk didn't support the path, but it was in version 13 as I remember, so I hope it is fixed now.
Jurijs
On Wed, Jul 22, 2020 at 9:24 AM Daniel-Constantin Mierla miconda@gmail.com wrote:
Hello,
if you send first register to one asterisk and it replies 401, then the following up register has to be sent to same asterisk, otherwise the authentication fails if you send to 2nd asterisk and it doesn't recognize the nonce, no matter the user password is the same.
Maybe asterisk has options to "share" (generate and recognize same) nonce values across different instance, if yes, be sure it is enabled. In kamailio that is possible by setting the appropriate parameters in auth module.
Cheers, Daniel On 22.07.20 07:16, Aristeidis Tsitras wrote:
I experience something really strange when i change the dispatcher list to have the same priority both of the servers. I am getting 401 (unauthorised) to the extensions trying to register. Even though they in asterisk they seem to be registered, the debug shows 401. Not able to call from one extension to the other. here is the console error:
*<--- Transmitting (NAT) to 192.168.0.99:5060 http://192.168.0.99:5060 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.0.99;branch=z9hG4bKe78c.2793112e87a37f021cda7a582ba8c703.0;received=192.168.0.99;rport=5060 Via: SIP/2.0/UDP 192.168.0.117:5060;received=192.168.0.117;branch=z9hG4bK823694525;rport=5060 From: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=580308996 To: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=as4657cc95 Call-ID: 822746835-5060-1@BJC.BGI.B.BBH 822746835-5060-1@BJC.BGI.B.BBH CSeq: 2005 REGISTER Server: Asterisk PBX 11.25.3 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGE Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="73fd892f", stale=true Content-Length: 0*
On the other hand if i change the priority to 0 & 1 the servers respectively, then no errors in asterisk console and they can call between each other. This is really odd.
Στις Τρί, 21 Ιουλ 2020 στις 3:32 μ.μ., ο/η Jurijs Ivolga < jurijs.ivolga@gmail.com> έγραψε:
Ah,
I see the problem, just change list file in following way:
1 sip:192.168.0.100:5080 0 0 maxload=20 1 sip:192.168.0.101:5080 0 0 maxload=20
Jurijs
On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga jurijs.ivolga@gmail.com wrote:
Hi Aristedis,
Sorry, indeed you have module parameters.
When one asterisk is down what you see when you run:
kamcmd dispatcher.list
Jurijs
On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras tsitras@gmail.com wrote:
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param
https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Arsen Semenov
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing Listsr-users@lists.kamailio.orghttps://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Daniel-Constantin Mierla -- www.asipto.comwww.twitter.com/miconda -- www.linkedin.com/in/miconda Funding: https://www.paypal.me/dcmierla
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Try to install SNGREP command line application. It greatly helped me to understand what was going on in kamailio. Install it in your Kamailio server, and run it. You will then be able to see and understand all SIP requests and responses.
Also, as Daniel said, the SIP requests between client->kamailio->asterisk must be kept the same at all times when trying to register. Additionally, install Asterisk with Realtime module, and share the same SIP users across your asterisk boxes, by the means of a DB. This is the best approach.
Hope this helps,
*Sérgio Charrua*
*www.voip.pt http://www.voip.pt/* Tel.: +351 callto:+351+91+104+12+6621 130 71 77
Email : *sergio.charrua@voip.pt sergio.charrua@voip.pt*
This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.
On Wed, Jul 22, 2020 at 6:19 AM Aristeidis Tsitras tsitras@gmail.com wrote:
I experience something really strange when i change the dispatcher list to have the same priority both of the servers. I am getting 401 (unauthorised) to the extensions trying to register. Even though they in asterisk they seem to be registered, the debug shows 401. Not able to call from one extension to the other. here is the console error:
*<--- Transmitting (NAT) to 192.168.0.99:5060 http://192.168.0.99:5060 --->SIP/2.0 401 UnauthorizedVia: SIP/2.0/UDP 192.168.0.99;branch=z9hG4bKe78c.2793112e87a37f021cda7a582ba8c703.0;received=192.168.0.99;rport=5060Via: SIP/2.0/UDP 192.168.0.117:5060;received=192.168.0.117;branch=z9hG4bK823694525;rport=5060From: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=580308996To: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=as4657cc95Call-ID: 822746835-5060-1@BJC.BGI.B.BBHCSeq: 2005 REGISTERServer: Asterisk PBX 11.25.3Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerWWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="73fd892f", stale=trueContent-Length: 0*
On the other hand if i change the priority to 0 & 1 the servers respectively, then no errors in asterisk console and they can call between each other. This is really odd.
Στις Τρί, 21 Ιουλ 2020 στις 3:32 μ.μ., ο/η Jurijs Ivolga < jurijs.ivolga@gmail.com> έγραψε:
Ah,
I see the problem, just change list file in following way:
1 sip:192.168.0.100:5080 0 0 maxload=20 1 sip:192.168.0.101:5080 0 0 maxload=20
Jurijs
On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga jurijs.ivolga@gmail.com wrote:
Hi Aristedis,
Sorry, indeed you have module parameters.
When one asterisk is down what you see when you run:
kamcmd dispatcher.list
Jurijs
On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras tsitras@gmail.com wrote:
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param
https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
I have a Kamailio and 2 asterisk servers. All users are created in both of the asterisk servers. I am forwarding the registration to asterisk. The problem is that it is always used on only one server from the list. Even if one goes to shutdown, then there is not any registration sent to the available server. Even if *some *of the extensions can be seen registered in both of the asterisk's, if the secondary goes down, then there are no services for the phones.
I am attaching the kamailio.cfg. My dispatch list is: 1 sip:192.168.0.100:5080 0 0 maxload=20 2 sip:192.168.0.101:5080 0 0 maxload=20
In both of the asterisk servers i am using sip.conf to create users and s sip trunk for the Kamailio. Nothing special about it.
I am looking to find what is wrong with my config and i cannot loadbalance/failover to the asterisk servers.
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
-- Arsen Semenov
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
So, in order to have it working i need 2 realtime asterisk that are in a master-slave setup and have users created in both. Am i correct?
Στις Τετ, 22 Ιουλ 2020, 11:36 ο χρήστης Sergio Charrua < sergio.charrua@voip.pt> έγραψε:
Try to install SNGREP command line application. It greatly helped me to understand what was going on in kamailio. Install it in your Kamailio server, and run it. You will then be able to see and understand all SIP requests and responses.
Also, as Daniel said, the SIP requests between client->kamailio->asterisk must be kept the same at all times when trying to register. Additionally, install Asterisk with Realtime module, and share the same SIP users across your asterisk boxes, by the means of a DB. This is the best approach.
Hope this helps,
*Sérgio Charrua*
*www.voip.pt http://www.voip.pt/* Tel.: +351 callto:+351+91+104+12+6621 130 71 77
Email : *sergio.charrua@voip.pt sergio.charrua@voip.pt*
This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.
On Wed, Jul 22, 2020 at 6:19 AM Aristeidis Tsitras tsitras@gmail.com wrote:
I experience something really strange when i change the dispatcher list to have the same priority both of the servers. I am getting 401 (unauthorised) to the extensions trying to register. Even though they in asterisk they seem to be registered, the debug shows 401. Not able to call from one extension to the other. here is the console error:
*<--- Transmitting (NAT) to 192.168.0.99:5060 http://192.168.0.99:5060 --->SIP/2.0 401 UnauthorizedVia: SIP/2.0/UDP 192.168.0.99;branch=z9hG4bKe78c.2793112e87a37f021cda7a582ba8c703.0;received=192.168.0.99;rport=5060Via: SIP/2.0/UDP 192.168.0.117:5060;received=192.168.0.117;branch=z9hG4bK823694525;rport=5060From: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=580308996To: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=as4657cc95Call-ID: 822746835-5060-1@BJC.BGI.B.BBHCSeq: 2005 REGISTERServer: Asterisk PBX 11.25.3Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerWWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="73fd892f", stale=trueContent-Length: 0*
On the other hand if i change the priority to 0 & 1 the servers respectively, then no errors in asterisk console and they can call between each other. This is really odd.
Στις Τρί, 21 Ιουλ 2020 στις 3:32 μ.μ., ο/η Jurijs Ivolga < jurijs.ivolga@gmail.com> έγραψε:
Ah,
I see the problem, just change list file in following way:
1 sip:192.168.0.100:5080 0 0 maxload=20 1 sip:192.168.0.101:5080 0 0 maxload=20
Jurijs
On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga jurijs.ivolga@gmail.com wrote:
Hi Aristedis,
Sorry, indeed you have module parameters.
When one asterisk is down what you see when you run:
kamcmd dispatcher.list
Jurijs
On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras tsitras@gmail.com wrote:
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
Hi Aristeidis, David is right, first would be good to check the status of the destinations.
In your configuration there are couple of things to have in mind: need to set correct flag param
https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... select the algorithm used to select the destination (ds_select_dst) and have a faulure_route where the next destination will be tried in case first is down. You can find the examples in the module doc.
Cheers,
On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras tsitras@gmail.com wrote:
> I have a Kamailio and 2 asterisk servers. All users are created in > both of the asterisk servers. I am forwarding the registration to asterisk. > The problem is that it is always used on only one server from the list. > Even if one goes to shutdown, then there is not any registration sent to > the available server. Even if *some *of the extensions can be seen > registered in both of the asterisk's, if the secondary goes down, then > there are no services for the phones. > > I am attaching the kamailio.cfg. My dispatch list is: > 1 sip:192.168.0.100:5080 0 0 maxload=20 > 2 sip:192.168.0.101:5080 0 0 maxload=20 > > In both of the asterisk servers i am using sip.conf to create users > and s sip trunk for the Kamailio. Nothing special about it. > > I am looking to find what is wrong with my config and i cannot > loadbalance/failover to the asterisk servers. > > > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >
-- Arsen Semenov
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
you can set the DB as Master-Master, and add a virtual IP for the DB Cluster. Point your Asterisk boxes to connect to that VIP, and you're good to go.
*Sérgio Charrua*
*www.voip.pt http://www.voip.pt/* Tel.: +351 callto:+351+91+104+12+6621 130 71 77
Email : *sergio.charrua@voip.pt sergio.charrua@voip.pt*
This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.
On Wed, Jul 22, 2020 at 1:22 PM Aristeidis Tsitras tsitras@gmail.com wrote:
So, in order to have it working i need 2 realtime asterisk that are in a master-slave setup and have users created in both. Am i correct?
Στις Τετ, 22 Ιουλ 2020, 11:36 ο χρήστης Sergio Charrua < sergio.charrua@voip.pt> έγραψε:
Try to install SNGREP command line application. It greatly helped me to understand what was going on in kamailio. Install it in your Kamailio server, and run it. You will then be able to see and understand all SIP requests and responses.
Also, as Daniel said, the SIP requests between client->kamailio->asterisk must be kept the same at all times when trying to register. Additionally, install Asterisk with Realtime module, and share the same SIP users across your asterisk boxes, by the means of a DB. This is the best approach.
Hope this helps,
*Sérgio Charrua*
*www.voip.pt http://www.voip.pt/* Tel.: +351 callto:+351+91+104+12+6621 130 71 77
Email : *sergio.charrua@voip.pt sergio.charrua@voip.pt*
This message and any files or documents attached are strictly confidential or otherwise legally protected.
It is intended only for the individual or entity named. If you are not the named addressee or have received this email in error, please inform the sender immediately, delete it from your system and do not copy or disclose it or its contents or use it for any purpose. Please also note that transmission cannot be guaranteed to be secure or error-free.
On Wed, Jul 22, 2020 at 6:19 AM Aristeidis Tsitras tsitras@gmail.com wrote:
I experience something really strange when i change the dispatcher list to have the same priority both of the servers. I am getting 401 (unauthorised) to the extensions trying to register. Even though they in asterisk they seem to be registered, the debug shows 401. Not able to call from one extension to the other. here is the console error:
*<--- Transmitting (NAT) to 192.168.0.99:5060 http://192.168.0.99:5060 --->SIP/2.0 401 UnauthorizedVia: SIP/2.0/UDP 192.168.0.99;branch=z9hG4bKe78c.2793112e87a37f021cda7a582ba8c703.0;received=192.168.0.99;rport=5060Via: SIP/2.0/UDP 192.168.0.117:5060;received=192.168.0.117;branch=z9hG4bK823694525;rport=5060From: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=580308996To: <sip:500@192.168.0.99 sip%3A500@192.168.0.99>;tag=as4657cc95Call-ID: 822746835-5060-1@BJC.BGI.B.BBHCSeq: 2005 REGISTERServer: Asterisk PBX 11.25.3Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, PUBLISH, MESSAGESupported: replaces, timerWWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="73fd892f", stale=trueContent-Length: 0*
On the other hand if i change the priority to 0 & 1 the servers respectively, then no errors in asterisk console and they can call between each other. This is really odd.
Στις Τρί, 21 Ιουλ 2020 στις 3:32 μ.μ., ο/η Jurijs Ivolga < jurijs.ivolga@gmail.com> έγραψε:
Ah,
I see the problem, just change list file in following way:
1 sip:192.168.0.100:5080 0 0 maxload=20 1 sip:192.168.0.101:5080 0 0 maxload=20
Jurijs
On Tue, Jul 21, 2020 at 3:28 PM Jurijs Ivolga jurijs.ivolga@gmail.com wrote:
Hi Aristedis,
Sorry, indeed you have module parameters.
When one asterisk is down what you see when you run:
kamcmd dispatcher.list
Jurijs
On Tue, Jul 21, 2020 at 3:19 PM Aristeidis Tsitras tsitras@gmail.com wrote:
i know that there is something wrong, but i can not figure it out. Especially for the modparam settings that Mr Jurijs Ivolga is proposing, I already had them. it is the kamailio.cfg that I originally attached.
Unfortunately I did not manage to find anything in the parameters that will solve the problem as proposed by Villasmil and Semenov. I have given a try on changes but nothing good came up.
Στις Τρί, 21 Ιουλ 2020 στις 2:48 μ.μ., ο/η Arsen Semenov < arsperger@gmail.com> έγραψε:
> Hi Aristeidis, > David is right, first would be good to check the status of the > destinations. > > In your configuration there are couple of things to have in mind: > need to set correct flag param > > https://kamailio.org/docs/modules/5.5.x/modules/dispatcher.html#dispatcher.p... > select the algorithm used to select the destination (ds_select_dst) > and have a faulure_route where the next destination will be tried in case > first is down. > You can find the examples in the module doc. > > Cheers, > > On Tue, Jul 21, 2020 at 4:11 PM Aristeidis Tsitras < > tsitras@gmail.com> wrote: > >> I have a Kamailio and 2 asterisk servers. All users are created in >> both of the asterisk servers. I am forwarding the registration to asterisk. >> The problem is that it is always used on only one server from the list. >> Even if one goes to shutdown, then there is not any registration sent to >> the available server. Even if *some *of the extensions can be seen >> registered in both of the asterisk's, if the secondary goes down, then >> there are no services for the phones. >> >> I am attaching the kamailio.cfg. My dispatch list is: >> 1 sip:192.168.0.100:5080 0 0 maxload=20 >> 2 sip:192.168.0.101:5080 0 0 maxload=20 >> >> In both of the asterisk servers i am using sip.conf to create users >> and s sip trunk for the Kamailio. Nothing special about it. >> >> I am looking to find what is wrong with my config and i cannot >> loadbalance/failover to the asterisk servers. >> >> >> >> _______________________________________________ >> Kamailio (SER) - Users Mailing List >> sr-users@lists.kamailio.org >> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users >> > > > -- > Arsen Semenov > > _______________________________________________ > Kamailio (SER) - Users Mailing List > sr-users@lists.kamailio.org > https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users > _______________________________________________ Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
Kamailio (SER) - Users Mailing List sr-users@lists.kamailio.org https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users