Re: [asterisk-users] Paging in waves.

2013-12-12 Thread John Kiniston
I wanted to follow up that I had solved my issue to my satisfaction and
share the dialplan that did so.

[sub-masspage]
exten = s,1,NoOP
same  =   n,Answer
same  =   n,Set(filename=PAGE)
same  =   n,Wait(1)
same  =   n,Record(pagequeue/${filename}%d.gsm,0,60,yk)
same  =
n,Set(DURATION=$[CEIL(${STAT(s,/var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)}
/ 1650)])
same  =   n,Playback(one-moment-please)
same  =   n,SIPAddHeader(Alert-Info: RingAnswer)
same  =   n,SipAddHeader(Call-Info: uri\;answer-after=0); Yealink
same  =   n,ExecIf($[${ISNULL(${ARG1})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG1}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG2})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG2}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG3})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG3}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG4})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG4}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG5})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG5}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG6})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG6}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG7})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG7}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG8})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG8}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG9})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG9}^${RECORDED_FILE})gm)))
same  =   n,ExecIf($[${ISNULL(${ARG10})}=0]?Dial(LOCAL/GO$[${DURATION}
+2]@sub-masspage,5,U(sub-pageit^${ARG10}^${RECORDED_FILE})gm)))
same  =   n,Playback(auth-thankyougoodbye)
same  =   n,TrySystem(rm -f /var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)
same  =   n,Hangup

exten = _GO[0-9][0-9],1,NoOP
same  = n,Answer
same  = n,Wait(${EXTEN:-2})
same  = n,Hangup

exten = _GO[0-9],1,NoOP
same  = n,Answer
same  = n,Wait(${EXTEN:-1})
same  = n,Hangup

[sub-pageit]
exten =  s,1,NoOP
same  =   n,Set(CALLERID(NAME)=PAGE)
same  =   n,Set(CALLERID(NUM)=PAGE)
same  =   n,Page(${ARG1},A(${ARG2})is),10)
same  =   n,Hangup

;end sub-masspage



On Thu, Dec 5, 2013 at 5:36 PM, John Kiniston johnkinis...@gmail.comwrote:

 I've been working on writing a subroutine to page groups of phones at once
 and I'm having some difficulty.

 My goal is to have a user call an extension, I record the page they wish
 to play, I then page out that recorded file to the phones in groups.



 [sub-masspage]
 exten = s,1,NoOP
 same  =   n,Answer
 same  =   n,Set(filename=$PAGE)
 same  =   n,Wait(1)
 same  =   n,Record(pagequeue/${filename}%d.gsm,0,30,yk)
 same  =
 n,Set(DURATION=$[CEIL(${STAT(s,/var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)}
 / 1650)])
 same  =   n,Playback(one-moment-please)
 same  =   n,Set(MUTEAUDIO(all)=on)
 same  =   n,SIPAddHeader(Alert-Info: RingAnswer)
 same  =   n,SipAddHeader(Call-Info: uri\;answer-after=0)
 ;same  =   n,Set(TIMEOUT(absolute)=${DURATION})
 same  =
 n,ExecIf($[${ISNULL(${ARG1})}=0]?Page(${ARG1},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG2})}=0]?Page(${ARG2},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG3})}=0]?Page(${ARG3},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG4})}=0]?Page(${ARG4},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG5})}=0]?Page(${ARG5},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG6})}=0]?Page(${ARG6},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG7})}=0]?Page(${ARG7},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG8})}=0]?Page(${ARG8},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG9})}=0]?Page(${ARG9},n(${RECORDED_FILE})is),10)
 same  =
 n,ExecIf($[${ISNULL(${ARG10})}=0]?Page(${ARG10},n(${RECORDED_FILE})is)10)
 same  =   n,Set(MUTEAUDIO(all)=off)
 same  =   n,Playback(goodbye)
 same  =   n,TrySystem(rm -f /var/lib/asterisk/sounds/${RECORDED_FILE}.gsm)
 same  =   n,Hangup
 ;end sub-masspage

 The issue I'm having is the Page command is putting the phone that's doing
 the paging into the meetme bridge it's creating and the dialplan stops at
 the first Page command.


 While I was testing it with a single phone I was using Dial instead of Page

 same  =
 n,ExecIf($[${ISNULL(${ARG1})}=0]?Dial(${ARG1},15,A(${RECORDED_FILE})S(${DURATION})mg)
 ))
 same  =
 n,ExecIf($[${ISNULL(${ARG2})}=0]?Dial(${ARG2},15,A(${RECORDED_FILE})S(${DURATION})mg)))

 Which worked great when I sent it one phone in each argument.. Didn't
 think about the fact that the first phone that answers is the only phone
 that answers till I got deeper into writing it... (It's been a long day)

 So I'm at a loss as what to 

Re: [asterisk-users] Ctrl-W killing entire line, not just last word

2013-12-12 Thread Dotan Cohen
On Wed, Dec 11, 2013 at 10:20 PM, Tzafrir Cohen
tzafrir.co...@xorcom.com wrote:
 You need libedit-dev, not libeditline-dev.


Thank you Tzafrir. However, even after installing libedit and
libedit-dev, Ctrl-W still kills (deletes) to the beginning of the
line.


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com

-- 
_
-- 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] IAX2 bridge failing

2013-12-12 Thread Michelle Dupuis
I am trying to connect an IAX ATA to an Asterisk 1.4.21.2 system.  The Asterisk 
system has been stable for years, and has no trouble bridge SIP phone sets to 
IAX trunks.

When I initiate a call from the IAX ATA, something goes wrong.One rare 
occasion it works fine, but usually there is no audio passed.  I have a snippet 
of the console below.  Notice no bridging message...not sure if that's a clue?  
The dialplan seems to execute properly, and I can watch the destination system 
which answers the call and starts playing media (monkeys) which I don't hear.

Any ideas on what is going on?  Since this is IAX in and IAX out, NAT should 
not be an issue (even through there is NAT on both sides).  Since media moves 
on the same UDP port as call setup, also proves should not be a network problem 
(I think)

Can someone point me to a solution?

Thanks!


(IP's and ISP and phone number disguised)

- Executing [s@macro-dialexternal:57] GotoIf(IAX2/S-14468, 1?dialnormal) in 
new stack
-- Goto (macro-dialexternal,s,60)
-- Executing [s@macro-dialexternal:60] Dial(IAX2/S-14468, 
IAX2/ISP123/1234567890|60|W) in new stack
-- Called ISP123/1234567890
-- Call accepted by 201.191.37.138 (format ulaw)
-- Format for call is ulaw
-- IAX2/ISP123-2261 answered IAX2/S-14468
-- Channel 'IAX2/S-14468' ready to transfer
-- Channel 'IAX2/ISP123-2261' ready to transfer
-- Hungup 'IAX2/ISP123-2261'
-- 
_
-- 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] Asterisk 12 with sipml5+ PJNATH issue

2013-12-12 Thread Prakash N
Hi,

  Can you please advice


With Regards

N.Prakash


On Wed, Dec 11, 2013 at 4:27 PM, Prakash N nprakash2...@gmail.com wrote:

 Hi ,

  We trying to work on Asterisk 12 with sipml5+ PJNATH ,We can able
 register but calling is not working  .The same configuration test with
 Xlite soft phone it working fine

 With Regards

 Prakash

-- 
_
-- 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] Multiple IAX2 Trunks Load balancing

2013-12-12 Thread Muhammad Usman
Hi - I have 2 Asterisk servers connected using 05 IAX2 trunks. I want to
load balance incoming calls over IAX2 trunks. If any trunk goes down the
calls traffic will be shared with other available trunks. When it gets Up
the script is supposed to perform as desired i.e in load balance mode.


Thanks in advance.
-- 
_
-- 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