Re: [asterisk-users] Change codec when dial from SIP to DAHDI
hi: forgot to mention. not only dialout DAHDI, even I dialout SIP TRUNK, the situation is the same: asterisk transcode in the middle even two legs use the same code. 2014-09-25 11:20 GMT+08:00 d tbsky : > hi: > I Have tried asterisk 1.6.2, 1.8, 11, 12, 13. all versions behave > the same => transcode in the middle even two legs use the same code. > > but I found an article which seems to solve this kind of problem: > > https://wiki.asterisk.org/wiki/display/AST/Media+Format+Rewrite > >but I tried version 13 and didn't notice the change, are there new > diaplan commands or channel variables to do this? > >thanks a lot for help!! > > Regards, > tbskyd > > > > > 2014-09-24 1:30 GMT+08:00 d tbsky : >> Hi: >> I am useing asterisk 11.12. >> I use G722 as preferred codec for my ip-phone. and my PSTN DAHDI >> use alaw. G722 is great when ip-phone talks to each other. but when >> ip-phone dialout to PSTN DAHDI, G722 is not great, since it is need to >> transcode to alaw. >> so I try to change the codec when dial from SIP to DAHDI. I tried >> to use IP_CODEC/SIP_CODEC_OUTBOUND at dialplan. but the SIP codec >> change after dahdi answered the channel. so everything is broken. the >> call log like below: >> >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk-predial-hook:2] >> Set("SIP/222-0004", "SIP_CODEC=alaw") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk-predial-hook:3] >> Set("SIP/222-0004", "SIP_OUT_CODEC=alaw") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk-predial-hook:4] >> MacroExit("SIP/222-0004", "") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk:18] GotoIf("SIP/222-0004", >> "0?bypass,1") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk:19] ExecIf("SIP/222-0004", >> "1?Set(CONNECTEDLINE(num,i)=0912345678)") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk:20] ExecIf("SIP/222-0004", >> "1?Set(CONNECTEDLINE(name,i)=CID:222)") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk:21] GotoIf("SIP/222-0004", >> "0?customtrunk") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- >> Executing [s@macro-dialout-trunk:22] Dial("SIP/222-0004", >> "DAHDI/g2/0912345678,300,Tt") in new stack >> [2014-09-23 21:18:46] VERBOSE[11634][C-000d] app_dial.c: -- >> Called DAHDI/g2/0912345678 >> [2014-09-23 21:18:53] VERBOSE[11634][C-000d] app_dial.c: -- >> DAHDI/2-1 answered SIP/222-0004 >> [2014-09-23 21:18:53] NOTICE[11634][C-000d] chan_sip.c: Changing >> codec to 'alaw' for this call because of ${SIP_CODEC} variable >> [2014-09-23 21:18:53] NOTICE[11634][C-000d] chan_sip.c: Changing >> codec to 'alaw' for this call because of ${SIP_CODEC} variable >> >>if I check channel with "core show channel x", got DAHDI/SIP >> legs final like this: >> NativeFormats: (alaw) >> WriteFormat: slin >> ReadFormat: slin >> WriteTranscode: Yes (slin)->(alaw) >> ReadTranscode: Yes (alaw)->(slin) >> >> although two legs finally use alaw both, but transcode use slin in >> the middle. is it possible to prevent the transcode? >> >> if that is not possible, then maybe I should give up using G722 as >> the preffered codec of ip phone. back to G711 seems much easier to >> make all legs with the same codec. >> >>thanks a lot for help!! >> >> Regards, >> tbskyd -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Change codec when dial from SIP to DAHDI
hi: I Have tried asterisk 1.6.2, 1.8, 11, 12, 13. all versions behave the same => transcode in the middle even two legs use the same code. but I found an article which seems to solve this kind of problem: https://wiki.asterisk.org/wiki/display/AST/Media+Format+Rewrite but I tried version 13 and didn't notice the change, are there new diaplan commands or channel variables to do this? thanks a lot for help!! Regards, tbskyd 2014-09-24 1:30 GMT+08:00 d tbsky : > Hi: > I am useing asterisk 11.12. > I use G722 as preferred codec for my ip-phone. and my PSTN DAHDI > use alaw. G722 is great when ip-phone talks to each other. but when > ip-phone dialout to PSTN DAHDI, G722 is not great, since it is need to > transcode to alaw. > so I try to change the codec when dial from SIP to DAHDI. I tried > to use IP_CODEC/SIP_CODEC_OUTBOUND at dialplan. but the SIP codec > change after dahdi answered the channel. so everything is broken. the > call log like below: > > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk-predial-hook:2] > Set("SIP/222-0004", "SIP_CODEC=alaw") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk-predial-hook:3] > Set("SIP/222-0004", "SIP_OUT_CODEC=alaw") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk-predial-hook:4] > MacroExit("SIP/222-0004", "") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk:18] GotoIf("SIP/222-0004", > "0?bypass,1") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk:19] ExecIf("SIP/222-0004", > "1?Set(CONNECTEDLINE(num,i)=0912345678)") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk:20] ExecIf("SIP/222-0004", > "1?Set(CONNECTEDLINE(name,i)=CID:222)") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk:21] GotoIf("SIP/222-0004", > "0?customtrunk") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] pbx.c: -- > Executing [s@macro-dialout-trunk:22] Dial("SIP/222-0004", > "DAHDI/g2/0912345678,300,Tt") in new stack > [2014-09-23 21:18:46] VERBOSE[11634][C-000d] app_dial.c: -- > Called DAHDI/g2/0912345678 > [2014-09-23 21:18:53] VERBOSE[11634][C-000d] app_dial.c: -- > DAHDI/2-1 answered SIP/222-0004 > [2014-09-23 21:18:53] NOTICE[11634][C-000d] chan_sip.c: Changing > codec to 'alaw' for this call because of ${SIP_CODEC} variable > [2014-09-23 21:18:53] NOTICE[11634][C-000d] chan_sip.c: Changing > codec to 'alaw' for this call because of ${SIP_CODEC} variable > >if I check channel with "core show channel x", got DAHDI/SIP > legs final like this: > NativeFormats: (alaw) > WriteFormat: slin > ReadFormat: slin > WriteTranscode: Yes (slin)->(alaw) > ReadTranscode: Yes (alaw)->(slin) > > although two legs finally use alaw both, but transcode use slin in > the middle. is it possible to prevent the transcode? > > if that is not possible, then maybe I should give up using G722 as > the preffered codec of ip phone. back to G711 seems much easier to > make all legs with the same codec. > >thanks a lot for help!! > > Regards, > tbskyd -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Asterisk 1.8 - Security Fix Only Notice
Hey everyone! Way back in the murky days of 2010, the Asterisk project released the first version of Asterisk 1.8. This was the first release following a new policy of alternating Long Term Support (LTS) releases and Standard releases. As the first LTS release, Asterisk 1.8 was quite the milestone -- as a project, we officially committed ourselves to its maintenance for four years! Since its release, Asterisk 1.8 has been immensely successful. With a lot of hard effort by the Asterisk community, it quickly matured into a stable platform. That success can be seen in the subsequent releases of Asterisk, which built heavily on the Asterisk 1.8 architecture. Asterisk 10 (Standard release) took some evolutionary leaps with a new media architecture and better conferencing capabilities, while Asterisk 11 (LTS releases) provided many useful end-user features -- as well as initial WebRTC support and a new XMPP channel driver. None of this would have been possible without the work done in Asterisk 1.8. The current release policy was set up so that users would have a significant amount of time to migrate from one LTS release to the next. With Asterisk 11 being released in 2012, users of Asterisk 1.8 have had about two years to migrate to that LTS release. Alas, that window of time is about nearly done. In October of 2014, Asterisk 1.8 will officially enter 'Security Fix Only' only mode. The next release of Asterisk 1.8, Asterisk 1.8.32.0, is planned to be the final bug fix release of Asterisk 1.8. Following that, no more bug fix releases will be made for Asterisk 1.8. If a security vulnerability is identified, a security release from 1.8.32 will be made that includes the fix for that vulnerability. That level of support will continue for another year. In October of 2015, Asterisk 1.8 will officially enter End-Of-Life. We encourage users of Asterisk 1.8 to consider moving to the next Asterisk LTS, Asterisk 11, at their earliest convenience. For more information on Asterisk versions, please see the Asterisk wiki: https://wiki.asterisk.org/wiki/display/AST/Asterisk+Versions The success of Asterisk 1.8 is due to the involvement and support of the Asterisk community. As always, thank you for your support of Asterisk! Matt -- Matthew Jordan Digium, Inc. | Engineering Manager 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: http://digium.com & http://asterisk.org -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Asterisk 11.13.0 Now Available
The Asterisk Development Team has announced the release of Asterisk 11.13.0. This release is available for immediate download at http://downloads.asterisk.org/pub/telephony/asterisk The release of Asterisk 11.13.0 resolves several issues reported by the community and would have not been possible without your participation. Thank you! The following are the issues resolved in this release: Bugs fixed in this release: --- * ASTERISK-24032 - Gentoo compilation emits warning: "_FORTIFY_SOURCE" redefined (Reported by Kilburn) * ASTERISK-24225 - Dial option z is broken (Reported by dimitripietro) * ASTERISK-24178 - [patch]fromdomainport used even if not set (Reported by Elazar Broad) * ASTERISK-22252 - res_musiconhold cleanup - REF_DEBUG reload warnings and ref leaks (Reported by Walter Doekes) * ASTERISK-23997 - chan_sip: port incorrectly incremented for RTCP ICE candidates in SDP answer (Reported by Badalian Vyacheslav) * ASTERISK-24019 - When a Music On Hold stream starts it restarts at beginning of file. (Reported by Jason Richards) * ASTERISK-23767 - [patch] Dynamic IAX2 registration stops trying if ever not able to resolve (Reported by David Herselman) * ASTERISK-24211 - testsuite: Fix the dial_LS_options test (Reported by Matt Jordan) * ASTERISK-24249 - SIP debugs do not stop (Reported by Avinash Mohod) * ASTERISK-23577 - res_rtp_asterisk: Crash in ast_rtp_on_turn_rtp_state when RTP instance is NULL (Reported by Jay Jideliov) * ASTERISK-23634 - With TURN Asterisk crashes on multiple (7-10) concurrent WebRTC (avpg/encryption/icesupport) calls (Reported by Roman Skvirsky) * ASTERISK-24301 - Security: Out of call MESSAGE requests processed via Message channel driver can crash Asterisk (Reported by Matt Jordan) Improvements made in this release: --- * ASTERISK-24171 - [patch] Provide a manpage for the aelparse utility (Reported by Jeremy Lainé) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-11.13.0 Thank you for your continued support of Asterisk! -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Asterisk 12.6.0 Now Available
The Asterisk Development Team has announced the release of Asterisk 12.6.0. This release is available for immediate download at http://downloads.asterisk.org/pub/telephony/asterisk The release of Asterisk 12.6.0 resolves several issues reported by the community and would have not been possible without your participation. Thank you! The following are the issues resolved in this release: Bugs fixed in this release: --- * ASTERISK-24027 - MixMonitor AMI action called during AGI execution from bridge feature causes channel to leave AGI has hung up (Reported by Matt Jordan) * ASTERISK-24236 - res_hep_rtcp: Module incorrectly depends on pjsip (Reported by Matt Jordan) * ASTERISK-24032 - Gentoo compilation emits warning: "_FORTIFY_SOURCE" redefined (Reported by Kilburn) * ASTERISK-24225 - Dial option z is broken (Reported by dimitripietro) * ASTERISK-24234 - app_meetme: Crash on conference shutdown due to NULL channel passed to meetme_stasis_generate_msg() (Reported by Shaun Ruffell) * ASTERISK-24043 - ARI /continue fails to actually continue into the dialplan (Reported by Krandon Bruse) * ASTERISK-24245 - gcc 4.1.2 complains of files that do not end with newlines (Reported by Shaun Ruffell) * ASTERISK-24229 - ARI: playback of sounds implicitly answers channel, preventing early media playback (Reported by Matt Jordan) * ASTERISK-24178 - [patch]fromdomainport used even if not set (Reported by Elazar Broad) * ASTERISK-22252 - res_musiconhold cleanup - REF_DEBUG reload warnings and ref leaks (Reported by Walter Doekes) * ASTERISK-23994 - res_pjsip_sdp_rtp: owner address in SDP may not be fully qualified domainname (Reported by Private Name) * ASTERISK-24147 - ARI: channel hangup crashes asterisk process (Reported by Edvin Vidmar) * ASTERISK-23997 - chan_sip: port incorrectly incremented for RTCP ICE candidates in SDP answer (Reported by Badalian Vyacheslav) * ASTERISK-24143 - pjsip: Outbound call to WebRTC UA fails to transmit ACK on received 200 OK (Reported by Aleksei Kulakov) * ASTERISK-24019 - When a Music On Hold stream starts it restarts at beginning of file. (Reported by Jason Richards) * ASTERISK-23767 - [patch] Dynamic IAX2 registration stops trying if ever not able to resolve (Reported by David Herselman) * ASTERISK-24264 - ARI: Adding a channel to a holding bridge automatically starts MOH (Reported by Samuel Galarneau) * ASTERISK-24212 - testsuite: Sporadic crash due to assert on stopping RTP engine (Reported by Matt Jordan) * ASTERISK-24241 - crash: CDRs recursively attempt to update Party B information in a multi-party bridge, overrunning the stack (Reported by Deepak Singh Rawat) * ASTERISK-24254 - CDRs: Application/args/dialplan CEP updated during dial operation (Reported by Matt Jordan) * ASTERISK-24231 - crash: CLI execution of realtime destroy sippeers id 1 causes crash due to NULL name provided to ast_variable (Reported by Niklas Larsson) * ASTERISK-24249 - SIP debugs do not stop (Reported by Avinash Mohod) * ASTERISK-23577 - res_rtp_asterisk: Crash in ast_rtp_on_turn_rtp_state when RTP instance is NULL (Reported by Jay Jideliov) * ASTERISK-23634 - With TURN Asterisk crashes on multiple (7-10) concurrent WebRTC (avpg/encryption/icesupport) calls (Reported by Roman Skvirsky) * ASTERISK-24161 - PJSIPShowEndpoint gives inaccurate count of list items (Reported by Mark Michelson) * ASTERISK-24331 - Unexpected Errors in Asterisk Manager Interface Output (Reported by xrobau) * ASTERISK-24136 - Security: Crash in Asterisk's PJSIP code when subscribing to an event with an unexpected body type (Reported by Mark Michelson) * ASTERISK-24301 - Security: Out of call MESSAGE requests processed via Message channel driver can crash Asterisk (Reported by Matt Jordan) * ASTERISK-24290 - Endpoint identifier match value fails to parse when CIDR network format is specified (Reported by Ray Crumrine) * ASTERISK-24237 - CDR: FRACK With PJSIP blonde transfer. (Reported by Richard Mudgett) Improvements made in this release: --- * ASTERISK-24171 - [patch] Provide a manpage for the aelparse utility (Reported by Jeremy Lainé) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-12.6.0 Thank you for your continued support of Asterisk! -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-us
[asterisk-users] Asterisk 1.8.31.0 Now Available
The Asterisk Development Team has announced the release of Asterisk 1.8.31.0. This release is available for immediate download at http://downloads.asterisk.org/pub/telephony/asterisk The release of Asterisk 1.8.31.0 resolves several issues reported by the community and would have not been possible without your participation. Thank you! The following are the issues resolved in this release: Bugs fixed in this release: --- * ASTERISK-24032 - Gentoo compilation emits warning: "_FORTIFY_SOURCE" redefined (Reported by Kilburn) * ASTERISK-24225 - Dial option z is broken (Reported by dimitripietro) * ASTERISK-24178 - [patch]fromdomainport used even if not set (Reported by Elazar Broad) * ASTERISK-24019 - When a Music On Hold stream starts it restarts at beginning of file. (Reported by Jason Richards) * ASTERISK-24211 - testsuite: Fix the dial_LS_options test (Reported by Matt Jordan) * ASTERISK-24249 - SIP debugs do not stop (Reported by Avinash Mohod) Improvements made in this release: --- * ASTERISK-24171 - [patch] Provide a manpage for the aelparse utility (Reported by Jeremy Lainé) For a full list of changes in this release, please see the ChangeLog: http://downloads.asterisk.org/pub/telephony/asterisk/ChangeLog-1.8.31.0 Thank you for your continued support of Asterisk! -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] AsteriskCDR
On 9/23/14, 10:38 PM, Gokan Atmaca wrote: Hello; I was using the 1.8 version of Asterisk. However, due to a problem I had to update. Update reporting system is broken when you have made. Current version 11.10. I installed the modules in the system for problems that are missing. I getting error as follows. ^[[A[Sep 24 03:16:50] WARNING[3624] loader.c:*Module 'app_mysql.so' was not compiled with the same compile-time options as this version of Asterisk.* [Sep 24 03:16:50] WARNING[3624] loader.c: Module 'app_mysql.so' will not be initialized as it may cause instability. [Sep 24 03:16:50] WARNING[3624] loader.c: Module 'app_mysql.so' could not be loaded. Asterisk to 11.12.0 "app_mysql.so" found. But it gives the following error. Then I found the necessary libraries for version 10.11. (app_mysql.so, res_config_mysql.so) Now the'm getting an error as follows. *Error loading module 'app_mysql.so': libmysqlclient.so.16*: cannot open shared object file: No such file or directory I want to do this without re-installing. Can you help? It seems you did not enable the mysql modules when you compiled Asterisk 11 and thus the old modules from 1.8 are still in /usr/lib/modules/asterisk. Go to the source code directory where you compiled and do a "make menuconfig" and make sure you enable cdr_mysql and app_mysql. Then do another make && make install so the modules are copied. -- Telecomunicaciones Abiertas de México S.A. de C.V. Carlos Chávez +52 (55)9116-91161 -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Playback/background audio from MySQL BLOB
On 09/23/2014 10:53 PM, Don Kelly wrote: On Tue, 23 Sep 2014, Steve Edwards wrote: On 09/23/2014 02:17 PM, Steve Edwards wrote: For some applications, storing recorded audio (prompts and caller recordings) as a BLOB in MySQL has advantages. On Tue, 23 Sep 2014, Don Kelly wrote: I'm curious about what the advantages are of storing audio in a blob. Wouldn't it be more efficient to store it in a file and just put the filename in the database? Multiple web servers, multiple Asterisk servers, multiple DB servers, synchronizing filesystems vs db, etc. It appears to eliminate some problems, but Asterisk limiting audio playback to files seems like a tough obstacle. Mike said: Maybe make the audio files available to all servers via a single NFS directory? Probably not a good solution if the servers aren't co-located. Maybe someone could write a Linux device "file" that would return the blob's content as a file read. I beat you to that one ;) That is exactly what a named pipe (fifo) is. Asterisk would read it like a sound file, and the AGI would dump the BLOB to it on demand. It would work, but you can't have more than one process at a time reading from it, so that's a further complication... j -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
[asterisk-users] Identifying frequency tone in Asterisk
Hi, I have 2 Asterisk systems and a unique scenario where I need to play a particular tone on Asterisk1 and identify the same tone on Asterisk2. Following is my call flow, Asterisk1(Plays audiofile1,Wait for 2 Sec,Plays a tone,Plays audiofile2) -> PSTN -> 3rd Party CONFERENCE SYSTEM <- PSTN <- Asterisk2(Record audiofile1,Wait for a tone,Record audiofile2). A few points to keep in mind, (1)I can not send DTMF tones as Conference system suppresses it. (2)There is no other way to pass information from Asterisk1 to Asterisk2 (3)Asterisk2 doesn't know the length of audiofile1,audiofile2. (files are less than 200 Sec in duration) I am thinking of changing a frequency of one of the DTMFs on Asterisk 2(dsp.c,let us say DTMF D, from 941,1633 to 951,1643) and playing that frequency tone from Asterisk 1. So On Asterisk1, [play] ... ... same => n,Playback(audiofile1) same => n,Wait(2) same => n,Playtones(951,1643) same => n,StopPlaytones() same => n,Playback(audiofile2) And something similar to below on Asterisk2 [record] ... ... same => n,MixMonitor(audiofile1) same => n,Read(DATA,silence/1,1,,,200) same => n,ExecIf($["${DATA}" = "D"]?NoOP(D received):HangUp()) same => n,MixMonitor(audiofile2) ... ... Do you see any harm in this solution? Can you suggest me a better solution? I'll appreciate your responses. Thanks, --Satish Barot -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Playback/background audio from MySQL BLOB
On 24/9/14 10:36 am, A J Stiles wrote: But personally, I'd just store the filenames in the database; and rely on the unix filesystem for storing the actual file contents. After all, that's what a filesystem is for. This. Shocking as it might appear, filesystems are remarkably good at storing files. They were designed to do it. Why try to shoehorn a database into doing something it wasn't designed to do (and isn't particularly good at doing)? Kind regards, Chris -- This email is made from 100% recycled electrons -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Playback/background audio from MySQL BLOB
Hello, Le 23/09/2014 23:38, Steve Edwards a écrit : >> On 09/23/2014 02:17 PM, Steve Edwards wrote: > >>> For some applications, storing recorded audio (prompts and caller >>> recordings) as a BLOB in MySQL has advantages. > > On Tue, 23 Sep 2014, Don Kelly wrote: > >> I'm curious about what the advantages are of storing audio in a blob. >> Wouldn't it be more efficient to store it in a file and just put the >> filename in the database? > > Multiple web servers, multiple Asterisk servers, multiple DB servers, > synchronizing filesystems vs db, etc. > > It appears to eliminate some problems, but Asterisk limiting audio > playback to files seems like a tough obstacle. > We solved this problem by storing the voicemail with IMAP. It is possible to access IMAP simultaneously from different locations, and a lot of implementations offer the ability to integrate IMAP into web-applications. That's how we did it anyway. Best regards. signature.asc Description: OpenPGP digital signature -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] Playback/background audio from MySQL BLOB
On Tuesday 23 Sep 2014, Steve Edwards wrote: > For some applications, storing recorded audio (prompts and caller > recordings) as a BLOB in MySQL has advantages. > > So, once I have the audio in the database, how can I play it? > > Creating temporary files seems so tacky. > > Is there another way to playback or background audio either by specifying > a URL or from a memory buffer (either C or PHP)? Depending how many messages you have, you could use a named pipe (FIFO) or a Unix-domain socket for each one; and have the individual backend processes interrogate the database and dump the contents of the relevant field down it. As far as Asterisk is concerned, the socket / FIFO looks just like a file; it doesn't care much that the data in it is really coming from a process on the other end. This obviously suffers from the problem of decreasing manageability, the more message "files" you have. But personally, I'd just store the filenames in the database; and rely on the unix filesystem for storing the actual file contents. After all, that's what a filesystem is for. -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk . -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users
Re: [asterisk-users] read digits from the user through php agi script
On Tuesday 23 Sep 2014, Brahim Abidar wrote: > hi everyone, > actually i want to release an IVR system using PHPAGI API , in this IVR i > want to get value from the user. > I already used get_data defined in phpagi but they are not able to get the > value given by the user and store it in a php variable. > i tested this : > $result = $agi->get_data('beep', 3000, 20); > $keys = $result['result']; > > but every time i found in $keys variable 0. > > please any help or suggestions > thank you for spending your valuable time for me. Why do you want to do this in an AGI? It's easy enough to do in the dialplan. Here's how I did it; you'll need to substitute your own sound bytes, obviously, but I've added comments showing what they say: [get_pin] exten => s,1,Set(pin=) exten => s,n,Set(PINLENGTH=4) ; "Enter your PIN. If you make a mistake, press STAR." exten => s,n(prompt),Background(ajs-enter_pin) ; Build up the PIN digit by digit. The WaitExten() will be cut short by any ; keystroke, so we can use a quite longish timeout. exten => s,n(nextdigit),WaitExten(30) ; "Sorry, I didn't get that." exten => s,n,Playback(ajs-sorry_didnt_get) exten => s,n,GoToIf($[${LEN(${pin})}<1]?prompt:saysofar) ; "The digits entered so far are:" exten => s,n(saysofar),Playback(ajs-digits_so_far) exten => s,n,SayDigits(${pin}) exten => s,n,Goto(nextdigit) ; This context needs to have a "h" extension; because we may well be ; placing a call from here, if the PIN was correct. exten => h,1,NoOp(Clearing up) ; . carry on tidying up after ourselves ; "PIN cleared. Start again from the beginning." exten => *,1,Playback(ajs-start_again) exten => *,2,GoTo(get_pin,s,1) exten => #,1,Hangup() exten => _X,1,Set(pin=${pin}${EXTEN:0:1}) exten => _X,n,NoOp(PIN so far is ${pin}) exten => _X,n,GoToIf($[${LEN(${pin})}>=${PINLENGTH}]?got_all:need_more) exten => _X,n(need_more),GoTo(get_pin,s,nextdigit) ; We have all 4 digits . exten => _X,n(got_all),NoOp(PIN is ${pin}) ; . and we continue from here with the PIN in ${pin} -- AJS Note: Originating address only accepts e-mail from list! If replying off- list, change address to asterisk1list at earthshod dot co dot uk . -- _ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- New to Asterisk? Join us for a live introductory webinar every Thurs: http://www.asterisk.org/hello asterisk-users mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/asterisk-users