Summary: | ASTERISK-12724: [patch] usereqphone parameter doesn't work | ||
Reporter: | Matt Maguire (mmaguire) | Labels: | |
Date Opened: | 2008-09-12 16:40:55 | Date Closed: | 2008-12-08 11:52:07.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) 20080912_bug13474.diff | |
Description: | When setting "usereqphone=yes" in sip.conf, the parameter ";user=phone" is not added, even if the username is a well-formatted number. ****** ADDITIONAL INFORMATION ****** The problem is the logic in channels/chan_sip.c initreqprep() function that determines whether or not the username is well-formatted. I include a patch below to correct this issue. diff -ur asterisk-1.4.21.2.orig/channels/chan_sip.c asterisk-1.4.21.2/channels/chan_sip.c --- asterisk-1.4.21.2.orig/channels/chan_sip.c 2008-06-03 10:46:24.000000000 -0400 +++ asterisk-1.4.21.2/channels/chan_sip.c 2008-09-12 14:16:32.000000000 -0400 @@ -6980,7 +6980,7 @@ break; } /* If we have only digits, add ;user=phone to the uri */ - if (*s) + if (!*s) urioptions = ";user=phone"; } | ||
Comments: | By: Matt Maguire (mmaguire) 2008-09-12 19:34:19 patch 20080912_bug13474.diff built against SVN branch 1.4 revision 142994 By: Digium Subversion (svnbot) 2008-12-08 11:52:06.000-0600 Repository: asterisk Revision: 161725 U branches/1.4/channels/chan_sip.c ------------------------------------------------------------------------ r161725 | file | 2008-12-08 11:52:06 -0600 (Mon, 08 Dec 2008) | 6 lines Make the usereqphone option work again. (closes issue ASTERISK-12724) Reported by: mmaguire Patches: 20080912_bug13474.diff uploaded by mmaguire (license 571) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=161725 |