Koozali.org: home of the SME Server
Obsolete Releases => SME VoIP (Asterisk, SAIL etc) => Topic started by: portedaix on November 18, 2011, 06:30:28 PM
-
Hello,
I need to modify the sip header to be able to catch my inbound calls but I am not successful. How to do it ?
The setting I need with my operators are
- maxexpirey=1900
- defaultexpirey=1800
I changed them in the sail headers menu, sip.conf. This method is not efficient as those personal settings are whipped out every time I reconfigure the server, after an update for example. I checked the template and it actually refers to selintra database, /home/e-smith/db/selintra. Modify this database is not a good idea. But I am a bit lost here with standard sme method : how to create in my case a custom template ? What to write ? I am not comfortable with the syntax used for the original one :
package esmith;
use strict;
use Errno;
use esmith::config;
use esmith::util;
use esmith::db;
my %selintra;
tie %selintra, 'esmith::config', '/home/e-smith/db/selintra';
my %conf;
tie %conf, 'esmith::config', '/home/e-smith/db/configuration';
my $headerlines = db_get_prop(\%selintra, 'sip.conf', "headerlines") || "";
my $externip = db_get_prop(\%selintra, "global", "EDOMAIN") || "";
my $haclusterip = db_get_prop(\%selintra, "global", "HACLUSTERIP") || "";
my $localnet = db_get_type(\%conf, "LocalIP") || "";
my $netmask = db_get_prop(\%conf, 'InternalInterface', 'Netmask') || "";
$OUT .= "$headerlines\n";
unless ($externip eq "")
{
$OUT .= "externip=$externip\n";
}
if (db_get_prop(\%selintra, "global", "BINDADDR") eq 'ON') {
$OUT .= "bindaddr=$haclusterip\n";
}
$OUT .= "localnet=$localnet/$netmask";
}
Thanks for your help.
Olivier
-
Which release of SAIL do you have?
Kind Regards
S
-
sail-2.6.1-9
Regards
olivier
-
modify it in headers->sip header
Kind Regards
-
Thanks for your reply but it is not the solution.
I already modify it in "headers->sip header" but it is reversed to the original setting after a "reconfigure". That is actually my question : how to change the setting permanently.
Regards
Olivier
-
what do you mean by "reconfigure"?
Kind Regards
S
-
Sorry for my translation if it is not accurate. I use SME in french. Under "Administration" there is the "Stop and Restart" submenu, or something like that. In this submenu, there are the "restart, reconfigure, stop" actions. "Reconfigure" is probably a bad translation, it might be "post-ugrade" like in the command line "signal-event post-upgrade". It is actually this post-upgrade which reset my sip headers back to original ones.
Thanks
Olivier
-
Hi
Yes, a reconfigure will reset the values in the sip.conf header field. I guess my question is why do you issue these reconfigures? Normally, you would only do such a thing after an upgrade, it should not be a regular thing. On our PBXs we almost never issue them. If you wish to change sail's behaviour you can edit /home/e-smith/db/selintra-deletes and remove the row "sip.conf". This will stop a recreate of the header when you do a reconfigure.
Kind Regards
S
-
Hello,
Actually it is needed to "reconfigure" everytime a yum package is updated. Update notices are quite frequent too me. Hm... Now I wonder if I am a update maniac :lol: Or is it due to the fact that I use sme 8.0 beta (needed for a crm), most of the people using sail are using the iso version maybe, and don't touch it... ?
Anyway, uncommenting the "sip.conf" line works well. Thanks a lot for your help.
olivier