Re: [Asterisk-Dev] other -Werror issues - time_t printf format...
On Fri, Nov 04, 2005 at 04:49:11PM -0600, Kevin P. Fleming wrote: Luigi Rizzo wrote: Whatever explaination we chose what would be the preferred fix ? 1. cast the operand to int and always use %d 2. cast the operand to long and always use %ld I don't think I like either of these options; rather, let's come up with some preprocessor magic to 'learn' what the correct format should be, and define a macro containing the proper printf format string (AST_TIME_T_FORMAT). Then: snprintf(buf, sizeof(buf), This is the time AST_TIME_T_FORMAT \n, time()); would do the correct thing. hmmm, this would be a nightmare programmingwise, considering that most of the time these conversions are used for debugging messages put in in a rush. There might be another alternative, which is to settle on a reasonable type (again, int or long) and use a wrapper function (possibly defined as a cast, or empty, or whatever) to do the conversion. I am rather open on the actual type, both are ok considering that i don't think asterisk runs on 16-bit architectures, 32-bit time_t are the standard now and good until 2037 where hopefully we will not have the same codebase and asterisk 16.2.0 will have revised its design guidelines multiple times. I have quickly browsed the web for applicable standards but have not found much useful: http://www.opengroup.org/onlinepubs/009695399/basedefs/sys/types.h.html says All of the types shall be defined as arithmetic types of an appropriate length, with the following exceptions:... and * time_t and clock_t shall be integer or real-floating types. which opens up to even more trouble if some platform at some point decides to implement time_t as a double. You mention that time_t is 'long' on FreeBSD 4.x; is that true even on 64-bit architectures? this i am not sure because it is in machine/* so it might well be defined differently. Note though that the 64-bit support on FreeBSD 4.x is very limited and i doubt anyone uses it seriously. In any case the current asterisk sources fail, with -Werror, on both FreeBSD 4.11 and 6.0. I would be curious if linux compiles them cleanly. Did anyone try ? cheers luigi Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] chan_modem_i4l (only noise is received, reason for the problem)
Hi, I had the problem with recent asterisk versions that chan_modem_i4l is only receiving noise. I decided to examine what leads to this problems an found the reason. This patch was applied in cvs in order to fix some gcc4 compiler warnings and has broken receiving. Bye, David Arendt --- asterisk/channels/chan_modem_i4l.c2005/06/24 02:15:041.29 +++ asterisk/channels/chan_modem_i4l.c2005/08/05 16:29:301.30 @@ -21,7 +21,7 @@ #include asterisk.h -ASTERISK_FILE_VERSION(__FILE__, $Revision: 1.29 $) +ASTERISK_FILE_VERSION(__FILE__, $Revision: 1.30 $) #include asterisk/lock.h #include asterisk/vmodem.h @@ -316,7 +316,7 @@ static struct ast_frame *i4l_handle_esca static struct ast_frame *i4l_read(struct ast_modem_pvt *p) { -unsigned char result[256]; +char result[256]; short *b; struct ast_frame *f=NULL; int res; @@ -426,7 +426,7 @@ static struct ast_frame *i4l_read(struct if (!f) return NULL; } else { -*(b++) = AST_MULAW(result[x]); +*(b++) = AST_MULAW((int)result[x]); p-obuflen += 2; } } ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Asterisk or Polycom Bug?
Martin Mateev wrote: it's friday night, at least here, get a life Um...it's Sunday here (5:13am) and I'm still working. -- Cheers, Matt Riddell ___ http://www.sineapps.com/news.php (Daily Asterisk News - html) http://freevoip.gedameurope.com (Free Asterisk Voip Community) http://www.sineapps.com/rssfeed.php (Daily Asterisk News - rss) ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
[Asterisk-Dev] musiconhold -vs- musicclass problems setting the differnt class of music
Good Day List, Please accept my apology regarding posting in this list, however I have posted in the users list and in the irc channel with no response. Any help, url nudge etc would be greatly appreciated. ~ron I am having a bit of an issue as it relates to the musiconhold settings in the Version 1.09 of Asterisk Problem I am unable to set different music classes for different extensions. 1) (default) I would like to be able to set generic music on hold for the company, extension (2001) and any other extension not specifically set. 2) (Sales) I would like to set music on hold for sales people to include commerials (extension 2002) 3) (Support) I would like to set music on hold for Support people to include calm music followed with tech tips. (ext 2003) In /usr/src/asterisk/configs/sip.conf.sample ;musicclass=default ; Sets the default music on hold class for all SIP calls ; This may also be set for individual users/peers In /usr/src/asterisk/channels/chan_sip.c at line number ~~2054 we set the Global music on hold class using musicclass if (!ast_strlen_zero(i-musicclass)) strncpy(tmp-musicclass, i-musicclass, sizeof(tmp-musicclass)-1); at line number ~~8393 we set the individual channels music on hold class using musiconhold } else if (!strcasecmp(v-name, musiconhold)) { strncpy(user-musicclass, v-value, sizeof(user-musicclass)-1); NOTE the discrepancy with musiconhold versus musicclass not sure if I am reading this correctly but looks like we need to use both musicclass and musiconhold In sip.conf I set up [general] port = 5060 ; Port to bind to (SIP is 5060) bindaddr = 0.0.0.0; Address to bind to (all addresses on machine) disallow=all allow=ulaw allow=alaw context = from-sip-external ; Send unknown SIP callers to this context callerid = Unknown musicclass=default [2001] username=2001 type=friend secret=1234 qualify=no port=5060 nat=never [EMAIL PROTECTED] host=dynamic dtmfmode=rfc2833 context=from-internal canreinvite=no callerid=user1 2001 ---musiconhold=default ;set both values just to be sure ---musicclass=default ;set both values just to be sure [2002] username=2002 type=friend secret=1234 qualify=no port=5060 nat=never [EMAIL PROTECTED] host=dynamic dtmfmode=rfc2833 context=from-internal canreinvite=no callerid=user2 2002 ---musiconhold=Sales ;set both values just to be sure ---musicclass=Sales ;set both values just to be sure [2003] username=2003 type=friend secret=password record_out=Adhoc record_in=Adhoc qualify=no port=5060 pickupgroup=1,2 nat=never [EMAIL PROTECTED] host=dynamic dtmfmode=rfc2833 context=from-internal canreinvite=no callgroup=2 callerid=user3 2003 ---musiconhold=Support ;set both values just to be sure ---musicclass=Support ;set both values just to be sure music.conf ; ; Music on hold class definitions ; [classes] default = quietmp3:/var/lib/asterisk/mohmp3 Sales = quietmp3:/var/lib/asterisk/mohmp3/Sales Support = quietmp3:/var/lib/asterisk/mohmp3/Support ;loud = mp3:/var/lib/asterisk/mohmp3 ;random = quietmp3:/var/lib/asterisk/mohmp3,-z I see mpg123 qued up the music Problem if I make place a call on hold from any of the extensions, the music is always set as the default disregarding the values set under each extension. I have verified that all three classes are working by modifying the [general] . . musicclass=Sales and also to [general] . . musicclass=Support Every time I place a call on hold the person on the other end ALWAYS hears the music defined under the [general] setting. Any advices as to what I may be doing wrong would be much appreciated. ~ron ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] RFC2833 Event Duration
Ryan Courtnage wrote: ... to it. In other words, Asterisk isn't passing along the duration of the original event. Correct. Is this by design? Can * be made to pass on the initial event duration? It is by design, i.e. not accidental. There is no way to pass on the duration at this time, because incoming events are turned into AST_FRAME_DTMF as they pass through the Asterisk core, and those frames do not currently have any way to carry duration information. Keep in mind that Asterisk is used in many applications that are not SIP-SIP, so just because in your situation there is an 'incoming event duration' that doesn't mean there is in all other applications :-) .. where we are unable to pass variable duration DTMF events to the switch, because Asterisk does not send along the duration. Our primary issue is that the duration is simply too short. There are a great many (most) PBXes that don't support variable DTMF event duration at all, so Asterisk is no different in this regard. ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Asterisk or Polycom Bug?
Will McCown wrote: We're testing asterisk 1.2 Beta and I've noticed a minor bug with the message menu on Polycom SIP phones (This is confirmed with both a IP300 and an IP501 both running 1.4.1). Why are you using such an old firmware version? The current release is 1.5.3, and 1.6.2 is about to be released to support the IP601. ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] RFC2833 Event Duration
On Saturday 05 November 2005 14:17, Kevin P. Fleming wrote: It is by design, i.e. not accidental. There is no way to pass on the duration at this time, because incoming events are turned into AST_FRAME_DTMF as they pass through the Asterisk core, and those frames do not currently have any way to carry duration information. Keep in mind that Asterisk is used in many applications that are not SIP-SIP, so just because in your situation there is an 'incoming event duration' that doesn't mean there is in all other applications :-) Why not just specify a reasonable duration? Or put it in sip.conf on a global/peer basis? -A. ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] musiconhold -vs- musicclass problems setting the differnt class of music
On Saturday 05 November 2005 12:45, Ronald Hartmann wrote: Please accept my apology regarding posting in this list, however I have posted in the users list and in the irc channel with no response. This list is not an appeals process for I asked elsewhere and got no response. It is the list for development issues. This is very clearly a user issue. Problem I am unable to set different music classes for different extensions. Problem is that you never set the musiconhold class for the incoming call. You set the musiconhold class only for the channel ANSWERING the call. See application SetMusicOnHold. -- Tilghman ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] Asterisk or Polycom Bug?
On Friday 04 November 2005 19:21, Martin Mateev wrote: it's friday night, at least here, get a life Unless you're the manager of the person posting, you have no business regulating when he does his work. In fact, I'd be interested in hearing about the last thing you contributed to the Asterisk project. No, really. Because if you're going to criticize someone on the developer's list for working on Asterisk, you should at least have the credentials of a developer to back you up. -- Tilghman ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev
Re: [Asterisk-Dev] musiconhold -vs- musicclass problems setting the differnt class of music
You're right. The discrepancy does exist in the 1.0 tree. It was fixed recently in CVS-HEAD and should certainly be in 1.2b2 and later. On 11/5/05, Tilghman Lesher [EMAIL PROTECTED] wrote: On Saturday 05 November 2005 12:45, Ronald Hartmann wrote: Please accept my apology regarding posting in this list, however I have posted in the users list and in the irc channel with no response. This list is not an appeals process for I asked elsewhere and got no response. It is the list for development issues. This is very clearly a user issue. Problem I am unable to set different music classes for different extensions. Problem is that you never set the musiconhold class for the incoming call. You set the musiconhold class only for the channel ANSWERING the call. See application SetMusicOnHold. -- Tilghman ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev ___ Asterisk-Dev mailing list Asterisk-Dev@lists.digium.com http://lists.digium.com/mailman/listinfo/asterisk-dev To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-dev