[Home]

Summary:ASTERISK-24910: "timer=no" and "timer=required" settings in pjsip.conf fail
Reporter:Ray Crumrine (proftech)Labels:
Date Opened:2015-03-25 15:00:50Date Closed:2015-04-06 14:24:37
Priority:MajorRegression?
Status:Closed/CompleteComponents:Resources/res_pjsip
Versions:13.2.0 Frequency of
Occurrence
Constant
Related
Issues:
Environment:Beaglebone Black BeagleBoard.org Debian Image 2015-03-01 Debian GNU/Linux 7Attachments:
Description:line 180 in pjsip_configuration.c should have a tilde ????
"endpoint->extensions.flags &= ~PJSIP_INV_SUPPORT_TIMER;"

"timer=required" or "timer=no" setting causes the endpoint to not be established at all.
Comments:By: Rusty Newton (rnewton) 2015-03-25 18:42:47.864-0500

Ray, do you want to provide a patch? This is a simple patch to contribute.

https://wiki.asterisk.org/wiki/display/AST/Patch+Contribution+Process

Thanks for the report!

By: Ray Crumrine (proftech) 2015-03-25 19:58:09.664-0500

Thanks, I would be perfectly happy to except I don't program in C and I am not quite sure what is causing the problem with the "required" setting... :-(

By: Joshua C. Colp (jcolp) 2015-03-26 14:35:25.693-0500

I don't believe this is an issue. The configuration option is named "timers" not "timer". Using "timer" will indeed cause the endpoint to not be created as it's an invalid configuration. Can you confirm that using "timers" instead makes it work as expected?

By: Joshua C. Colp (jcolp) 2015-03-26 14:52:01.289-0500

Well - that you have two issues. One is "no" doesn't work as expected, and that you were using "timer" instead of "timers".

By: Richard Mudgett (rmudgett) 2015-03-26 15:10:30.769-0500

The handling of the option bits for the 100rel option in prack_handler() seems just wrong.  There are two option bits involved: {{PJSIP_INV_SUPPORT_100REL}}, and {{PJSIP_INV_REQUIRE_100REL}}.  I would expect that the following would happen:
* 100rel=no would clear both bits
* 100rel=yes would set the support and clear the require bit
* 100rel=required would set either both bits or clear the support bit and set the require bit

The handling of the option bits for the timers option in timers_handler() seems just wrong.  There are three option bits involved: {{PJSIP_INV_SUPPORT_TIMER}}, {{PJSIP_INV_REQUIRE_TIMER}}, and {{PJSIP_INV_ALWAYS_USE_TIMER}}.  I would expect that the following would happen:
* timers=no would clear all three bits
* timers=yes would result in only the support bit set
* timers=required would either result in only the required bit set or the required bit and the support bits set
* timers=always would either result in only the always-use bit set or the always-use bit and the support bits set


By: Ray Crumrine (proftech) 2015-03-26 15:20:08.159-0500

I was using "timers" [typo]. However you're correct that "no" does not work. I believe due to a missing tilde in line 180 of pjsip_configuration.c and possibly an error in line 179 as well. I verified "required" does work, however the WIKI shows "forced" as an option and specifying it does kill the endpoint. "forced" does not appear in the source. Is "always" supposed to be the replacement for "forced"? "always" seems to work but I had to search the source to find it. Thanks

By: Richard Mudgett (rmudgett) 2015-03-26 15:28:07.989-0500

Ugh.  And that's another inconsistency with the timers option.