[Asterisk-Dev] [PATCH] Fix bug in handle_request_info
Hi folks, I spotted a bug in handle_request_info: in an if condition the code assumes to receive NULL on error, while in fact it receives an empty string. The attached trivial patch fixes this. Patch is done against chan_sip.c from r8023. C'ya, Marc -- Marc Haisenko Comdasys AG Rüdesheimer Straße 7 D-80686 München Tel: +49 (0)89 - 548 43 33 0 Fax: +49 (0)89 - 548 43 33 29 e-mail: [EMAIL PROTECTED] http://www.comdasys.com --- chan_sip.c.orig 2006-01-13 18:11:57.0 +0100 +++ chan_sip.c 2006-01-13 18:12:56.760838308 +0100 @@ -8735,7 +8735,7 @@ ast_queue_control(p-owner, AST_CONTROL_VIDUPDATE); transmit_response(p, 200 OK, req); return; - } else if ((c = get_header(req, X-ClientCode))) { + } else if (strlen (c = get_header(req, X-ClientCode)) 0) { /* Client code (from SNOM phone) */ if (ast_test_flag(p, SIP_USECLIENTCODE)) { if (p-owner p-owner-cdr) ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] Facility Name requested on channel 0/2 not in use on span 1
Hi all, I have a problem with Three-Way-Calling on my ISDN Card. I have two HFC PCI cards and one TDM400 (2x FXS). I wrote already to the users list, but nobody could help me. So I would like to solve the problem by myself. I get the following message if I try to do three way calling (having one fxs on hold and the other on line): Facility Name requested on channel 0/2 not in use on span 1 Show channels show me: Channel State Appl. Data Zap/8-1 UpBridged Call Zap/2-1 Zap/2-1 UpDial ZAP/8| 60| tT Zap/7-1 UpHolded Call (None) 3 active channel(s) 7 and 8 are my fxs channels. I looked into chan_zap.c to the following code: case PRI_EVENT_FACNAME: chanpos = pri_find_principle(pri, e-facname.channel); if (chanpos 0) { ... } if (chanpos -1) { chanpos = pri_fixup_principle(pri, chanpos, e-facname.call); if (chanpos 0) { ast_log(LOG_WARNING, Facility Name requested on channel %d/%d not in use on span %d\n, PRI_SPAN(e-facname.channel), PRI_CHANNEL(e-facname.channel), pri-span); chanpos = -1; } else { The call of pri_find_principle(pri(pri-span=1), 2) returns 1. The next call to pri_fixup_principle returns -1 because it can not find the right call (e-facname.call). pri_fixup_principle is not able to find the call on both channels in the span because channel 0 has no call (call is zero) and call of channel 1 is different. It would help a lot to know where these call (e-facname.call) should be. I have no clue why it is not there or where it should be. Could somebody please be so kind to explain what pri_fixup_principle is looking for? It would help to understand the problem. Thanks in advance :) Henry -- Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread! ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Voicemail to email volume change patch
On Fri, 2006-01-13 at 11:15 -0600, Aaron Daniel wrote: My boss and I have been working on a patch to the voicemail code, and I'd like to see what everyone thinks of it. I'd like suggestions and stuff on anything that needs to be changed, as this is the first time we've patched the code, and would like to submit it for use later on in the code. Thanks for helping out! Please post your patch to the bug tracker at http://bugs.digium.com/, and make sure you have a signed disclaimer on file. This way, it will be reviewed by the bug marshals, and we can keep track of it. (If you'd like to post the bug number back here, then it'll probably get a little more attention.) -Jared ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Voicemail to email volume change patch
On Fri, 2006-01-13 at 11:15 -0600, Aaron Daniel wrote: My boss and I have been working on a patch to the voicemail code, and I'd like to see what everyone thinks of it. I'd like suggestions and stuff on anything that needs to be changed, as this is the first time we've patched the code, and would like to submit it for use later on in the code. It basically sends the voicemail attachment through sox to increase (or decrease) the volume of the message as need be, and then sends the normalized file to the user. You aren't normalizing the audio, you are just adjusting the volume. If you are going to go to the work of using an external app, why not use normalize so it truly is normalized and doesn't introduce problems when audio comes from different sources and therefore needs different audio adjustments. Now the trouble with normalize is that it doesn't support very many formats. I think it supports PCM wav and mp3 only. At least sox does have better format support. -- Steven Critchfield [EMAIL PROTECTED] ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] [PATCH] Fix bug in handle_request_info
On 1/13/06, Marc Haisenko [EMAIL PROTECTED] wrote: Hi folks, I spotted a bug in handle_request_info: in an if condition the code assumes to receive NULL on error, while in fact it receives an empty string. The attached trivial patch fixes this. Patch is done against chan_sip.c from r8023. Patched. Thank you! In the future, please also check out http://bugs.digium.com/ for bug reports and patch posting so we've got a better cyber-papertrail of these types of reports. -- Bird's The Word Technologies, Inc. http://www.btwtech.com/ ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Voicemail to email volume change patch
Well, I think we're calling it normalize cause that name sorta stuck. We are in fact just changing the volume of it, and using sox, cause as you say, it supports more formats. Normalize just didn't do what we wanted it to, and didn't support the format we were using, so sox seemed like a much better idea for the time being. Aaron Steven Critchfield wrote: On Fri, 2006-01-13 at 11:15 -0600, Aaron Daniel wrote: My boss and I have been working on a patch to the voicemail code, and I'd like to see what everyone thinks of it. I'd like suggestions and stuff on anything that needs to be changed, as this is the first time we've patched the code, and would like to submit it for use later on in the code. It basically sends the voicemail attachment through sox to increase (or decrease) the volume of the message as need be, and then sends the normalized file to the user. You aren't normalizing the audio, you are just adjusting the volume. If you are going to go to the work of using an external app, why not use normalize so it truly is normalized and doesn't introduce problems when audio comes from different sources and therefore needs different audio adjustments. Now the trouble with normalize is that it doesn't support very many formats. I think it supports PCM wav and mp3 only. At least sox does have better format support. ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] [PATCH] Fix bug in handle_request_info
On Friday 13 January 2006 18:29, BJ Weschke wrote: Patched. Thank you! In the future, please also check out http://bugs.digium.com/ for bug reports and patch posting so we've got a better cyber-papertrail of these types of reports. ACK. C'ya, Marc -- Marc Haisenko Comdasys AG Rüdesheimer Straße 7 D-80686 München Tel: +49 (0)89 - 548 43 33 0 Fax: +49 (0)89 - 548 43 33 29 e-mail: [EMAIL PROTECTED] http://www.comdasys.com ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Voicemail to email volume change patch
On Fri, 2006-01-13 at 11:45 -0600, Aaron Daniel wrote: Well, I think we're calling it normalize cause that name sorta stuck. We are in fact just changing the volume of it, and using sox, cause as you say, it supports more formats. Normalize just didn't do what we wanted it to, and didn't support the format we were using, so sox seemed like a much better idea for the time being. Since you are just changing the volume level, is there a reason you aren't using the record_gain option that I see in the code I just checked out from trunk? It would save you from spawning a process out of asterisk for the recorded files. -- Steven Critchfield [EMAIL PROTECTED] ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] moving sounds out of asterisk repository
On Jan 13, 2006, at 4:45 AM, Tzafrir Cohen wrote: Is there any reason, thus, that the version of asterisk-sounds is automatically bumped on each release of Asterisk? Could it be bumped only when there is actually a releasble change? If not: could the tarball include some sort of changelog? No. I plan to only bump version numbers when things have actually changed from now on. Note that this breaks badly if you don't have internet connection. This method would only be used if the version of Asterisk currently being installed was checked out of svn. I think it is safe to assume that anyone installing an svn checkout has an internet connection available. When talking to Kevin last night on IRC, we modified the plan a little bit. When using a svn checkout, instead of downloading the tarball, we can just download the appropriate tag using svn. We would also like to do a little bit of a reorganization of the asterisk-sounds repository: asterisk-sounds/base/ The base sounds that are currently in the Asterisk repository asterisk-sounds/extras/ These are the sounds currently in asterisk-sounds/. asterisk-sounds/other/ We could then easily add other directories as appropriate. So will it be in asterisk-sounds or in asterisk? Or both? The base/ directory can be a source of problems if people start to use it literally (if it is in the asterisk-sounds tarball). I prefer to keep the base sounds in the Asterisk tarball for the sake of simplicity. -- Russell Bryant ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] sip/iax video
anyone got pointers as to how to write code for sip or iax2 video feature to a sip or iax2 client software? Thanks! Matt ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] Re: Voicemail to email volume change patch
would you want the patch against trunk or 1.2.1? I wrote it against 1.2.1 but just svn co trunk and massaged it against that tree also. Is there any particular coding standard and/or etc that is prefered and if so, I will clean the patch up to make less work on someone else. I'm getting the mantis account setup so I can cross post there also. Forgive my ignorance on using mantis though... Which disclaimer would I need to sign? It appears there are two disclaimers (one requiring me to send $1.00). I frankly don't care on the code what happens to it. I just felt others may find it useful. I know it could use some work but just through it together in a few minutes and then another five minutes of debugging we had it running in production. --Robert On Fri, 13 Jan 2006 10:28:00 -0700, Jared Smith wrote: Thanks for helping out! Please post your patch to the bug tracker at http://bugs.digium.com/, and make sure you have a signed disclaimer on file. This way, it will be reviewed by the bug marshals, and we can keep track of it. (If you'd like to post the bug number back here, then it'll probably get a little more attention.) -Jared ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] Re: Voicemail to email volume change patch
On Fri, 13 Jan 2006 12:28:14 -0600, Steven Critchfield wrote: Since you are just changing the volume level, is there a reason you aren't using the record_gain option that I see in the code I just checked out from trunk? It would save you from spawning a process out of asterisk for the recorded files. I would guess that does all voicemail including what is played back by the phone which already sounds fine (here comes foot-in-mouth desease as I hadn't looked at the code yet). --Robert ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] Re: Voicemail to email volume change patch
On Fri, 13 Jan 2006 11:28:31 -0600, Steven Critchfield wrote: You aren't normalizing the audio, you are just adjusting the volume. If you are going to go to the work of using an external app, why not use normalize so it truly is normalized and doesn't introduce problems when audio comes from different sources and therefore needs different audio adjustments. Now the trouble with normalize is that it doesn't support very many formats. I think it supports PCM wav and mp3 only. At least sox does have better format support. The term normalize is incorrect in hind sight, however it stemmed from wanting something that sounded normal (after blowing up a pair of speakers going from music to voicemail back to music). I'm sure there better ways of doing this and with a little guidance on sound processing I would be willing to donate the time to fix it or make it better. This patch stemmed from me getting pissed at the sound difference, telling Aaron to change it, him saying it would require changing the code, and me saying fine... I opened the file, hacked this in and 5 minutes later asked him to put it into production. We did a quick debug session and all seems to be working fine. --Robert ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Re: Voicemail to email volume change patch
On Fri, 2006-01-13 at 15:03 -0600, Robert A. Thompson wrote: would you want the patch against trunk or 1.2.1? I wrote it against 1.2.1 but just svn co trunk and massaged it against that tree also. Is there any particular coding standard and/or etc that is prefered and if so, I will clean the patch up to make less work on someone else. I'm getting the mantis account setup so I can cross post there also. Forgive my ignorance on using mantis though... I found this URL while looking for the disclaimers to help you out on the paragraph below. http://www.digium.com/index.php?menu=bugguidelines Which disclaimer would I need to sign? It appears there are two disclaimers (one requiring me to send $1.00). I frankly don't care on the code what happens to it. I just felt others may find it useful. I know it could use some work but just through it together in a few minutes and then another five minutes of debugging we had it running in production. IANAL, TINLA. You do not send $1.00, it is actually supposed to be payed to you(I believe). It was explained to me at one time that the contract that you are signing doesn't have as much standing if there wasn't some form of valuable item exchanged. The $1.00 is the valuable item that helps the legal system determin that this is a valid and enforceable contract. The $1.00 also does not really make or break Digium or you. The other disclaimer essentially puts your work in the public domain. With your contribution in the public domain, it can be used however anyone wants without concern for how you feel about it. -- Steven Critchfield [EMAIL PROTECTED] ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] Re: [asterisk-commits] trunk - r8063 in /trunk: channels/ configs/ doc/
+ status = pbx_builtin_getvar_helper(p-chan, CHANLOCALSTATUS); + if (autologoffunavail status !strcasecmp(status, CHANUNAVAIL)) { + char agent[AST_MAX_AGENT] = ; + long logintime = time(NULL) - p-loginstart; + p-loginstart = 0; + ast_log(LOG_NOTICE, Agent read: '%s' is not available now, auto logoff\n, p-name); + manager_event(EVENT_FLAG_AGENT, Agentcallbacklogoff, + Agent: %s\r\n + Loginchan: %s\r\n + Logintime: %ld\r\n + Reason: Chanunavail\r\n + Uniqueid: %s\r\n, + p-agent, p-loginchan, logintime, ast-uniqueid); + snprintf(agent, sizeof(agent), Agent/%s, p-agent); + ast_queue_log(NONE, ast-uniqueid, agent, AGENTCALLBACKLOGOFF, %s|%ld|%s, p-loginchan, logintime, Chanunavail); + set_agentbycallerid(p-logincallerid, NULL); + p-loginchan[0] = '\0'; + p-logincallerid[0] = '\0'; + } First, this patch adds two more copies of the identical callback-logoff code. This is very clearly the wrong thing to do. There are now at least 5 or 6 places in the code that construct and send the identical manager event, the log entry, and other bits. Second, it does _not_ include the recent changes to the callback-autologoff code to send a device state update and to dump agent persistence information if it is enabled. In summary, this commit should _not_ have been made in this form. I will not go back into the bug to see who reviewed and approved it; you should know who you are. ___ --Bandwidth and Colocation provided by Easynews.com -- Asterisk-Dev mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev