Page 1 of 1

How to change the default expire time

PostPosted: Wed Oct 23, 2024 8:00 am
by ambiorixg12


Hi, I have a quick question: Is there any option in the ViciPhone settings to change the default expire=600 value?

I noticed that once the expiration time is reached and the device re-registers, the agent's status changes from INCALL to REGISTERED. This leads to unexpected behavior, as I then need to click 'Call Back Agent' again.


[Oct 23 08:47:55] Contact: <sip:dcn0qv54@192.0.2.193;transport=wss>;reg-id=1;+sip.instance="<urn:uuid:f0a92c9a-3f3e-415f-9609-b5de7d26d4b5>";expires=600



ViciBox_v11.x86_64-11.0.1.iso

VERSION: 2.14-930a
BUILD: 241021-2138

Re: How to change the default expire time

PostPosted: Wed Oct 23, 2024 8:13 am
by ambiorixg12
I looked into the library source code at https://phone.viciphone.com/v3.0/js/sip.js and saw that the value is set to Registerer.defaultExpires = 600;.

I assume that if there is no option in the admin ViciDial settings, I would need to download the ViciPhone source and manually modify the expiration time.

Re: How to change the default expire time

PostPosted: Wed Oct 23, 2024 9:48 am
by carpenox
you can alter rtpkeepalive and rtptimeout settings in sip.conf

Re: How to change the default expire time

PostPosted: Wed Oct 23, 2024 11:00 am
by ambiorixg12
[i]Thank you for your collaboration, but rtpkeepalive and rtptimeout options are related to established RTP sessions and do not directly impact SIP registration timeouts


rtpkeepalive: Sends periodic "keep-alive" messages to maintain NAT mappings and prevent session drops during inactivity.

rtptimeout:
Defines the maximum time without receiving RTP packets before a session is considered inactive and can be terminated, helping to free up resources.


I tried my theory from the previous post. In detail, this is what I did:

1 cd /srv/www/htdocs/

2 git clone https://github.com/vicimikec/ViciPhone.git

3 nano /srv/www/htdocs/ViciPhone/src/js/sip.js

3 Change Registerer.defaultExpires from 600 to 3200:



4 Registerer.defaultExpires = 3200;

5 Update the Webphone URL: https://ambiorixg12-dialer.ddns.net/Vic ... iphone.php

6 Check the SIP registration logs to verify if the new registration expiration time has taken effect.

[Oct 23 11:20:24] Contact: <sip:9cc82b9h@192.0.2.186;transport=wss>;expires=3200
[/list]
[/i]

o far, everything looks good, as the agent session conference has been active for more than 38 minutes. In theory, the registration will expire in 53 minutes

Re: How to change the default expire time

PostPosted: Sat Oct 26, 2024 4:13 pm
by williamconley
Excellent postback, and good job.

Note that those rtp entries may appear unrelated, but often the nat mapping closing prematurely is what kills the network pathway for the registered sip account to send a call. Once the nat mapped network port closes, a call to that (still registered) account may fail due to the missing network port. So it was a related/valid concern (for the record) just turned out to be not the problem for your situation.

In any event, your post was quite clear and will likely help others in the future! Well done. 8-)