Hello I'd like to configure Asterisk so that... 1. I ring it from my cellphone with CID number displayed, just to notify Asterisk that I wish to make a call 2. Asterisk waits until I hang up, calls me back, and prompts me for the number I wish to call 3. Asterisk puts me on hold through Flash(), which is apparently the equivalent of hitting the R key on European handsets 4. Asterisk calls the number, and once the remote party has answered, bridges the two channels Ideally, I'd like to do this entirely through extensions.conf, and avoid callling an AGI script or having to add Konference: This is an appliance, so RAM isn't plentiful, it runs uClinux instead of run-of-the-mill Linux, and I would like to avoid having to patch Asterisk. I've seen articles about Call files. Is this the easiest way to solve this problem? www.voip-info.org/tiki-index.php?page=Asterisk+auto-dial+out Thank you for any help.
On 11-02-05 06:07 AM, Gilles wrote:> I'd like to configure Asterisk so that... > 1. I ring it from my cellphone with CID number displayed, just to > notify Asterisk that I wish to make a call >Easy enough. I would suggest using Disa() for added security.> 2. Asterisk waits until I hang up, calls me back, and prompts me for > the number I wish to call >use exten => h to start a local channel, wait x seconds, dial your cell phone.> 3. Asterisk puts me on hold through Flash(), which is apparently the > equivalent of hitting the R key on European handsets >Straight forward.> 4. Asterisk calls the number, and once the remote party has answered, > bridges the two channels >Same, straight forward> Ideally, I'd like to do this entirely through extensions.conf, and > avoid callling an AGI script or having to add Konference: This is an > appliance, so RAM isn't plentiful, it runs uClinux instead of > run-of-the-mill Linux, and I would like to avoid having to patch > Asterisk. >Should be no more then 10-15 lines within your extensions.conf -- Paul Belanger Digium, Inc. | Software Developer twitter: pabelanger | IRC: pabelanger (Freenode) Check us out at: http://digium.com & http://asterisk.org
On Sat, 05 Feb 2011 12:07:28 +0100, Gilles <codecomplete at free.fr> wrote:>I've seen articles about Call files. Is this the easiest way to solve >this problem?For some reason, Asterisk executes Wait(10), but then hangs up without running the rest of the commands (cp, echo, mv): =========[from_fxo] exten => s,1,Wait(2) exten => s,n,Set(SOURCE_CIDNUMBER=${CALLERID(num)}) exten => s,n,Set(SOURCE_CIDNAME=${CALLERID(name)}) exten => s,n,NoOp(Call from ${SOURCE_CIDNAME} - ${SOURCE_CIDNUMBER}) exten => s,n,GotoIf($["${SOURCE_CIDNUMBER}" = ${GSM}]?goodcid:badcid) exten => s,n(goodcid),NoOp(CID OK) ;how to reliably detect that line is now quiet? exten => s,n,Wait(10) exten => s,n,NoOp(Before cp) exten => s,n,system(cp /var/spool/asterisk/skelett.call /var/tmp/skelett.call) exten => s,n,NoOp(Before echo) exten => s,n,system(echo 'Channel: ZAP/1/${IPPI}' >> /var/tmp/skelett.call) exten => s,n,NoOp(Before mv) exten => s,n,system(mv /var/tmp/skelett.call /var/spool/asterisk/outgoing) ;exten => s,n,Hangup ;Context set in call file [callback-dialtone-auth] exten => s,1,NoOp(Call from ${CALLERIS(num)}) ========= FWIW, "show modules" says that pbx_spool.so is loaded. Has someone experienced this? Thank you.
Thanks much everyone for the great help. I did go through the last suggestions about the callfile (no CRLF issue, permissions are 644 and file owned by root, starting asterisk through strace, etc.), but none helped. However, by chance, I happened on a pattern: The callfile is handled only if I... 1. Stop Asterisk through its init.d script 2. Mv the callfile 3. Start Asterisk through its init.d script Here are the commands I run, the little script I use to move the callfile, and what it contains: ==========/var/tmp> /etc/init.d/asterisk start /var/tmp> ./mvSIP.bash /var/tmp> /etc/init.d/asterisk stop /var/tmp> /etc/init.d/asterisk start ==========/var/tmp> cat mvSIP.bash #!/bin/sh cp callfileSIP.call.backup callfileSIP.call mv callfileSIP.call /var/spool/asterisk/outgoing ==========Channel: SIP/xlite Context: callback-dialtone-auth Extension: s Priority: 1 MaxRetries: 2 RetryTime: 60 WaitTime: 30 Archive: yes ========== Once the callfile has been handled, it is moved from /var/spool/asterisk/outgoing to ./outgoing_done and has a couple of lines appended: ==========... StartRetry: 2306 1 (1297171283) Status: Completed ========== I don't know if it means anything, but here's the output of "mount" on this appliance (the root filesystem uses yaffs for persistence): ==========/var/tmp> mount rootfs on / type rootfs (rw) /dev/root on / type yaffs (rw) proc on /proc type proc (rw) ramfs on /var/tmp type ramfs (rw) sysfs on /sys type sysfs (rw) devpts on /dev/pts type devpts (rw) usbfs on /proc/bus/usb type usbfs (rw) securityfs on /sys/kernel/security type securityfs (rw) ========== Thank you.
On Tue, 08 Feb 2011 14:23:12 +0100, Gilles <codecomplete at free.fr> wrote:>However, by chance, I happened on a pattern: The callfile is handled >only if I... >1. Stop Asterisk through its init.d script >2. Mv the callfile >3. Start Asterisk through its init.d scriptIt also works if I launch Asterisk manually with eg. "asterisk -vvvvddc".
Interesting... http://en.wikipedia.org/wiki/Inotify http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=33403
Gilles, Nice! That was some good reading! On Tue, Feb 8, 2011 at 6:01 PM, Gilles <codecomplete at free.fr> wrote:> Interesting... > > http://en.wikipedia.org/wiki/Inotify > > http://blackfin.uclinux.org/gf/project/uclinux-dist/forum/?action=ForumBrowse&forum_id=39&_forum_action=ForumMessageBrowse&thread_id=33403 > > > -- > _____________________________________________________________________ > -- 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110209/09b21063/attachment.htm>
On Wed, 9 Feb 2011 00:01:49 -0600, Sherwood McGowan <sherwood.mcgowan at gmail.com> wrote:>Nice! That was some good reading!Unfortunately, I checked how the uClinux kernel was configured for compiling, and the inotify is indeed selected by default :-/ Linux Kernel Configuration File systems [*] Inotify file change notification support [*] Inotify support for userspace [*] Dnotify support Miscellaneous filesystems <*> YAFFS2 file system support
On Sat, 05 Feb 2011 12:07:28 +0100, Gilles <codecomplete at free.fr> wrote:>I've seen articles about Call files. Is this the easiest way to solve >this problem?I'm reading the 3rd edition of the "Asterisk: The Definitive Guide", but since it's pretty big and there's no guarantee that the answer to this issue is even in the book, I'd rather ask for feedback. At this point, Asterisk is finally able to... 1. Detect a RING from my cellphone 2. Wait long enough to the line to stop ringing 3. Copy/modify/move a call file in the asterisk/outgoing directory 4. Make a callback to my cellphone The problem is that Asterisk triggers an error when trying to make the callback: ==================-- Attempting call on Zap/1/123456 for s at callback:1 (Retry 1) [Jan 1 01:54:34] NOTICE[317]: channel.c:2863 __ast_request_and_dial: Unable to request channel Zap/1/123456 [Jan 1 01:54:34] NOTICE[317]: pbx_spool.c:341 attempt_thread: Call failed to go through, reason (0) Call Failure (not BUSY, and not NO_ANSWER, maybe Circuit busy or down?) ================== Here's the callfile template: ==================/var/tmp> cat ZAP.call.orig Context: callback Extension: s ================== ... and here's extensions.conf: ==================[from_fxo] ;how to reliably detect that line is now quiet? exten => s,1,Wait(15) exten => s,n,Hangup exten => h,1,system(cp /var/tmp/ZAP.call.orig /var/tmp/ZAP.call) exten => h,n,System(echo 'Channel: Zap/1/${CELLPHONE}' >> /var/tmp/ZAP.call) exten => h,n,system(mv /var/tmp/ZAP.call /var/tmp/asterisk/outgoing) [callback] exten => s,1,Verbose(In callback) exten => s,n,Wait(10) exten => s,n,Hangup ================== FWIW, I wondered if using a GoTo in "h" to jump to another context would help, but it made no difference. If someone's already built a callback like the above using an FXO module, I would appreciate any feedback to try and solve this issue. Thank you.
Hi guys, I am getting YELLOW alarm on my span with E1 line. Anyone knows what could be the problem ? Below is my config and status... voice:/etc/dahdi# dahdi_hardware -v pci:0000:02:08.0 wct4xxp+ d161:1220 Wildcard TE220 (5th Gen) voice:/etc/dahdi# dahdi_scan [1] active=yes alarms=YEL description=T2XXP (PCI) Card 0 Span 1 name=TE2/0/1 manufacturer=Digium devicetype=Wildcard TE220 (5th Gen) (VPMOCT064) location=Board ID Switch 0 basechan=1 totchans=31 irq=16 type=digital-E1 syncsrc=0 lbo=0 db (CSU)/0-133 feet (DSX-1) coding_opts=AMI,HDB3 framing_opts=CCS,CRC4 coding=HDB3 framing=CCS [2] <cut> .... </cut> voice:/etc/dahdi# cat system.conf # Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER) span=1,1,0,ccs,hdb3 bchan=1-15,17-31 dchan=16 echocanceller=mg2,1-15,17-31 # Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2" # span=2,0,0,ccs,hdb3,crc4,yellow span=2,0,0,ccs,hdb3 bchan=32-46,48-62 dchan=47 echocanceller=mg2,32-46,48-62 # Global data loadzone = uk defaultzone = uk ps1. I am using DAHDI drivers in version 2.4.0 ps2. in attachment screen from dahdi_tool Any help will do. Thanks, Alebert -------------- next part -------------- A non-text attachment was scrubbed... Name: dahdi.png Type: image/png Size: 28918 bytes Desc: not available URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110214/ea49efb4/attachment.png>
Hello, Can you say us what is connected in which span ? span 1 span 2 Yellow would say that the span did not receive external clock Sebastien AB2L +33 (0)367100783 sebastien at ab2l.eu Le 14/02/2011 11:34, Albert a ?crit :> Hi guys, > > I am getting YELLOW alarm on my span with E1 line. Anyone knows what > could be the problem ? Below is my config and status... > > voice:/etc/dahdi# dahdi_hardware -v > pci:0000:02:08.0 wct4xxp+ d161:1220 Wildcard TE220 (5th Gen) > > > voice:/etc/dahdi# dahdi_scan > [1] > active=yes > alarms=YEL > description=T2XXP (PCI) Card 0 Span 1 > name=TE2/0/1 > manufacturer=Digium > devicetype=Wildcard TE220 (5th Gen) (VPMOCT064) > location=Board ID Switch 0 > basechan=1 > totchans=31 > irq=16 > type=digital-E1 > syncsrc=0 > lbo=0 db (CSU)/0-133 feet (DSX-1) > coding_opts=AMI,HDB3 > framing_opts=CCS,CRC4 > coding=HDB3 > framing=CCS > [2] > <cut> ....</cut> > > voice:/etc/dahdi# cat system.conf > # Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER) > span=1,1,0,ccs,hdb3 > bchan=1-15,17-31 > dchan=16 > echocanceller=mg2,1-15,17-31 > > # Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2" > # span=2,0,0,ccs,hdb3,crc4,yellow > span=2,0,0,ccs,hdb3 > bchan=32-46,48-62 > dchan=47 > echocanceller=mg2,32-46,48-62 > > # Global data > > loadzone = uk > defaultzone = uk > > > > > > ps1. I am using DAHDI drivers in version 2.4.0 > > ps2. in attachment screen from dahdi_tool > > Any help will do. > > Thanks, > Alebert > > > -- > _____________________________________________________________________ > -- 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-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20110214/28714346/attachment.htm>
Hi, span 1 - e1 line (15 channels) span 2 - nothing is connected to 2nd span below is also status from proc fs ps. i was also trying with timing provided by card (0) span=1,1,0,ccs,hdb3 ... but result was the same voice:/tmp# cat /proc/dahdi/1 Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER) HDB3/CCS YELLOW 1 TE2/0/1/1 Clear YELLOW(SWEC: MG2) 2 TE2/0/1/2 Clear YELLOW(SWEC: MG2) 3 TE2/0/1/3 Clear YELLOW(SWEC: MG2) 4 TE2/0/1/4 Clear YELLOW(SWEC: MG2) 5 TE2/0/1/5 Clear YELLOW(SWEC: MG2) 6 TE2/0/1/6 Clear YELLOW(SWEC: MG2) 7 TE2/0/1/7 Clear YELLOW(SWEC: MG2) 8 TE2/0/1/8 Clear YELLOW(SWEC: MG2) 9 TE2/0/1/9 Clear YELLOW(SWEC: MG2) 10 TE2/0/1/10 Clear YELLOW(SWEC: MG2) 11 TE2/0/1/11 Clear YELLOW(SWEC: MG2) 12 TE2/0/1/12 Clear YELLOW(SWEC: MG2) 13 TE2/0/1/13 Clear YELLOW(SWEC: MG2) 14 TE2/0/1/14 Clear YELLOW(SWEC: MG2) 15 TE2/0/1/15 Clear YELLOW(SWEC: MG2) 16 TE2/0/1/16 HDLCFCS YELLOW 17 TE2/0/1/17 Clear YELLOW(SWEC: MG2) 18 TE2/0/1/18 Clear YELLOW(SWEC: MG2) 19 TE2/0/1/19 Clear YELLOW(SWEC: MG2) 20 TE2/0/1/20 Clear YELLOW(SWEC: MG2) 21 TE2/0/1/21 Clear YELLOW(SWEC: MG2) 22 TE2/0/1/22 Clear YELLOW(SWEC: MG2) 23 TE2/0/1/23 Clear YELLOW(SWEC: MG2) 24 TE2/0/1/24 Clear YELLOW(SWEC: MG2) 25 TE2/0/1/25 Clear YELLOW(SWEC: MG2) 26 TE2/0/1/26 Clear YELLOW(SWEC: MG2) 27 TE2/0/1/27 Clear YELLOW(SWEC: MG2) 28 TE2/0/1/28 Clear YELLOW(SWEC: MG2) 29 TE2/0/1/29 Clear YELLOW(SWEC: MG2) 30 TE2/0/1/30 Clear YELLOW(SWEC: MG2) 31 TE2/0/1/31 Clear YELLOW(SWEC: MG2) voice:/tmp# cat /proc/dahdi/2 Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2" HDB3/CCS RED 32 TE2/0/2/1 Clear RED(SWEC: MG2) 33 TE2/0/2/2 Clear RED(SWEC: MG2) 34 TE2/0/2/3 Clear RED(SWEC: MG2) 35 TE2/0/2/4 Clear RED(SWEC: MG2) 36 TE2/0/2/5 Clear RED(SWEC: MG2) 37 TE2/0/2/6 Clear RED(SWEC: MG2) 38 TE2/0/2/7 Clear RED(SWEC: MG2) 39 TE2/0/2/8 Clear RED(SWEC: MG2) 40 TE2/0/2/9 Clear RED(SWEC: MG2) 41 TE2/0/2/10 Clear RED(SWEC: MG2) 42 TE2/0/2/11 Clear RED(SWEC: MG2) 43 TE2/0/2/12 Clear RED(SWEC: MG2) 44 TE2/0/2/13 Clear RED(SWEC: MG2) 45 TE2/0/2/14 Clear RED(SWEC: MG2) 46 TE2/0/2/15 Clear RED(SWEC: MG2) 47 TE2/0/2/16 HDLCFCS RED 48 TE2/0/2/17 Clear RED(SWEC: MG2) 49 TE2/0/2/18 Clear RED(SWEC: MG2) 50 TE2/0/2/19 Clear RED(SWEC: MG2) 51 TE2/0/2/20 Clear RED(SWEC: MG2) 52 TE2/0/2/21 Clear RED(SWEC: MG2) 53 TE2/0/2/22 Clear RED(SWEC: MG2) 54 TE2/0/2/23 Clear RED(SWEC: MG2) 55 TE2/0/2/24 Clear RED(SWEC: MG2) 56 TE2/0/2/25 Clear RED(SWEC: MG2) 57 TE2/0/2/26 Clear RED(SWEC: MG2) 58 TE2/0/2/27 Clear RED(SWEC: MG2) 59 TE2/0/2/28 Clear RED(SWEC: MG2) 60 TE2/0/2/29 Clear RED(SWEC: MG2) 61 TE2/0/2/30 Clear RED(SWEC: MG2) 62 TE2/0/2/31 Clear RED(SWEC: MG2) Albert On 14.02.2011 11:39, S?bastien BERGER wrote:> Hello, > > Can you say us what is connected in which span ? > > span 1 > span 2 > > Yellow would say that the span did not receive external clock > > Sebastien > > AB2L > +33 (0)367100783 > sebastien at ab2l.eu > > > Le 14/02/2011 11:34, Albert a ?crit : >> Hi guys, >> >> I am getting YELLOW alarm on my span with E1 line. Anyone knows what >> could be the problem ? Below is my config and status... >> >> voice:/etc/dahdi# dahdi_hardware -v >> pci:0000:02:08.0 wct4xxp+ d161:1220 Wildcard TE220 (5th Gen) >> >> >> voice:/etc/dahdi# dahdi_scan >> [1] >> active=yes >> alarms=YEL >> description=T2XXP (PCI) Card 0 Span 1 >> name=TE2/0/1 >> manufacturer=Digium >> devicetype=Wildcard TE220 (5th Gen) (VPMOCT064) >> location=Board ID Switch 0 >> basechan=1 >> totchans=31 >> irq=16 >> type=digital-E1 >> syncsrc=0 >> lbo=0 db (CSU)/0-133 feet (DSX-1) >> coding_opts=AMI,HDB3 >> framing_opts=CCS,CRC4 >> coding=HDB3 >> framing=CCS >> [2] >> <cut> ....</cut> >> >> voice:/etc/dahdi# cat system.conf >> # Span 1: TE2/0/1 "T2XXP (PCI) Card 0 Span 1" (MASTER) >> span=1,1,0,ccs,hdb3 >> bchan=1-15,17-31 >> dchan=16 >> echocanceller=mg2,1-15,17-31 >> >> # Span 2: TE2/0/2 "T2XXP (PCI) Card 0 Span 2" >> # span=2,0,0,ccs,hdb3,crc4,yellow >> span=2,0,0,ccs,hdb3 >> bchan=32-46,48-62 >> dchan=47 >> echocanceller=mg2,32-46,48-62 >> >> # Global data >> >> loadzone = uk >> defaultzone = uk >> >> >> >> >> >> ps1. I am using DAHDI drivers in version 2.4.0 >> >> ps2. in attachment screen from dahdi_tool >> >> Any help will do. >> >> Thanks, >> Alebert >> >> >> -- >> _____________________________________________________________________ >> -- 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 > > > > -- > _____________________________________________________________________ > -- 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