How to change the default expire time

All installation and configuration problems and questions

Moderators: gerski, enjay, williamconley, Op3r, Staydog, gardo, mflorell, MJCoate, mcargile, Kumba, Michael_N

How to change the default expire time

Postby ambiorixg12 » Wed Oct 23, 2024 8:00 am



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
ambiorixg12
 
Posts: 453
Joined: Tue Sep 17, 2013 10:35 pm

Re: How to change the default expire time

Postby ambiorixg12 » Wed Oct 23, 2024 8:13 am

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.
ambiorixg12
 
Posts: 453
Joined: Tue Sep 17, 2013 10:35 pm

Re: How to change the default expire time

Postby carpenox » Wed Oct 23, 2024 9:48 am

you can alter rtpkeepalive and rtptimeout settings in sip.conf
Alma Linux 9.4 | SVN Version: 3889 | DB Schema Version: 1721 | Asterisk 18.21.1 | PHP8
www.dialer.one -:- 1-833-DIALER-1 -:- https://linktr.ee/CyburDial -:- WA: +19549477572
GC: https://join.skype.com/ujkQ7i5lV78O | DC: https://discord.gg/DVktk6smbh
carpenox
 
Posts: 2418
Joined: Wed Apr 08, 2020 2:02 am
Location: St Petersburg, FL

Re: How to change the default expire time

Postby ambiorixg12 » Wed Oct 23, 2024 11:00 am

[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
ambiorixg12
 
Posts: 453
Joined: Tue Sep 17, 2013 10:35 pm

Re: How to change the default expire time

Postby williamconley » Sat Oct 26, 2024 4:13 pm

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-)
Vicidial Installation and Repair, plus Hosting and Colocation
Newest Product: Vicidial Agent Only Beep - Beta
http://www.PoundTeam.com # 352-269-0000 # +44(203) 769-2294
williamconley
 
Posts: 20252
Joined: Wed Oct 31, 2007 4:17 pm
Location: Davenport, FL (By Disney!)


Return to Support

Who is online

Users browsing this forum: No registered users and 60 guests