I have attached a zip file that contains the modified chan_sip.c and the compiled chan_sip.so, which supports session timers. These are for asterisk version 1.4.21.2.

!!! Backup the files /usr/lib/asterisk/modules/chan_sip.so and /usr/src/asterisk/channels/chan_sip.c !!!

Since there is a 97 KB limitation on attachments I have split chan_sip.c into two volumes. To compile it, overwrite /usr/src/asterisk/channels/chan_sip.c with the one from the archive and do a 'make all' in the /usr/src/asterisk directory. This will create a chan_sip.so in the /usr/src/asterisk/channels directory. Next do an 'amportal stop'. Overwrite /usr/lib/asterisk/modules/chan_sip.so with /usr/src/asterisk/channels/chan_sip.so. Do a 'amportal start' ...

For configuring this, disable timers globally by adding the line
session-timers=refuse
to /etc/asterisk/sip_general_custom.conf. Enable timers for voipo, by adding
session-timers=accept (or session-timers=originate) and session-refresher=uac
to PEER Details of the voipo trunk in FreePBX.

I have been using this for the last few weeks without any issue. YMMV. Use at your own risk.

Quote Originally Posted by scott2020 View Post
Somewhere in this forum I think I remember a patch someone created, a backport from Asterisk 1.6 to 1.4 to support the session timers. I'll dig for that.