BelledonneCommunications / flexisip

Linphone.org mirror for flexisip (git://git.linphone.org/flexisip.git)
http://flexisip.org
GNU Affero General Public License v3.0
146 stars 70 forks source link

after 1 hour contact expire from redis database... #9

Closed prashantvidja closed 6 years ago

prashantvidja commented 6 years ago

Hello

I used linphone used as sip-client. and use flexisip->kamailio together for voip calling and messaging.

Issue:

i used redis server for store contact-header(cache) in flexisip server , but after 1 hour of registration that contact-header(cache) expire automatically. How can i store contact for more time in redis server...? because after expiration push not working.

and also I want to know, where all device token stored in server?

Thanks

moisesynfam commented 4 years ago

I know this is an old issue but you closed it. Did you solve it ?

prashantvidja commented 4 years ago

Hello @moisesynfam,

I have solved this issue but I did not remember. Maybe I have increased the timeout in flexisip.conf. If you send me your conf then I can compare it to my working conf and let you know.

moisesynfam commented 4 years ago

Here it is! Thanks for your help in advance.

[g

[global]

log-level=debug

syslog-level=error

user-errors-logs=false

dump-corefiles=true

auto-respawn=true

aliases=localhost

default-servers=proxy

transports=sip:*

tls-certificates-dir=/etc/flexisip/tls/

tls-ciphers=HIGH:!SSLv2:!SSLv3:!TLSv1:!EXP:!ADH:!RC4:!3DES:!aNULL:!eNULL

idle-timeout=3600

require-peer-certificate=false

transaction-timeout=32000

udp-mtu=1460

enable-snmp=false

unique-id=

use-maddr=true

plugins-dir=/usr/lib/flexisip/plugins/

plugins=

[cluster]

enabled=false

cluster-domain=

nodes=

internal-transport=sip:%auto:5059;transport=tcp

[mdns-register]

enabled=false

mdns-priority=0

mdns-weight=100

mdns-ttl=3600

[event-logs]

enabled=false

logger=filesystem

dir=/var/log/flexisip

database-backend=mysql

database-connection-string=db='mydb' user='myuser' password='mypass' host='myhost.com'

database-max-queue-size=100

database-nb-threads-max=10

[monitor]

enabled=false

test-interval=30

logfile=/etc/flexisip/flexisip_monitor.log

switch-port=12345

password-salt=

[stun-server]

enabled=false

bind-address=0.0.0.0

port=3478

[presence-server]

enabled=false

transports=sip:127.0.0.1:5065;transport=udp

expires=600

notify-limit=200

leak-detector=false

long-term-enabled=true

bypass-condition=false

[conference-server]

enabled=false

transport=<sip:127.0.0.1:6064;transport=tcp>

conference-factory-uri=sip:conference-factory@sip1.linphone.org

enable-one-to-one-chat-room=true

outbound-proxy=sip:127.0.0.1:5060;transport=tcp

database-backend=mysql

database-connection-string=db='mydb' user='myuser' password='mypass' host='myhost.com'

[module::DoSProtection]

enabled=true

filter=

time-period=3000

packet-rate-limit=20

ban-time=2

iptables-chain=FLEXISIP

[module::SanityChecker]

enabled=true

filter=

[module::Presence]

enabled=false

filter=is_request && (request.method-name == 'PUBLISH' || request.method-name == 'NOTIFY' || request.method-name == 'SUBSCRIBE')

presence-server=sip:127.0.0.1.com:5065;transport=tcp

only-list-subscription=false

check-domain-in-presence-results=false

[module::GarbageIn]

enabled=true

filter=false

[module::NatHelper]

enabled=true

filter=

contact-verified-param=verified

fix-record-routes=false

fix-record-routes-policy=safe

[module::Authentication]

enabled=false

filter=

auth-domains=localhost

trusted-hosts=

db-implementation=file

datasource=

nonce-expires=3600

cache-expire=1800

no-403=false

reject-wrong-client-certificates=false

tls-client-certificate-required-subject=

new-auth-on-407=false

enable-test-accounts-creation=false

disable-qop-auth=false

available-algorithms=MD5

trust-domain-certificates=false

soci-password-request=select password, 'MD5' from accounts where login = :id and domain = :domain

soci-user-with-phone-request=

soci-users-with-phones-request=

soci-poolsize=100

soci-backend=mysql

soci-connection-string=db=mydb user=myuser password='mypass' host=myhost.com

soci-max-queue-size=1000

[module::Redirect]

enabled=false

filter=

contact=

[module::Registrar]

enabled=true

filter=

reg-domains=*

reg-on-response=true

max-contacts-by-aor=12

unique-id-parameters=pn-tok line

max-expires=604800

min-expires=60

force-expires=-1

static-records-file=

static-records-timeout=600

db-implementation=redis

redis-server-domain=localhost

redis-server-port=6379

redis-auth-password=password

redis-server-timeout=1500

redis-record-serializer=protobuf

redis-slave-check-period=60

service-route=

name-message-expires=message-expires

register-expire-randomizer-max=0

[module::StatisticsCollector]

enabled=false

filter=is_request && request.method-name == 'PUBLISH'

collector-address=

[module::Router]

enabled=true

filter=(is_request && request.uri.params contains 'doroute') || is_response

use-global-domain=false

fork=true

stateful=true

fork-late=true

fork-no-global-decline=false

treat-decline-as-urgent=false

treat-all-as-urgent=false

call-fork-timeout=90

call-fork-urgent-timeout=5

call-fork-current-branches-timeout=10

call-push-response-timeout=0

message-fork-late=true

message-delivery-timeout=3600

message-accept-timeout=15

allow-target-factorization=false

generated-contact-route=

generated-contact-expected-realm=

generate-contact-even-on-filled-aor=false

preroute=

resolve-routes=false

fallback-route=

parent-domain-fallback=false

[module::ContactRouteInserter] enabled=true

insert-domain=true

[module::PushNotification]

enabled=true

filter=

timeout=5

max-queue-size=100

time-to-live=2592000

apple=true

apple-certificate-dir=/etc/flexisip/

google=true

google-projects-api-keys=

firebase=true

firebase-projects-api-keys=

windowsphone=false

windowsphone-package-sid=

windowsphone-application-secret=

no-badge=false

external-push-uri=http://localhost/sendNotification?type=$type&event=$event&account=$token&toUri=$to-uri&fromUri=$from-uri&tag=$from-tag&callid=$callid

external-push-method=GET

[module::MediaRelay]

enabled=false

filter=

nortpproxy=nortpproxy

sdp-port-range-min=1024

sdp-port-range-max=65535

bye-orphan-dialogs=false

max-calls=0

force-relay-for-non-ice-targets=true

prevent-loops=true

early-media-relay-single=true

max-early-media-per-call=0

inactivity-period=3600

force-public-ip-for-sdp-masquerading=false

[module::Transcoder]

enabled=false

filter=

jb-nom-size=0

rc-user-agents=

audio-codecs=speex/8000 amr/8000 iLBC/8000 gsm/8000 pcmu/8000 pcma/8000 telephone-event/8000

remove-bw-limits=false

block-retransmissions=false

[module::Forward]

enabled=true

filter=

route=sip:[SIP_SERVER]:5060

add-path=true

rewrite-req-uri=false

default-transport=udp

params-to-remove=pn-tok pn-type app-id pn-msg-str pn-call-str pn-call-snd pn-msg-snd pn-timeout

[inter-domain-connections]

accept-domain-registrations=false

assume-unique-domains=false

domain-registrations=/etc/flexisip/domain-registrations.conf

verify-server-certs=true

keepalive-interval=30

reg-when-needed=false

prashantvidja commented 4 years ago

Hello,

can you please attach the whole file?

Thanks

moisesynfam commented 4 years ago

Sure flexisip.zip

prashantvidja commented 4 years ago

No man I did not find anything related timeout... But i am sure I have fixed this issue... I am attaching my config check that with yours.... flexisip_final_working_13_NOV (copy).zip

moisesynfam commented 4 years ago

Alright! Thanks for the help, I will compare both configs.

giengthanh commented 4 years ago

Hi @moisesynfam, do you solve it ?

prashantvidja commented 4 years ago

Hi @giengthanh I think I remember now what I have done. If you notice a sip signal inside the signal client itself sends the expiration time. so I have increase timeout inside the client. for example if you are using the Linphone then you will find expiration time inside setting. that you need to change.

giengthanh commented 4 years ago

Hi @giengthanh I think I remember now what I have done. If you notice a sip signal inside the signal client itself sends the expiration time. so I have increase timeout inside the client. for example if you are using the Linphone then you will find expiration time inside setting. that you need to change.

Yes, thanks for the help, i will try it.

0x41mmarVM commented 4 years ago

Two possible easy solutions, either modify clients to register with the max time allowed, as set in the config file by: max-expires=604800

or modify the config file server-side, by raising the minimum expiration, e.g.: min-expires=604800

giengthanh commented 4 years ago

Two possible easy solutions, either modify clients to register with the max time allowed, as set in the config file by: max-expires=604800

or modify the config file server-side, by raising the minimum expiration, e.g.: min-expires=604800

Thanks for your support, it worked fine