Koozali.org: home of the SME Server

cannot modify sip header file

Offline portedaix

  • ***
  • 54
  • +0/-0
cannot modify sip header file
« 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

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: cannot modify sip header file
« Reply #1 on: November 21, 2011, 06:02:55 PM »
Which release of SAIL do you have?

Kind Regards

S

Offline portedaix

  • ***
  • 54
  • +0/-0
Re: cannot modify sip header file
« Reply #2 on: November 23, 2011, 08:12:18 AM »
sail-2.6.1-9

Regards
olivier

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: cannot modify sip header file
« Reply #3 on: November 24, 2011, 10:25:04 AM »
modify it in headers->sip header

Kind Regards

Offline portedaix

  • ***
  • 54
  • +0/-0
Re: cannot modify sip header file
« Reply #4 on: November 24, 2011, 10:42:02 AM »
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

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: cannot modify sip header file
« Reply #5 on: November 24, 2011, 12:13:05 PM »
what do you mean by "reconfigure"?

Kind Regards

S

Offline portedaix

  • ***
  • 54
  • +0/-0
Re: cannot modify sip header file
« Reply #6 on: November 25, 2011, 05:38:03 PM »
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

Offline SARK devs

  • *****
  • 2,806
  • +1/-0
    • http://sarkpbx.com
Re: cannot modify sip header file
« Reply #7 on: November 26, 2011, 08:33:38 PM »
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


Offline portedaix

  • ***
  • 54
  • +0/-0
Re: cannot modify sip header file
« Reply #8 on: November 28, 2011, 03:59:19 PM »
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