RE: [asterisk-users] Log CODECS in CDR's
That looks like exactly what I want, we are currently on 1.2, ill see if i can hack similar functionality into it, if not ill have to upgrade to 1.4 (probably best anyway) Thanks for the pointers. From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of James FitzGibbon Sent: 11 May 2007 15:15 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Log CODECS in CDR's On 5/11/07, Morgan Gilroy [EMAIL PROTECTED] wrote: At the moment to find the codecs used I have to look though the sip trace or show channels/show channel (annoying when you have 50+ channels). Im just trying to find an easier and quicker way to keep track of the codecs used to help with debug etc. The closest variable iv found is, ${SIP_CODEC} Set the SIP codec for a call Ill see if NoOp (${SIP_CODEC}) shows the codec that was used without me setting it though I don't think it will. Iv looked all over and I cant find anything so it looks like I may have to hack a ast_set_var into app_dial or chan_sip 1.4 has the CHANNEL function: pbxlab-01*CLI show function CHANNEL pbxlab-01*CLI -= Info about function 'CHANNEL' =- [Syntax] CHANNEL(item) [Synopsis] Gets/sets various pieces of information about the channel. [Description] Gets/set various pieces of information about the channel. Standard items (provided by all channel technologies) are: R/O audioreadformatformat currently being read R/O audionativeformat format used natively for audio R/O audiowriteformat format currently being written R/W callgroup call groups for call pickup R/O channeltypetechnology used for channel R/W language language for sounds played R/W musicclass class (from musiconhold.conf ) for hold music R/W rxgain set rxgain level on channel drivers that support it R/O state state for channel R/W tonezone zone for indications played R/W txgain set txgain level on channel drivers that support it R/O videonativeformat format used natively for video When I put this in a dialplan with NoOps and called channel macros, I can kind of get what you're describing: [from-external-pbxtel] exten = 491,1,NoOp(${CHANNEL(audioreadformat)}) exten = 491,n,NoOp(${CHANNEL(audiowriteformat)}) exten = 491,n,NoOp(${CHANNEL(audionativeformat)}) exten = 491,n,Dial(SIP/491,20,M(logcodec)) exten = 491,n,Hangup [macro-logcodec] exten = s,1,NoOp(${CHANNEL(audioreadformat)}) exten = s,n,NoOp(${CHANNEL(audiowriteformat)}) exten = s,n,NoOp(${CHANNEL(audionativeformat)}) Console output is: -- Executing [ [EMAIL PROTECTED]:1] NoOp(IAX2/pbxtel-01-5, ulaw) in new stack -- Executing [EMAIL PROTECTED]:2] NoOp(IAX2/pbxtel-01-5, ulaw) in new stack -- Executing [ [EMAIL PROTECTED]:3] NoOp(IAX2/pbxtel-01-5, ulaw) in new stack -- Executing [EMAIL PROTECTED]:4] Dial(IAX2/pbxtel-01-5, SIP/491|20|M(logcodec)) in new stack -- Called 491 -- SIP/491-0a16d1c0 is ringing -- SIP/491-0a16d1c0 answered IAX2/pbxtel-01-5 -- Executing [EMAIL PROTECTED]:1] NoOp(SIP/491-0a16d1c0, slin) in new stack -- Executing [EMAIL PROTECTED]:2] NoOp(SIP/491-0a16d1c0, slin) in new stack -- Executing [EMAIL PROTECTED]:3] NoOp(SIP/491-0a16d1c0, gsm) in new stack == Spawn extension (from-external-pbxtel, 491, 4) exited non-zero on 'IAX2/pbxtel-01-5' -- Hungup 'IAX2/pbxtel-01-5' This is a call coming in as ulaw over IAX2, then going to a SIP softphone configured for only gsm. Hope that helps. -- j. __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [asterisk-users] Log CODECS in CDR's
Thanks for the pointers, I know about the Set(CDR..) function but I need the codec that was negotiated in the Dial (once I have that its easy to stick it into the cdrs as you pointed out). Ie a call comes in as G729 Dial then negotiates GSM for the outbound leg, I want to log both these codecs in a CDR. At the moment to find the codecs used I have to look though the sip trace or show channels/show channel (annoying when you have 50+ channels). Im just trying to find an easier and quicker way to keep track of the codecs used to help with debug etc. The closest variable iv found is, ${SIP_CODEC} Set the SIP codec for a call Ill see if NoOp (${SIP_CODEC}) shows the codec that was used without me setting it though I don't think it will. Iv looked all over and I cant find anything so it looks like I may have to hack a ast_set_var into app_dial or chan_sip -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of dave cantera Sent: 11 May 2007 03:24 To: Asterisk Users Mailing List - Non-Commercial Discussion Subject: Re: [asterisk-users] Log CODECS in CDR's morgan, I've seen some info on additional variables in the CDR... but haven't tried it... look to these pages: daveC http://www.asterisk.org/doxygen/1.2/AstCDR.html In addition, you can set your own extra variables by using Set(CDR(name)=value). These variables can be output into a text-format CDR by using the cdr_custom CDR driver; see the cdr_custom.conf.sample file in the configs directory for an example of how to do this. -and- http://www.voip-info.org/wiki/view/Asterisk+Detailed+Variable+List Morgan Gilroy wrote: Hi, Does anyone know how to get the codec that was negotiated for a call after a dial? I want to log them into CDR but can't find any way to do it without hacking the code. It would be good if I could get it in an asterisk variable I can log off seperatly. Thanks! ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Building Strong Relationships w/ Intelligent Customer Service -- Interlocking Business Solutions, LLC 856-380-0894 x5000 ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users __ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email __ ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Log CODECS in CDR's
On 5/11/07, Morgan Gilroy [EMAIL PROTECTED] wrote: At the moment to find the codecs used I have to look though the sip trace or show channels/show channel (annoying when you have 50+ channels). Im just trying to find an easier and quicker way to keep track of the codecs used to help with debug etc. The closest variable iv found is, ${SIP_CODEC} Set the SIP codec for a call Ill see if NoOp (${SIP_CODEC}) shows the codec that was used without me setting it though I don't think it will. Iv looked all over and I cant find anything so it looks like I may have to hack a ast_set_var into app_dial or chan_sip 1.4 has the CHANNEL function: pbxlab-01*CLI show function CHANNEL pbxlab-01*CLI -= Info about function 'CHANNEL' =- [Syntax] CHANNEL(item) [Synopsis] Gets/sets various pieces of information about the channel. [Description] Gets/set various pieces of information about the channel. Standard items (provided by all channel technologies) are: R/O audioreadformatformat currently being read R/O audionativeformat format used natively for audio R/O audiowriteformat format currently being written R/W callgroup call groups for call pickup R/O channeltypetechnology used for channel R/W language language for sounds played R/W musicclass class (from musiconhold.conf) for hold music R/W rxgain set rxgain level on channel drivers that support it R/O state state for channel R/W tonezone zone for indications played R/W txgain set txgain level on channel drivers that support it R/O videonativeformat format used natively for video When I put this in a dialplan with NoOps and called channel macros, I can kind of get what you're describing: [from-external-pbxtel] exten = 491,1,NoOp(${CHANNEL(audioreadformat)}) exten = 491,n,NoOp(${CHANNEL(audiowriteformat)}) exten = 491,n,NoOp(${CHANNEL(audionativeformat)}) exten = 491,n,Dial(SIP/491,20,M(logcodec)) exten = 491,n,Hangup [macro-logcodec] exten = s,1,NoOp(${CHANNEL(audioreadformat)}) exten = s,n,NoOp(${CHANNEL(audiowriteformat)}) exten = s,n,NoOp(${CHANNEL(audionativeformat)}) Console output is: -- Executing [EMAIL PROTECTED]:1] NoOp(IAX2/pbxtel-01-5, ulaw) in new stack -- Executing [EMAIL PROTECTED]:2] NoOp(IAX2/pbxtel-01-5, ulaw) in new stack -- Executing [EMAIL PROTECTED]:3] NoOp(IAX2/pbxtel-01-5, ulaw) in new stack -- Executing [EMAIL PROTECTED]:4] Dial(IAX2/pbxtel-01-5, SIP/491|20|M(logcodec)) in new stack -- Called 491 -- SIP/491-0a16d1c0 is ringing -- SIP/491-0a16d1c0 answered IAX2/pbxtel-01-5 -- Executing [EMAIL PROTECTED]:1] NoOp(SIP/491-0a16d1c0, slin) in new stack -- Executing [EMAIL PROTECTED]:2] NoOp(SIP/491-0a16d1c0, slin) in new stack -- Executing [EMAIL PROTECTED]:3] NoOp(SIP/491-0a16d1c0, gsm) in new stack == Spawn extension (from-external-pbxtel, 491, 4) exited non-zero on 'IAX2/pbxtel-01-5' -- Hungup 'IAX2/pbxtel-01-5' This is a call coming in as ulaw over IAX2, then going to a SIP softphone configured for only gsm. Hope that helps. -- j. ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
RE: [asterisk-users] Log CODECS in CDR's
Hi Morgan, Am Freitag, den 11.05.2007, 10:32 +0100 schrieb Morgan Gilroy: Thanks for the pointers, I know about the Set(CDR..) function but I need the codec that was negotiated in the Dial (once I have that its easy to stick it into the cdrs as you pointed out). Ie a call comes in as G729 Dial then negotiates GSM for the outbound leg, I want to log both these codecs in a CDR. At the moment to find the codecs used I have to look though the sip trace or show channels/show channel (annoying when you have 50+ channels). Im just trying to find an easier and quicker way to keep track of the codecs used to help with debug etc. The closest variable iv found is, ${SIP_CODEC} Set the SIP codec for a call Ill see if NoOp (${SIP_CODEC}) shows the codec that was used without me setting it though I don't think it will. Iv looked all over and I cant find anything so it looks like I may have to hack a ast_set_var into app_dial or chan_sip It is untested, but maybe You can write a little AGI-Script which accesses some channel vars. Call that AGI as a DeadAGI. A DeadAGI will be called, if a connection terminates (connect it with the 'h'-Extension, see the wiki). I don't know if the neccessary information is still alive at this time, but maybe it will do what You want... HTH, Karsten ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Log CODECS in CDR's
morgan, I've seen some info on additional variables in the CDR... but haven't tried it... look to these pages: daveC http://www.asterisk.org/doxygen/1.2/AstCDR.html In addition, you can set your own extra variables by using Set(CDR(name)=value). These variables can be output into a text-format CDR by using the cdr_custom CDR driver; see the cdr_custom.conf.sample file in the configs directory for an example of how to do this. -and- http://www.voip-info.org/wiki/view/Asterisk+Detailed+Variable+List Morgan Gilroy wrote: Hi, Does anyone know how to get the codec that was negotiated for a call after a dial? I want to log them into CDR but can't find any way to do it without hacking the code. It would be good if I could get it in an asterisk variable I can log off seperatly. Thanks! ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users -- Building Strong Relationships w/ Intelligent Customer Service -- Interlocking Business Solutions, LLC 856-380-0894 x5000 ___ --Bandwidth and Colocation provided by Easynews.com -- asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users