I need some hints as to what can be going on;
Running: openser-1.2.2-tls
Mobile 1 à PSTN à Provider SER à Local SER à Asterisk (Callforward) à Provider SER à PSTN à Mobile 2
When Mobile 2 hangs up, Mobile 1 does not get disconnected but hangs with dead air.
Provider SER: Is load balanced using standards DNS round robin with one CNAME pointing to two IP's Our BYE goes to the wrong IP even though we use;
modparam( "rr", "enable_full_lr", 1 ) ... fix_nated_contact(); force_rport(); if ( ! search( "^Content-Length:\ 0" ) ) { fix_nated_sdp( "3" ); }; t_on_reply( "1" );
record_route(); if ( loose_route() ) { route( 1 ); break; };
I have tested with check_via = yes to no avail.
Do any of you have any idea what might be causing this?
I know the provided information is sparse but thought I'd try the short descriptions of the problem first, if it's a known miss config.
Many Regards Danny Froberg
On Monday 12 January 2009 15:40:03 Danny Fröberg wrote:
Provider SER: Is load balanced using standards DNS round robin with one
This is illegal and/or impossible. A CNAME must point to exactly _one_ hostname, not multiple, and not IP addresses.
CNAME pointing to two IP's Our BYE goes to the wrong IP even though we use;
What's in the route-set? The IP address or the host/domain name of the provider?
Alex,
Sorry about that, Provider SER uses; one *hostname* pointing to two IP's
Route set looks like;
route[ 1 ] { if ( ! t_relay() ) { sl_reply_error(); }; }
onreply_route[ 1 ] { fix_nated_contact(); force_rport(); if ( ! search( "^Content-Length:\ 0" ) ) { fix_nated_sdp( "3" ); }; }
-----Original Message-----
On Monday 12 January 2009 15:40:03 Danny Fröberg wrote:
Provider SER: Is load balanced using standards DNS round robin with one
This is illegal and/or impossible. A CNAME must point to exactly _one_ hostname, not multiple, and not IP addresses.
CNAME pointing to two IP's Our BYE goes to the wrong IP even though we use;
What's in the route-set? The IP address or the host/domain name of the provider?
-- Alex Hermann
_______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
El Lunes, 12 de Enero de 2009, Danny Fröberg escribió:
onreply_route[ 1 ] { fix_nated_contact(); force_rport(); if ( ! search( "^Content-Length:\ 0" ) ) { fix_nated_sdp( "3" ); }; }
Hi, don't use: search( "^Content-Length:\ 0" )
It requires searching all the message looking for a header. And it will not match the abbrebiated mode of Content-Length header: l: 0
Use the pseudovariable $cl: http://kamailio.org/dokuwiki/doku.php/pseudovariables:devel#content-length
Thank you for the suggestion I'll take a look at that.
/Danny
-----Original Message----- From: users-bounces@lists.kamailio.org [mailto:users-bounces@lists.kamailio.org] On Behalf Of Iñaki Baz Castillo Sent: den 12 januari 2009 22:37 To: users@lists.kamailio.org Subject: Re: [Kamailio-Users] BYE to the wrong IP
El Lunes, 12 de Enero de 2009, Danny Fröberg escribió:
onreply_route[ 1 ] { fix_nated_contact(); force_rport(); if ( ! search( "^Content-Length:\ 0" ) ) { fix_nated_sdp( "3" ); }; }
Hi, don't use: search( "^Content-Length:\ 0" )
It requires searching all the message looking for a header. And it will not match the abbrebiated mode of Content-Length header: l: 0
Use the pseudovariable $cl: http://kamailio.org/dokuwiki/doku.php/pseudovariables:devel#content-length
-- Iñaki Baz Castillo
_______________________________________________ Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
Did anyone have any ideas on this issue?
I'm quite stumped....
/Danny
-----Ursprungligt meddelande----- Från: users-bounces@lists.kamailio.org [mailto:users- bounces@lists.kamailio.org] För Alex Hermann Skickat: den 12 januari 2009 18:14 Till: users@lists.kamailio.org Ämne: Re: [Kamailio-Users] BYE to the wrong IP
On Monday 12 January 2009 15:40:03 Danny Fröberg wrote:
Provider SER: Is load balanced using standards DNS round robin with one
This is illegal and/or impossible. A CNAME must point to exactly _one_ hostname, not multiple, and not IP addresses.
CNAME pointing to two IP's Our BYE goes to the wrong IP even though we use;
What's in the route-set? The IP address or the host/domain name of the provider?
-- Alex Hermann
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
Will help if you can grab and paste here the SIP trace passing your sip server.
Route and contact headers - the ones that decide the routing of bye - should use ip addresses.
Cheers, Daniel
On 01/15/2009 11:00 PM, Danny Fröberg wrote:
Did anyone have any ideas on this issue?
I'm quite stumped....
/Danny
-----Ursprungligt meddelande----- Från: users-bounces@lists.kamailio.org [mailto:users- bounces@lists.kamailio.org] För Alex Hermann Skickat: den 12 januari 2009 18:14 Till: users@lists.kamailio.org Ämne: Re: [Kamailio-Users] BYE to the wrong IP
On Monday 12 January 2009 15:40:03 Danny Fröberg wrote:
Provider SER: Is load balanced using standards DNS round robin with one
This is illegal and/or impossible. A CNAME must point to exactly _one_ hostname, not multiple, and not IP addresses.
CNAME pointing to two IP's Our BYE goes to the wrong IP even though we use;
What's in the route-set? The IP address or the host/domain name of the provider?
-- Alex Hermann
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
Kamailio (OpenSER) - Users mailing list Users@lists.kamailio.org http://lists.kamailio.org/cgi-bin/mailman/listinfo/users http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
On Monday 19 January 2009, Daniel-Constantin Mierla wrote:
Route and contact headers - the ones that decide the routing of bye - should use ip addresses.
A hostname or domain name (SRV) is perfectly valid in route headers. It's one of the ways to get proxy failover working. (Too bad some UA's are too stupid to handle this properly).
On 01/19/2009 12:30 PM, Alex Hermann wrote:
On Monday 19 January 2009, Daniel-Constantin Mierla wrote:
Route and contact headers - the ones that decide the routing of bye - should use ip addresses.
A hostname or domain name (SRV) is perfectly valid in route headers. It's one of the ways to get proxy failover working. (Too bad some UA's are too stupid to handle this properly).
You are right. Proper DNS handling for server location and failover is still missing in most of the sip implementations. And if they don't do it, they should use IP in routing headers.
Cheers, Daniel
Hi list,
I am trying to implement the carrierroute module to kamailio 1.4.1-notls. I added the failure routes to the carrierfailureroute table and on the kamailio.cfg file I add the following modparam, that I thought it would be necessary, but when I start again Kamailio, it doesn't start.
I got the following error:
Jan 19 14:05:07 localhost kamailio: ERROR:core:set_mod_param_regex: parameter <db_failuretable> not found in module <carrierroute> Jan 19 14:05:07 localhost kamailio: CRITICAL:core:yyerror: parse error in config file, line 125, column 20-21: Can't set module parameter Jan 19 14:05:07 localhost kamailio: ERROR:core:main: bad config file (1 errors)
Here are the modparam code that I use on my kamailio.cfg file,
105 # ---- carrierroute params ----- 106 modparam("carrierroute", "db_url", "mysql://openserro:openserro@localhost/openser") 107 modparam("carrierroute", "config_source", "db") #"file" or "db" 108 109 ##### #Added for testing carrierroute #### 110 modparam("carrierroute", "db_table", "carrierroute") 111 modparam("carrierroute", "id_column", "id") 112 modparam("carrierroute", "carrier_column", "carrier") 113 modparam("carrierroute", "scan_prefix_column", "scan_prefix") 114 modparam("carrierroute", "domain_column", "domain") 115 #modparam("carrierroute", "flags_column", "flags") 116 #modparam("carrierroute", "mask_column", "mask") 117 modparam("carrierroute", "prob_column", "prob") 118 modparam("carrierroute", "rewrite_host_column", "rewrite_host") 119 #modparam("carrierroute", "strip_column", "strip") 120 modparam("carrierroute", "carrier_table", "route_tree") 121 modparam("carrierroute", "carrier_id_col", "id") 122 modparam("carrierroute", "carrier_name_col", "carrier") 123 modparam("carrierroute", "config_file", "/etc/kamailio/carrierroute.conf") 124 modparam("carrierroute", "default_tree", "default") 125 modparam("carrierroute", "db_failuretable", "carrierfailureroute") 126 modparam("carrierroute", "failure_id_column", "id") 127 modparam("carrierroute", "failure_carrier_column", "carrier") 128 modparam("carrierroute", "fetch_rows", 3000)
Do you have any suggestions about where the problem is?
Thanks in advance,
Juan.-
On Monday 19 January 2009, Juan Asencio wrote:
I am trying to implement the carrierroute module to kamailio 1.4.1-notls. I added the failure routes to the carrierfailureroute table and on the kamailio.cfg file I add the following modparam, that I thought it would be necessary, but when I start again Kamailio, it doesn't start.
I got the following error:
Jan 19 14:05:07 localhost kamailio: ERROR:core:set_mod_param_regex: parameter <db_failuretable> not found in module <carrierroute> Jan 19 14:05:07 localhost kamailio: CRITICAL:core:yyerror: parse error in config file, line 125, column 20-21: Can't set module parameter Jan 19 14:05:07 localhost kamailio: ERROR:core:main: bad config file (1 errors)
Hi Juan,
there is apparently a error in the docs, this table parameter is called "db_failure_table". I'll fix this in the documentation.
Cheers,
Henning
Hi Henning,
Thanks for the tip, I change the name of the table to "db_failure_table" in that modparam and now the Kamailio is able to start again.
Cheers,
Juan.-
On Monday 19 January 2009, Juan Asencio wrote:
I am trying to implement the carrierroute module to kamailio 1.4.1-notls. I added the failure routes to the carrierfailureroute table and on the kamailio.cfg file I add the following modparam, that I thought it would be necessary, but when I start again Kamailio, it doesn't start.
I got the following error:
Jan 19 14:05:07 localhost kamailio: ERROR:core:set_mod_param_regex: parameter <db_failuretable> not found in module <carrierroute> Jan 19 14:05:07 localhost kamailio: CRITICAL:core:yyerror: parse error in config file, line 125, column 20-21: Can't set module parameter Jan 19 14:05:07 localhost kamailio: ERROR:core:main: bad config file (1 errors)
Hi Juan,
there is apparently a error in the docs, this table parameter is called "db_failure_table". I'll fix this in the documentation.
Cheers,
Henning
Hi Henning,
Is it possible to choose different domains using the parameter "scan_prefix" on the "carrierroute" table?
For example: 1 have one carrier with two different domains pointing each one of them to a different host.
If the user makes a call to a number starting with 234 the call goes to domain 1 or if the user call to a number 567 the call goes to domain 2.
I have been trying with the example 1.45. Configuration example - Routing to user tree. But since I specify a domain on this part of the code:
# just an example domain $avp(s:domain)="start";
The call only goes through that domain "start" when it matches the "scan_prefix". If the "scan_prefix" doesn't match it would keep trying. But it doesn't try the other domain.
How can I achieve that, if is possible at all?
Cheers,
Juan.-
On Monday 19 January 2009, Juan Asencio wrote:
Is it possible to choose different domains using the parameter "scan_prefix" on the "carrierroute" table?
For example: 1 have one carrier with two different domains pointing each one of them to a different host.
If the user makes a call to a number starting with 234 the call goes to domain 1 or if the user call to a number 567 the call goes to domain 2.
I have been trying with the example 1.45. Configuration example - Routing to user tree. But since I specify a domain on this part of the code:
# just an example domain $avp(s:domain)="start";
The call only goes through that domain "start" when it matches the "scan_prefix". If the "scan_prefix" doesn't match it would keep trying. But it doesn't try the other domain.
How can I achieve that, if is possible at all?
Hi Juan,
i'm not sure if i completely understand your question. You've one carrier with several domains, each of them pointing to different hosts.
carrier default, domains: 0, 1 0 -> host1 1 -> host2
'234' -> 1 -> host1, '567' -> 2 -> host2
This can be achieved with only one domain.
default: 0 0 '234' -> host1 0 '567' -> host2
Or do you've some more requirements that needs a second domain?
Cheers,
Henning
Hi Henning and list, here is a description of the configuration that Im trying to test with carrierroute:
I have 4 groups of customers calling to 6 different destinations. Each customerGroup has specific rules about the destinations that are allowed to call. For ex. CustomerGroup 1 can call to S-fix, S-mob, N-fix and DK-fix, but not to N-mob or DK-mob CustomerGroup 2 can call to N-fix, N-mob, S-fix and DK-fix, but not to S-mob or DK-mob CustomerGroup 3 can call to DK-fix, DK-mob, S-fix and N-fix, but not to S-mob or N-mob CustomerGroup 4 can call to all destinations.
So, in order to apply the different rules to each customerGroup, I could assign to each customerGroup a Carrier on the subscriber table, and each carrier would have its rules about where is allowed to call using scan_prefix on the carrierroute table.
But then I will need to have almost the same host information for every carrier, but with the exceptions mentioned above. My point is that it would be a lot of information that is repeated, is this really necessary?
It is anyway to avoid repeating all this rewrite_host and scan_prefix information? Because in this example is just 6 rewrite_hosts that Im calling again and again on the different carriers, but in my implementation it would be a lot more of Interconnect companies that I need to add. Also, the same scan_prefix, would be called again for each carrier.
As well, I see that I could put all hosts under 1 domain, but then what it is the point of having different domains?
Am I trying to do with carrierroute something that the module was not build for?
I would appreciate your advice about this implementation.
Configuration to test
host1(S-fix) Interconnect1(S)< Domain1 host2(S-mob)
host3(N-fix) CustomerGroup1 - Carrier1 - Interconnect2(N)< Domain2 ---- o ----
Host5(DK-fix) Interconnect3(DK)< Domain3 ---- o ---- ------------------------------------------------------------- Host1(S-fix) Interconnect1(S)< Domain1 ---- o ----
host3(N-fix) CustomerGroup2 - Carrier2 - Interconnect2(N)< Domain2 host4(N-mob)
Host5(DK-fix) Interconnect3(DK)< Domain3 ---- o ---- -------------------------------------------------------------
Host1(S-fix) Interconnect1(S)< Domain1 ---- o ----
host3(N-fix) CustomerGroup3 - Carrier3 - Interconnect2(N)< Domain2 ---- o ----
Host5(DK-fix) Interconnect3(DK)< Domain3 Host6(DK-mob) -------------------------------------------------------------
Host1(S-fix) Interconnect1(S)< Domain1 Host2(S-mob)
host3(N-fix) CustomerGroup4 - Carrier4 - Interconnect2(N)< Domain2 host4(N-mob)
Host5(DK-fix) Interconnect3(DK)< Domain3 Host6(S-mob) -------------------------------------------------------------
+----+---------+--------+-------------+-------+------+---------------+ | id | carrier | domain | scan_prefix | flags | prob | rewrite_host | +----+---------+--------+-------------+-------+------+---------------+ | 1 | 1 | 1 | 462 | 0 | 1 | host1.s-fix | | 2 | 1 | 1 | 465 | 0 | 1 | host2.s-mob | | 3 | 1 | 2 | 472 | 0 | 1 | host3.n-fix | | 4 | 1 | 2 | 473 | 0 | 1 | host3.n-fix | | 5 | 1 | 2 | 474 | 0 | 1 | host3.n-fix | | 6 | 1 | 3 | 452 | 0 | 1 | host5.dk-fix | | 7 | 1 | 3 | 453 | 0 | 1 | host5.dk-fix | | 8 | 1 | 3 | 454 | 0 | 1 | host5.dk-fix | | 9 | 2 | 1 | 462 | 0 | 1 | host1.s-fix | | 10 | 2 | 2 | 472 | 0 | 1 | host3.n-fix | | 11 | 2 | 2 | 475 | 0 | 1 | host4.n-mob | | 12 | 2 | 3 | 452 | 0 | 1 | host5.dk-fix | | 13 | 3 | 1 | 462 | 0 | 1 | host1.s-fix | +----+---------+--------+-------------+-------+------+---------------+
and so on...
Cheers,
Juan.-
On Monday 19 January 2009, Juan Asencio wrote:
Is it possible to choose different domains using the parameter "scan_prefix" on the "carrierroute" table?
For example: 1 have one carrier with two different domains pointing each one of them to a different host.
If the user makes a call to a number starting with 234 the call goes to domain 1 or if the user call to a number 567 the call goes to domain 2.
I have been trying with the example 1.45. Configuration example - Routing to user tree. But since I specify a domain on this part of the code:
# just an example domain $avp(s:domain)="start";
The call only goes through that domain "start" when it matches the "scan_prefix". If the "scan_prefix" doesn't match it would keep trying. But it doesn't try the other domain.
How can I achieve that, if is possible at all?
Hi Juan,
i'm not sure if i completely understand your question. You've one carrier with several domains, each of them pointing to different hosts.
carrier default, domains: 0, 1 0 -> host1 1 -> host2
'234' -> 1 -> host1, '567' -> 2 -> host2
This can be achieved with only one domain.
default: 0 0 '234' -> host1 0 '567' -> host2
Or do you've some more requirements that needs a second domain?
Cheers,
Henning
On Wednesday 21 January 2009, Juan Asencio wrote:
Hi Henning and list, here is a description of the configuration that Im trying to test with carrierroute:
I have 4 groups of customers calling to 6 different destinations. Each customerGroup has specific rules about the destinations that are allowed to call. For ex. CustomerGroup 1 can call to S-fix, S-mob, N-fix and DK-fix, but not to N-mob or DK-mob CustomerGroup 2 can call to N-fix, N-mob, S-fix and DK-fix, but not to S-mob or DK-mob CustomerGroup 3 can call to DK-fix, DK-mob, S-fix and N-fix, but not to S-mob or N-mob CustomerGroup 4 can call to all destinations.
Hi Juan,
ok, understand. Additional to least cost routing you use cr to blacklist certain destinations depending on the user group.
So, in order to apply the different rules to each customerGroup, I could assign to each customerGroup a Carrier on the subscriber table, and each carrier would have its rules about where is allowed to call using scan_prefix on the carrierroute table.
But then I will need to have almost the same host information for every carrier, but with the exceptions mentioned above. My point is that it would be a lot of information that is repeated, is this really necessary?
Duplicating this routing rules would be the easiest solution. But you could probably implement something like this with the flags/ mask functionality, present in cr from 1.4.x. It can match routing rules against message flags you set in the script.
It is anyway to avoid repeating all this rewrite_host and scan_prefix information? Because in this example is just 6 rewrite_hosts that Im calling again and again on the different carriers, but in my implementation it would be a lot more of Interconnect companies that I need to add. Also, the same scan_prefix, would be called again for each carrier.
In the upcoming 1.5.0 release we removed some of the duplication, additional to the carriers also the domain names are now read from seperate tables on startup. We thought also a few times about moving the rewrite_host to a seperate table, but came not to a final conclusion about this if it makes really sense. After all, memory and disk storage are way more cheaper then developer brains. ;-) And so far even with larger installation (several 100k routes) this was not an issue.
Additional, if you enter individual numbers as scan_prefix (e.g. fraud, QS issues with certain GWs..), you're matching table would be get quite large.
As well, I see that I could put all hosts under 1 domain, but then what it is the point of having different domains?
You can use it for failure routing, for example. Lets say, domain 1 is your first try, use the cheapest route. It fails, you go to domain 2, which is more expensive. If it fails again, you try again the first route, or a third one. Or you've a certain domain that diverts the call to a announcement box, for certain response classes..
Am I trying to do with carrierroute something that the module was not build for?
No, it was created for something like this.
+----+---------+--------+-------------+-------+------+---------------+ | id | carrier | domain | scan_prefix | flags | prob | rewrite_host | +----+---------+--------+-------------+-------+------+---------------+ | 1 | 1 | 1 | 462 | 0 | 1 | host1.s-fix | | 2 | 1 | 1 | 465 | 0 | 1 | host2.s-mob | | 3 | 1 | 2 | 472 | 0 | 1 | host3.n-fix | | 4 | 1 | 2 | 473 | 0 | 1 | host3.n-fix | | 5 | 1 | 2 | 474 | 0 | 1 | host3.n-fix | | 6 | 1 | 3 | 452 | 0 | 1 | host5.dk-fix | | 7 | 1 | 3 | 453 | 0 | 1 | host5.dk-fix | | 8 | 1 | 3 | 454 | 0 | 1 | host5.dk-fix | | 9 | 2 | 1 | 462 | 0 | 1 | host1.s-fix | | 10 | 2 | 2 | 472 | 0 | 1 | host3.n-fix | | 11 | 2 | 2 | 475 | 0 | 1 | host4.n-mob | | 12 | 2 | 3 | 452 | 0 | 1 | host5.dk-fix | | 13 | 3 | 1 | 462 | 0 | 1 | host1.s-fix | +----+---------+--------+-------------+-------+------+---------------+
If you just want to blacklist certain destinations you can also do it another way:
+----+---------+--------+-------------+-------+------+---------------+ | id | carrier | domain | scan_prefix | flags | prob | rewrite_host | +----+---------+--------+-------------+-------+------+---------------+ | 1 | 1 | 1 | 47 | 0 | 1 | host3.n-fix | | 2 | 1 | 1 | 475 | 0 | 1 | | +----+---------+--------+-------------+-------+------+---------------+
Just combine the rules to host3.n (prefix 472, 473, 474), and explicitly blacklist the mobile you don't want for this users. Normally there a quite a lot of optimization possibilities like this, you could use some custom scripts to generate and optimize the routing rules.
Cheers,
Henning