Bug#320350: asterisk: bristuff patch breaks cause codes in Hangup()

rain rain at bluecherry.net
Thu Jul 28 17:31:16 UTC 2005


Package: asterisk
Severity: normal

I'm not entirely certain where to report this, because bristuff doesn't
appear to be properly maintained anymore on its original site, and I'm
not sure where development is currently happening.

The bristuff patch changes pbx_builtin_hangup to accept a cause code
as a parameter--however, the parameter is often passed to the function
as "" instead of NULL, so the code in the patch:
        /* Copy the hangup cause as specified */
        if (data)
           chan->hangupcause = atoi(data);

will (almost?) always reset the cause code to 0.  This will result in
the channel being hung up reporting a useless cause code (and, in the
case of SIP phones, a very confusing "403 Forbidden".)

Just changing the patch to be:
	/* Copy the hangup cause if specified */
	if (data && *data)
	   chan->hangupcause = atoi(data);

will fix the problem.

A temporary workaround (without recompiling) is to always call Hangup()
with ${HANGUPCAUSE} as a parameter.

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/dash
Kernel: Linux 2.6.11-1-686
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)




More information about the Pkg-voip-maintainers mailing list