Re: [asterisk-users] Call does not go to voicemail

2017-05-08 Thread thelma
Tim, 
I've tested similar dialplan on my home-server and it works perfectly.
(same setting, slightly different extensions) but same idea:

exten => 418,1,Dial(SIP/55,15,trw)
exten => 418,n,GotoIf($["${DIALSTATUS}"="BUSY"]?vmail:line2)
exten => 418,n(line2),Dial(SIP/218,15,rw)
exten => 418,n(vmail),Voicemail(55)
exten => 418,n,Voicemail(55)
exten => 418,n,Hangup()

I think the reason the below dialpolan IS NOT WORKING is that I'm connecting 
(dialing) remote asterisk extension.

not working calling remote asterisk--
exten => 4,1,Dial(${FD_L1},25,trw)
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?vmail:line2)
exten => 4,n(line2),Dial(${FD_L2},20,rw)
exten => 4,n(vmail),Voicemail(4)
exten => 4,n,Voicemail(4)
exten => 4,n,Hangup()
-end not working calling remote asterisk-

I have two Asterisk server connected/registered over IAX and that error: 
"...exited non-zero on..."

eg.
   -- SIP/54-0006 is ringing
  == Spawn extension (extensions, 4, 3) exited non-zero on 
'IAX2/home_server-424'

I'm not the only one with this problem, this guy has the same problem as me:

 http://lists.digium.com/pipermail/asterisk-users/2006-January/135612.html

--
Thelma

On 05/08/2017 06:58 PM, Tim S wrote:
> So, good, we're on the same page so far I think.
> 
> As I last stated, the original code suggestion would be what you want to
> do for the serial phone ring-down (hunt), now you just need to figure
> out why your Line_2 phone is answering and then hanging up immediately
> (or why Asterisk thinks it is).
> 
> I'd recommend sniffing the network traffic with Wire Shark and turning
> on some of the debug options in Asterisk to hunt down if it's the phone
> or an Asterisk quirk that is tripping up the system.  We'll need more
> debug and error text to go any further with the Line_2 problem, unless
> someone much better than me can chime in with an idea...  I presume
> you've already done the simple stuff like make sure your network is
> solid and that the phone firmware is up to date and stable.
> 
> I'll also take a moment as an aside to suggest that you move away from
> numerical device and user names for SIP and move to text based names
> which have local meaning.  The numerical names are easy to be hacked, as
> bad-guys scripts easily walk the possibilities sequentially.  I find it
> also helps to use extension names in the dial plan that have meaning so
> that I can keep track of them.  When a user calls an extension, the
> number they enter can feature a "Goto" with a text entry in the dial
> plan.  This makes it harder for those at a phone to go places in your
> phone system they shouldn't.
> 
> -Tim
> 
> On Mon, May 8, 2017 at 4:51 PM,  > wrote:
> 
> On 05/08/2017 04:37 PM, Tim S wrote:
> > The "error" I was talking about was in your log:
> >
> > "...== Spawn extension (extensions, 4, 3) exited non-zero on
> > 'IAX2/home_server-6364'..."
> >
> > The call terminated here in a error which prevented the dialplan from
> > continuing.  Something there is broken, my recommendation is to check
> > you registrations first inside asterisk:
> >
> >> sip show peers
> 
> "sip show peers" is showing FD_L2 (SIP/54 is registered)
> Name/username Host   
> Dyn Forcerport ComediaACL Port Status  Description
> 12(Unspecified)   
> D  No No 0Unmonitored
> 4/4   10.10.0.8   
> D  No No 5060 Unmonitored
> 54/54 10.10.0.15 
>  D  No No 5060 Unmonitored
> 
> > Something wasn't "happy" about SIP/54 in your system when Asterisk
> tried
> > talking to it.
> >
> > So you tried this:
> >
> > "...
> > Even when I put:
> > exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> > exten => 4,n(line2),Dial(${FD_L2},20,trw)
> > exten => 4,n(line2),Voicemail(4)
> > ..."
> >
> > What that will do is go to the first instance of "4,n(line2)",
> which is
> > the line that seems to be triggering the channel failure.  If you have
> > the Asterisk console open, I'll bet you see it spew some errors
> when you
> > try that extension routine.
> >
> > Asterisk dial plans are a serial processes, the first line that
> Asterisk
> > comes across that meets the matching for a given extension and
> label is
> > what it will run first.  What you have is two lines that will
> match both
> > extension and label - that's not really good form.
> >
> > My dial plan suggestion from last night would result in the
> functionality:
> >
> > Ring extension 4/Line_1, timeout 25 seconds --> if not busy then
> > voicemail, 

[asterisk-users] Cisco 7942G (SIP42.9-4-2) Failover Configuration [SEC=UNCLASSIFIED]

2017-05-08 Thread Calum Power
Hi all,

It's slightly OT, but hopefully someone can help. I'm struggling with getting 
Cisco IP Phone 7942G to fail over to our secondary Asterisk server in the event 
of a primary failure.

We recently bought a bunch of new Cisco 7942G phones, which now come with the 
requirement of FW > 9.3(1)SR1

Unfortunately this new firmware is the version that requires the use of the 
USECALLMANAGER tag in the line configuration in order to force 
the phone to use UDP instead of TCP.

I can provision the phone with one server working, however when I make that 
primary server "disappear" (unload module chan_sip.so), the phone doesn't 
failover to the secondary.
The old model phone (FW 8-5-4S) fails over to  fine when the 
 on the line config disappears - Within milliseconds.

I have tried configuring , as well as using a second  
entry in the  section, but to no avail. The phones simply go 
to the "reorder" tone when dialing.
Adding a second member to the callManagerGroup does engage a new entry in the 
"Unified CM Configuration" section of Device Configuration, however the second 
entry always stays as "Standby" and never actually becomes "Active" when the 
first entry fails.

Has anyone had any joy with configuring these later model 7942G's? (or 7965G's, 
as they suffer the same problem)
I have inserted a copy of my current config attempt below - Note that this 
config is dynamically parsed and [_PRIM_VOIP] and [_SEC_VOIP] are replaced at 
TFTP-serve-time with the actual IPs of the Asterisk servers.

Any help would be much appreciated.

Kind Regards,
Calum

--- CONFIG FOLLOWS ---

SIP
admin
123456

   
  D/M/Y
  [_NEWZONE]
  
 
[_NTP]
Unicast
 
  
   
   
  
 

   
  2000
  5060
  5061
   
   [_SEC_VOIP]

 
  
   


   
  [_PRIM_VOIP]
  5060
  
  
  
  5060
  true
   
   
  true
  x-cisco-serviceuri-cfwdall
  x-cisco-serviceuri-pickup
  x-cisco-serviceuri-opickup
  x-cisco-serviceuri-gpickup
  x-cisco-serviceuri-meetme
  x-cisco-serviceuri-abbrdial
  false
  2
  true
  true
  2
  2
  0
  true
   
   
  2
  6
  180
  3600
  5
  120
  120
  5
  500
  4000
  70
  false
  None
   
   1
   false
   true
   true
   false
   101
   3
   avt
   false
   false
   3
   [PHONELABEL]
   1
   false
   
10
   false
   
  
 9
 [LINE1_NAME]
 USECALLMANAGER
 5060
 [LINE1_AUTHNAME]
 [LINE1_NAME]
 
2
 
 3
 [LINE1_AUTHNAME]
 [LINE1_SECRET]
 true
 1
 [_MAIL]
 4
 5
 [LINE1_NAME]
 
true
false
false
true
 
  
  
 9
 [LINE2_NAME]
 USECALLMANAGER
 5060
 [LINE2_AUTHNAME]
 [LINE2_NAME]
 
2
 
 3
 [LINE2_AUTHNAME]
 [LINE2_SECRET]
 false
 1
 [_MAIL]
 4
 5
 [LINE2_NAME]
 
true
false
false
true
 
  
   
   5060
   16348
   20134
   184
   0
   dialplan.xml
   


   
   true
   2


   false
   false
   0
   1
   0
   0
   0
   0
   0
   1,7
   07:00
   12:00
   00:15
   1
   1
   1
   

1
http://[_PRIM_VOIP]/cgi-bin/auth
[DIRECTORY]


[SERVICES]

96
0
96
2
SIP42.9-4-2SR3-1S
1
0

   
  3804
   


false




___

Australian Antarctic Division - Commonwealth of Australia
IMPORTANT: This transmission is intended for the addressee only. If you are not 
the
intended recipient, you are notified that use or dissemination of this 
communication is
strictly prohibited by Commonwealth law. If you have received this transmission 
in error,
please notify the sender immediately by e-mail or by telephoning +61 3 6232 
3209 and
DELETE the message.
Visit our web site at http://www.antarctica.gov.au/
___
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Call does not go to voicemail

2017-05-08 Thread Tim S
So, good, we're on the same page so far I think.

As I last stated, the original code suggestion would be what you want to do
for the serial phone ring-down (hunt), now you just need to figure out why
your Line_2 phone is answering and then hanging up immediately (or why
Asterisk thinks it is).

I'd recommend sniffing the network traffic with Wire Shark and turning on
some of the debug options in Asterisk to hunt down if it's the phone or an
Asterisk quirk that is tripping up the system.  We'll need more debug and
error text to go any further with the Line_2 problem, unless someone much
better than me can chime in with an idea...  I presume you've already done
the simple stuff like make sure your network is solid and that the phone
firmware is up to date and stable.

I'll also take a moment as an aside to suggest that you move away from
numerical device and user names for SIP and move to text based names which
have local meaning.  The numerical names are easy to be hacked, as bad-guys
scripts easily walk the possibilities sequentially.  I find it also helps
to use extension names in the dial plan that have meaning so that I can
keep track of them.  When a user calls an extension, the number they enter
can feature a "Goto" with a text entry in the dial plan.  This makes it
harder for those at a phone to go places in your phone system they
shouldn't.

-Tim

On Mon, May 8, 2017 at 4:51 PM,  wrote:

> On 05/08/2017 04:37 PM, Tim S wrote:
> > The "error" I was talking about was in your log:
> >
> > "...== Spawn extension (extensions, 4, 3) exited non-zero on
> > 'IAX2/home_server-6364'..."
> >
> > The call terminated here in a error which prevented the dialplan from
> > continuing.  Something there is broken, my recommendation is to check
> > you registrations first inside asterisk:
> >
> >> sip show peers
>
> "sip show peers" is showing FD_L2 (SIP/54 is registered)
> Name/username HostDyn
> Forcerport ComediaACL Port Status  Description
> 12(Unspecified)D  No
>No 0Unmonitored
> 4/4   10.10.0.8D  No
>No 5060 Unmonitored
> 54/54 10.10.0.15   D  No
>No 5060 Unmonitored
>
> > Something wasn't "happy" about SIP/54 in your system when Asterisk tried
> > talking to it.
> >
> > So you tried this:
> >
> > "...
> > Even when I put:
> > exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> > exten => 4,n(line2),Dial(${FD_L2},20,trw)
> > exten => 4,n(line2),Voicemail(4)
> > ..."
> >
> > What that will do is go to the first instance of "4,n(line2)", which is
> > the line that seems to be triggering the channel failure.  If you have
> > the Asterisk console open, I'll bet you see it spew some errors when you
> > try that extension routine.
> >
> > Asterisk dial plans are a serial processes, the first line that Asterisk
> > comes across that meets the matching for a given extension and label is
> > what it will run first.  What you have is two lines that will match both
> > extension and label - that's not really good form.
> >
> > My dial plan suggestion from last night would result in the
> functionality:
> >
> > Ring extension 4/Line_1, timeout 25 seconds --> if not busy then
> > voicemail, else ring extension 4/Line_2, timeout 20 seconds -->
> voicemail.
> >
> >
> > Again, I think you have two problems, and the bigger one is causing the
> > annoying unexpected behavior in your dial plan
> >
> > Try doing the extension 4 without the Line_1 and see what happens:
> >
> > "...
> > exten => 4,1,Dial(${FD_L2},20,trw)
> > exten => 4,n(vmail),Voicemail(4)
> > exten => 4,n,Hangup()
> > ..."
>
> I have tired the above plan with small change 4,n,Voicemail(4) (as there
> is no gotoif statement)
> So:
> exten => 4,1,Dial(${FD_L2},20,trw)
> exten => 4,n,Voicemail(4)
> exten => 4,n,Hangup()
>
> Line 2 is ring OK, and if nobody pickup the phone it goes to
> "Voicemail(4)" so this part is working; there were no errors on the command
> line.
>
> [snip]
>
> But I've tired it again, this dialplan) as before and you are correct
> something is wrong but command line is not showing any errors:
>
> exten => 4,1,Dial(${FD_L1},25,trw)
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:)
> exten => 4,n(line2),Dial(${FD_L2},20,rw)
> exten => 4,n,Voicemail(4)
> exten => 4,n,Hangup()
>
> I've tried:
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:)
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?:line2)
>
> And I get:
>
>-- Called SIP/4
> -- SIP/4-0306 is ringing
> -- Nobody picked up in 25000 ms
> -- Executing [4@extensions:2] GotoIf("IAX2/home_server-435",
> "0?line2:") in new stack
> -- Executing [4@extensions:3] Dial("IAX2/home_server-435",
> 

Re: [asterisk-users] Call does not go to voicemail

2017-05-08 Thread thelma
On 05/08/2017 04:37 PM, Tim S wrote:
> The "error" I was talking about was in your log:
> 
> "...== Spawn extension (extensions, 4, 3) exited non-zero on
> 'IAX2/home_server-6364'..."
> 
> The call terminated here in a error which prevented the dialplan from
> continuing.  Something there is broken, my recommendation is to check
> you registrations first inside asterisk:
> 
>> sip show peers

"sip show peers" is showing FD_L2 (SIP/54 is registered)
Name/username HostDyn 
Forcerport ComediaACL Port Status  Description  
12(Unspecified)D  No
 No 0Unmonitored  
4/4   10.10.0.8D  No
 No 5060 Unmonitored  
54/54 10.10.0.15   D  No
 No 5060 Unmonitored

> Something wasn't "happy" about SIP/54 in your system when Asterisk tried
> talking to it.
> 
> So you tried this:
> 
> "...
> Even when I put:
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> exten => 4,n(line2),Dial(${FD_L2},20,trw)
> exten => 4,n(line2),Voicemail(4)
> ..."
> 
> What that will do is go to the first instance of "4,n(line2)", which is
> the line that seems to be triggering the channel failure.  If you have
> the Asterisk console open, I'll bet you see it spew some errors when you
> try that extension routine.
> 
> Asterisk dial plans are a serial processes, the first line that Asterisk
> comes across that meets the matching for a given extension and label is
> what it will run first.  What you have is two lines that will match both
> extension and label - that's not really good form.
> 
> My dial plan suggestion from last night would result in the functionality:
> 
> Ring extension 4/Line_1, timeout 25 seconds --> if not busy then
> voicemail, else ring extension 4/Line_2, timeout 20 seconds --> voicemail.
> 
> 
> Again, I think you have two problems, and the bigger one is causing the
> annoying unexpected behavior in your dial plan
> 
> Try doing the extension 4 without the Line_1 and see what happens:
> 
> "...
> exten => 4,1,Dial(${FD_L2},20,trw)
> exten => 4,n(vmail),Voicemail(4)
> exten => 4,n,Hangup()
> ..."

I have tired the above plan with small change 4,n,Voicemail(4) (as there is no 
gotoif statement)
So:
exten => 4,1,Dial(${FD_L2},20,trw)
exten => 4,n,Voicemail(4)
exten => 4,n,Hangup()

Line 2 is ring OK, and if nobody pickup the phone it goes to "Voicemail(4)" so 
this part is working; there were no errors on the command line.

[snip]

But I've tired it again, this dialplan) as before and you are correct something 
is wrong but command line is not showing any errors:

exten => 4,1,Dial(${FD_L1},25,trw)
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:)
exten => 4,n(line2),Dial(${FD_L2},20,rw)
exten => 4,n,Voicemail(4)
exten => 4,n,Hangup()

I've tried: 
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:)
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?:line2)

And I get:

   -- Called SIP/4
-- SIP/4-0306 is ringing
-- Nobody picked up in 25000 ms
-- Executing [4@extensions:2] GotoIf("IAX2/home_server-435", "0?line2:") in 
new stack
-- Executing [4@extensions:3] Dial("IAX2/home_server-435", "SIP/54,20,rw") 
in new stack
  == Using SIP RTP CoS mark 5
-- Called SIP/54
-- SIP/54-0307 is ringing
  == Spawn extension (extensions, 4, 3) exited non-zero on 
'IAX2/home_server-435'
-- Hungup 'IAX2/home_server-435'

So FD_L1 (exten: 4) is ringing for 25sec.; nobody pickup the phone and command 
line is showing it goes to: FD_L2 (SIP/54) 
-- SIP/54-0307 is ringing

but in reality FD_L2 (SIP/54) is not ringing at all, it should ring line_2 for 
20sec and go to Voicemail but as soon as it prints line:
-- SIP/54-0307 is ringing

it hangs up the phone.

--
Thelma

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Call does not go voicemail

2017-05-08 Thread Tim S
The "error" I was talking about was in your log:

"...== Spawn extension (extensions, 4, 3) exited non-zero on
'IAX2/home_server-6364'..."

The call terminated here in a error which prevented the dialplan from
continuing.  Something there is broken, my recommendation is to check you
registrations first inside asterisk:

> sip show peers

Something wasn't "happy" about SIP/54 in your system when Asterisk tried
talking to it.

So you tried this:

"...
Even when I put:
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
exten => 4,n(line2),Dial(${FD_L2},20,trw)
exten => 4,n(line2),Voicemail(4)
..."

What that will do is go to the first instance of "4,n(line2)", which is the
line that seems to be triggering the channel failure.  If you have the
Asterisk console open, I'll bet you see it spew some errors when you try
that extension routine.

Asterisk dial plans are a serial processes, the first line that Asterisk
comes across that meets the matching for a given extension and label is
what it will run first.  What you have is two lines that will match both
extension and label - that's not really good form.

My dial plan suggestion from last night would result in the functionality:

Ring extension 4/Line_1, timeout 25 seconds --> if not busy then voicemail,
else ring extension 4/Line_2, timeout 20 seconds --> voicemail.


Again, I think you have two problems, and the bigger one is causing the
annoying unexpected behavior in your dial plan

Try doing the extension 4 without the Line_1 and see what happens:

"...
exten => 4,1,Dial(${FD_L2},20,trw)
exten => 4,n(vmail),Voicemail(4)
exten => 4,n,Hangup()
..."

I'll bet Line_2 never rings (which is indicative of the problem).

-Tim

On Mon, May 8, 2017 at 8:21 AM,  wrote:

> Thank you for the input Tim.
> Yes, that worked.
>
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail)
> exten => 4,n(vmail),Voicemail(4)
>
> Though, I'm not sure why are you saying line 2 is FD_L2 needs to be fixed.
> Do I need to removde "t", the call can not be transferred?
>
> Even when I put:
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> exten => 4,n(line2),Dial(${FD_L2},20,trw)
> exten => 4,n(line2),Voicemail(4)
>
> The call (line2) would dial "FD_L2" but would not jump to next line
> "Voicemail"
>
>
> --
> Thelma
>
> On 05/08/2017 12:19 AM, Tim S wrote:
> > The way you have the GotoIf is making it so that no matter what the busy
> > condition of the line, it will execute the next line in the dial plan.
> > What you'd need is an "if" or "then" which goes to a tagged line in the
> > dial plan.  How it reads now is: "If [busy] then line2, else execute
> > next line".  Also you are saying "extension 4 is not busy", but
> > extension 4 is a dialplan extension - while physical extensions "FD_L1"
> > and "FD_L2"  appear to be the devices which are not busy, you need to be
> > clear and keep it straight in your head and text to get the best help...
> >
> > According to your log, nobody picked up after the 25 second timeout on
> > FD_L1, so the dial status would have been NOANSWER, which would result
> > in your gotoif test having a FALSE.  Since you didn't specify what the
> > gotoif should do if the busy test failed, it just executes the next line
> > which is to call the second line (FD_L2), which it does.  Then it looks
> > like you have an error with the second line which causes the call to
> > terminate, at which case it terminates the channel and never gets to
> > voicemail.
> >
> >
> > So it looks like two problems, 1) your FD_L2 physical extension is
> > buggy, and 2) you need to label the voicemail entry point and jump to it
> > if the FD_L1 was any other state but BUSY.
> >
> >
> > "...
> > exten => 4,1,Dial(${FD_L1},25,trw)
> > exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail)
> > exten => 4,n(line2),Dial(${FD_L2},20,trw); <--- fix me!!
> > exten => 4,n(vmail),Voicemail(4)
> > exten => 4,n,Hangup()
> > ..."
> >
> >
> > -Tim
> >
> >
> > On Sun, May 7, 2017 at 9:21 PM,  > > wrote:
> >
> > Call is not forwarded to voicemail in below dial plan, why?
> >
> > exten => 4,1,Dial(${FD_L1},25,trw)
> > exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> > exten => 4,n(line2),Dial(${FD_L2},20,trw)
> > exten => 4,n,Voicemail(4)
> > exten => 4,n,Hangup()
> >
> > -- Called SIP/4
> > -- SIP/4-0288 is ringing
> > -- Nobody picked up in 25000 ms
> > -- Executing [4@extensions:2] GotoIf("IAX2/home_server-6364",
> > "0?line2") in new stack
> > -- Executing [4@extensions:3] Dial("IAX2/home_server-6364",
> > "SIP/54,20,trw") in new stack
> >   == Using SIP RTP CoS mark 5
> > -- Called SIP/54
> > -- SIP/54-0289 is ringing
> >   == Spawn extension (extensions, 4, 3) exited non-zero on
> > 'IAX2/home_server-6364'
> > -- Hungup 'IAX2/home_server-6364'
> >
> > Extension 4 is not BUSY 

Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread Daniel Journo
> Hello

> I have the following scenario:

> [mynicecontext]
> exten => 2000,1,Dial(SIP/deviceA/deviceB/deviceC)

> As expected, by dialing 2000, all three devices will ring. And that's fine.
> However, there are situations where I only want "deviceA" and "deviceB"
to ring. I would like to have an extension to dial in order to modify the 
dialplan.

> Is there a better solution?

Take a look at https://wiki.asterisk.org/wiki/display/AST/Device+State
Specifically, Custom Device states.

You write both versions of the dialplan, and use an IF on the custom device 
state to determine which one runs.
You can then dial 4000 to turn the Custom Device from Busy to Available to set 
which section of the dialplan to run.
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] SwitchVox and Asterisk

2017-05-08 Thread Luca Pradovera
Hello,
sorry for not being clear, the application part of this (the voice
directory) is already built, mostly working and I have no problem with
that. It is based on LumenVox if anyone would like to know, with just a
plain XML grammar.

I do need to get SwitchVox to send a call to Asterisk/FreePBX, which will
in turn call one of SW's extensions.

Thanks!
Luca

On Mon, May 8, 2017 at 9:00 AM, Antony Stone <
antony.st...@asterisk.open.source.it> wrote:

> On Monday 08 May 2017 at 16:43:24, Luca Pradovera wrote:
>
> > Hello,
> > I need to have an extension on a SwitchVox server dial out to one on an
> > Asterisk (FreePBX actually) box which will host a voice directory.
>
> What's a voice directory?
>
> > The Asterisk server will then need to dial one of the SwitchVox
> extensions
> > if it gets a voice match.
>
> You mean, listen to the caller speaking and identify who they are?
>
> Sounds "non-trivial" to me...
>
> > Anyone has done that, and could let me know how? So far it looks like IAX
> > peering (what SW calls "SwitchVox peering") could work?
>
> IAX will connect two Asterisk servers and allow them to communicate (it
> stands
> for Inter Asterisk eXchange) - think of it in the same way as a SIP trunk -
> you can have multiple calls to/from multiple numbers going over the link.
>
> However, are you saying that you've already got the "voice directory" and
> "voice match" parts working in Asterisk, and you just need to know how to
> dial
> between that and SwitchVox?
>
> Or is the "voice" part of the challenge also something you're looking for
> help
> with?
>
>
> Antony.
>
> --
> Numerous psychological studies over the years have demonstrated that the
> majority of people genuinely believe they are not like the majority of
> people.
>
>Please reply to the
> list;
>  please *don't* CC
> me.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] SwitchVox and Asterisk

2017-05-08 Thread Antony Stone
On Monday 08 May 2017 at 16:43:24, Luca Pradovera wrote:

> Hello,
> I need to have an extension on a SwitchVox server dial out to one on an
> Asterisk (FreePBX actually) box which will host a voice directory.

What's a voice directory?

> The Asterisk server will then need to dial one of the SwitchVox extensions
> if it gets a voice match.

You mean, listen to the caller speaking and identify who they are?

Sounds "non-trivial" to me...

> Anyone has done that, and could let me know how? So far it looks like IAX
> peering (what SW calls "SwitchVox peering") could work?

IAX will connect two Asterisk servers and allow them to communicate (it stands 
for Inter Asterisk eXchange) - think of it in the same way as a SIP trunk - 
you can have multiple calls to/from multiple numbers going over the link.

However, are you saying that you've already got the "voice directory" and 
"voice match" parts working in Asterisk, and you just need to know how to dial 
between that and SwitchVox?

Or is the "voice" part of the challenge also something you're looking for help 
with?


Antony.

-- 
Numerous psychological studies over the years have demonstrated that the 
majority of people genuinely believe they are not like the majority of people.

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] SwitchVox and Asterisk

2017-05-08 Thread Luca Pradovera
Hello,
I need to have an extension on a SwitchVox server dial out to one on an
Asterisk (FreePBX actually) box which will host a voice directory. The
Asterisk server will then need to dial one of the SwitchVox extensions if
it gets a voice match.

Anyone has done that, and could let me know how? So far it looks like IAX
peering (what SW calls "SwitchVox peering") could work?

Thanks in advance,

Luca
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

[asterisk-users] Some questions regarding jitterbuffer in asterisk / pjsip

2017-05-08 Thread Michael Maier
Hello!

I just implemented a jitterbuffer for pjsip in the dialplan in a SBC:

[fromtrunk]
exten => _[+0-9]!,1,Set(JITTERBUFFER(fixed)=default)


This jitterbuffer catches all calls coming from ISP.

My understanding is, that the incoming rtp stream in leg1a is now
buffered and handed out "jitter-optimized" to leg2a on the other site
(this could be internal or external again).

---> leg1a  leg2a >
ISP SBC callee
<--- leg1b  leg2b <


My question: What's about the rtp stream which is received by leg1b from
callee? Is there a receive buffer on the leg1b-site, too? Or is it
expected to be done by leg2b before handing it out to leg1b?

Iow: is it enough to implement one jitterbuffer? Or should there be a
second jitterbuffer on the side of leg2?



Thanks for clarification!
Regards,
Michael

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread Marcelo Terres
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_DialplanExtensionRemove
Marcelo H. Terres 
IM: mhter...@jabber.mundoopensource.com.br
https://www.mundoopensource.com.br
https://twitter.com/mhterres
https://linkedin.com/in/marceloterres


On 8 May 2017 at 16:13, Antony Stone
 wrote:
> On Monday 08 May 2017 at 15:44:47, Marcelo Terres wrote:
>
>> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_Dialpl
>> anExtensionAdd
>>
>> Is it enough?
>
> Is there a similar call to delete an extension, or to modify an existing one?
>
> On the basis that the OP already has extension 2000 defined, he would need to
> delete this and replace it with a new definition, or alter the current
> definition, to get the required results.
>
> Simply being able to add a new extension to an existing dialplan isn't quite
> enough.
>
>
> Antony.
>
>> On 8 May 2017 at 15:35, Frank Vanoni  wrote:
>> > Hello
>> >
>> > I have the following scenario:
>> >
>> > [mynicecontext]
>> > exten => 2000,1,Dial(SIP/deviceA/deviceB/deviceC)
>> >
>> > As expected, by dialing 2000, all three devices will ring. And that's
>> > fine.
>> > However, there are situations where I only want "deviceA" and "deviceB"
>> > to ring. I would like to have an extension to dial in order to modify
>> > the dialplan.
>> >
>> > Here is what I did...
>> >
>> > In extensions.conf:
>> >
>> > -- snip -
>> > [mynicecontext]
>> > #include "ringdevice.conf
>> >
>> > exten => 2000,1,GoTo(ringdevice,ring,1)
>> >
>> > exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
>> >
>> >> /etc/asterisk/ringdevice.conf)
>> >
>> > exten => 4000,2,Wait(3)
>> > exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
>> > exten => 4000,4,Playback(service)
>> >
>> > exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
>> >
>> >> /etc/asterisk/ringdevice.conf)
>> >
>> > exten => 4001,2,Wait(3)
>> > exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
>> > exten => 4001,4,Playback(service)
>> > -- end snip -
>> >
>> > twodevices.txt contains
>> > exten => ring,1,Dial(SIP/deviceA)
>> >
>> > alldevices.txt contains
>> > exten => ring,1,Dial(SIP/deviceA/deviceC)
>> >
>> > By dialing 4000 or 4001, the dialplan is modified and reloaded
>> > accordingly.
>> >
>> > Is there a better solution?
>> >
>> > Frank
>
> --
> 3 logicians walk into a bar. The bartender asks "Do you all want a drink?"
> The first logician says "I don't know."
> The second logician says "I don't know."
> The third logician says "Yes!"
>
>Please reply to the list;
>  please *don't* CC me.
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Call does not go voicemail

2017-05-08 Thread thelma
Thank you for the input Tim.
Yes, that worked.

exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail)
exten => 4,n(vmail),Voicemail(4)

Though, I'm not sure why are you saying line 2 is FD_L2 needs to be fixed.
Do I need to removde "t", the call can not be transferred?

Even when I put:
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
exten => 4,n(line2),Dial(${FD_L2},20,trw)
exten => 4,n(line2),Voicemail(4)

The call (line2) would dial "FD_L2" but would not jump to next line
"Voicemail"


--
Thelma

On 05/08/2017 12:19 AM, Tim S wrote:
> The way you have the GotoIf is making it so that no matter what the busy
> condition of the line, it will execute the next line in the dial plan. 
> What you'd need is an "if" or "then" which goes to a tagged line in the
> dial plan.  How it reads now is: "If [busy] then line2, else execute
> next line".  Also you are saying "extension 4 is not busy", but
> extension 4 is a dialplan extension - while physical extensions "FD_L1"
> and "FD_L2"  appear to be the devices which are not busy, you need to be
> clear and keep it straight in your head and text to get the best help...
> 
> According to your log, nobody picked up after the 25 second timeout on
> FD_L1, so the dial status would have been NOANSWER, which would result
> in your gotoif test having a FALSE.  Since you didn't specify what the
> gotoif should do if the busy test failed, it just executes the next line
> which is to call the second line (FD_L2), which it does.  Then it looks
> like you have an error with the second line which causes the call to
> terminate, at which case it terminates the channel and never gets to
> voicemail.
> 
> 
> So it looks like two problems, 1) your FD_L2 physical extension is
> buggy, and 2) you need to label the voicemail entry point and jump to it
> if the FD_L1 was any other state but BUSY.
> 
> 
> "...
> exten => 4,1,Dial(${FD_L1},25,trw)
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail)
> exten => 4,n(line2),Dial(${FD_L2},20,trw); <--- fix me!!
> exten => 4,n(vmail),Voicemail(4)
> exten => 4,n,Hangup()
> ..."
> 
> 
> -Tim
> 
> 
> On Sun, May 7, 2017 at 9:21 PM,  > wrote:
> 
> Call is not forwarded to voicemail in below dial plan, why?
> 
> exten => 4,1,Dial(${FD_L1},25,trw)
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> exten => 4,n(line2),Dial(${FD_L2},20,trw)
> exten => 4,n,Voicemail(4)
> exten => 4,n,Hangup()
> 
> -- Called SIP/4
> -- SIP/4-0288 is ringing
> -- Nobody picked up in 25000 ms
> -- Executing [4@extensions:2] GotoIf("IAX2/home_server-6364",
> "0?line2") in new stack
> -- Executing [4@extensions:3] Dial("IAX2/home_server-6364",
> "SIP/54,20,trw") in new stack
>   == Using SIP RTP CoS mark 5
> -- Called SIP/54
> -- SIP/54-0289 is ringing
>   == Spawn extension (extensions, 4, 3) exited non-zero on
> 'IAX2/home_server-6364'
> -- Hungup 'IAX2/home_server-6364'
> 
> Extension 4 is not BUSY (just nobody pickup the call) so why isn't
> call going to "Voicemail" it shouldn't ring FD_L2 (SIP/54)
> Why isn't it going to "Voicemail"?
> 
> --
> Thelma
> 

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread Antony Stone
On Monday 08 May 2017 at 15:44:47, Marcelo Terres wrote:

> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_Dialpl
> anExtensionAdd
> 
> Is it enough?

Is there a similar call to delete an extension, or to modify an existing one?

On the basis that the OP already has extension 2000 defined, he would need to 
delete this and replace it with a new definition, or alter the current 
definition, to get the required results.

Simply being able to add a new extension to an existing dialplan isn't quite 
enough.


Antony.

> On 8 May 2017 at 15:35, Frank Vanoni  wrote:
> > Hello
> > 
> > I have the following scenario:
> > 
> > [mynicecontext]
> > exten => 2000,1,Dial(SIP/deviceA/deviceB/deviceC)
> > 
> > As expected, by dialing 2000, all three devices will ring. And that's
> > fine.
> > However, there are situations where I only want "deviceA" and "deviceB"
> > to ring. I would like to have an extension to dial in order to modify
> > the dialplan.
> > 
> > Here is what I did...
> > 
> > In extensions.conf:
> > 
> > -- snip -
> > [mynicecontext]
> > #include "ringdevice.conf
> > 
> > exten => 2000,1,GoTo(ringdevice,ring,1)
> > 
> > exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
> > 
> >> /etc/asterisk/ringdevice.conf)
> > 
> > exten => 4000,2,Wait(3)
> > exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> > exten => 4000,4,Playback(service)
> > 
> > exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
> > 
> >> /etc/asterisk/ringdevice.conf)
> > 
> > exten => 4001,2,Wait(3)
> > exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> > exten => 4001,4,Playback(service)
> > -- end snip -
> > 
> > twodevices.txt contains
> > exten => ring,1,Dial(SIP/deviceA)
> > 
> > alldevices.txt contains
> > exten => ring,1,Dial(SIP/deviceA/deviceC)
> > 
> > By dialing 4000 or 4001, the dialplan is modified and reloaded
> > accordingly.
> > 
> > Is there a better solution?
> > 
> > Frank

-- 
3 logicians walk into a bar. The bartender asks "Do you all want a drink?"
The first logician says "I don't know."
The second logician says "I don't know."
The third logician says "Yes!"

   Please reply to the list;
 please *don't* CC me.

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread John Kiniston
You could use the DIALGROUP function for this and not need to shell out.

https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_DIALGROUP

On Mon, May 8, 2017 at 7:35 AM, Frank Vanoni 
wrote:

> Hello
>
> I have the following scenario:
>
> [mynicecontext]
> exten => 2000,1,Dial(SIP/deviceA/deviceB/deviceC)
>
> As expected, by dialing 2000, all three devices will ring. And that's
> fine.
> However, there are situations where I only want "deviceA" and "deviceB"
> to ring. I would like to have an extension to dial in order to modify
> the dialplan.
>
> Here is what I did...
>
> In extensions.conf:
>
> -- snip -
> [mynicecontext]
> #include "ringdevice.conf
>
> exten => 2000,1,GoTo(ringdevice,ring,1)
>
> exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
> > /etc/asterisk/ringdevice.conf)
> exten => 4000,2,Wait(3)
> exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4000,4,Playback(service)
>
> exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
> > /etc/asterisk/ringdevice.conf)
> exten => 4001,2,Wait(3)
> exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4001,4,Playback(service)
> -- end snip -
>
> twodevices.txt contains
> exten => ring,1,Dial(SIP/deviceA)
>
> alldevices.txt contains
> exten => ring,1,Dial(SIP/deviceA/deviceC)
>
> By dialing 4000 or 4001, the dialplan is modified and reloaded
> accordingly.
>
> Is there a better solution?
>
> Frank
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>http://lists.digium.com/mailman/listinfo/asterisk-users
>



-- 
A human being should be able to change a diaper, plan an invasion, butcher
a hog, conn a ship, design a building, write a sonnet, balance accounts,
build a wall, set a bone, comfort the dying, take orders, give orders,
cooperate, act alone, solve equations, analyze a new problem, pitch manure,
program a computer, cook a tasty meal, fight efficiently, die gallantly.
Specialization is for insects.
---Heinlein
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users

Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread J Montoya or A J Stiles
On Monday 08 May 2017, Frank Vanoni wrote:
> By dialing 4000 or 4001, the dialplan is modified and reloaded
> accordingly.
> 
> Is there a better solution?

That's an .  interesting . way of doing things!

We would be thinking in terms of using a GLOBAL variable, or an ASTDB entry, 
to indicate whether or not the extra extension should be dialled.  This method 
ought to be extendable to serve multiple extensions, without the need to 
assemble the file from tiny snippets .


-- 
JM or 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread Marcelo Terres
https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+ManagerAction_DialplanExtensionAdd

Is it enough?

Regards,
Marcelo H. Terres 
IM: mhter...@jabber.mundoopensource.com.br
https://www.mundoopensource.com.br
https://twitter.com/mhterres
https://linkedin.com/in/marceloterres


On 8 May 2017 at 15:35, Frank Vanoni  wrote:
> Hello
>
> I have the following scenario:
>
> [mynicecontext]
> exten => 2000,1,Dial(SIP/deviceA/deviceB/deviceC)
>
> As expected, by dialing 2000, all three devices will ring. And that's
> fine.
> However, there are situations where I only want "deviceA" and "deviceB"
> to ring. I would like to have an extension to dial in order to modify
> the dialplan.
>
> Here is what I did...
>
> In extensions.conf:
>
> -- snip -
> [mynicecontext]
> #include "ringdevice.conf
>
> exten => 2000,1,GoTo(ringdevice,ring,1)
>
> exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
>> /etc/asterisk/ringdevice.conf)
> exten => 4000,2,Wait(3)
> exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4000,4,Playback(service)
>
> exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
>> /etc/asterisk/ringdevice.conf)
> exten => 4001,2,Wait(3)
> exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
> exten => 4001,4,Playback(service)
> -- end snip -
>
> twodevices.txt contains
> exten => ring,1,Dial(SIP/deviceA)
>
> alldevices.txt contains
> exten => ring,1,Dial(SIP/deviceA/deviceC)
>
> By dialing 4000 or 4001, the dialplan is modified and reloaded
> accordingly.
>
> Is there a better solution?
>
> Frank
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


[asterisk-users] Dial an extension to modify dialplan

2017-05-08 Thread Frank Vanoni
Hello

I have the following scenario:

[mynicecontext]
exten => 2000,1,Dial(SIP/deviceA/deviceB/deviceC)

As expected, by dialing 2000, all three devices will ring. And that's
fine.
However, there are situations where I only want "deviceA" and "deviceB"
to ring. I would like to have an extension to dial in order to modify
the dialplan.

Here is what I did...

In extensions.conf:

-- snip -
[mynicecontext]
#include "ringdevice.conf

exten => 2000,1,GoTo(ringdevice,ring,1)

exten => 4000,1,System(/bin/cat /etc/asterisk/twodevices.txt
> /etc/asterisk/ringdevice.conf)
exten => 4000,2,Wait(3)
exten => 4000,3,System(/usr/sbin/asterisk -rx "dialplan reload")
exten => 4000,4,Playback(service)

exten => 4001,1,System(/bin/cat /etc/asterisk/alldevices.txt
> /etc/asterisk/ringdevice.conf)
exten => 4001,2,Wait(3)
exten => 4001,3,System(/usr/sbin/asterisk -rx "dialplan reload")
exten => 4001,4,Playback(service)
-- end snip -

twodevices.txt contains 
exten => ring,1,Dial(SIP/deviceA)

alldevices.txt contains 
exten => ring,1,Dial(SIP/deviceA/deviceC)

By dialing 4000 or 4001, the dialplan is modified and reloaded
accordingly.

Is there a better solution? 

Frank


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] Call does not go voicemail

2017-05-08 Thread Tim S
The way you have the GotoIf is making it so that no matter what the busy
condition of the line, it will execute the next line in the dial plan.
What you'd need is an "if" or "then" which goes to a tagged line in the
dial plan.  How it reads now is: "If [busy] then line2, else execute next
line".  Also you are saying "extension 4 is not busy", but extension 4 is a
dialplan extension - while physical extensions "FD_L1" and "FD_L2"  appear
to be the devices which are not busy, you need to be clear and keep it
straight in your head and text to get the best help...

According to your log, nobody picked up after the 25 second timeout on
FD_L1, so the dial status would have been NOANSWER, which would result in
your gotoif test having a FALSE.  Since you didn't specify what the gotoif
should do if the busy test failed, it just executes the next line which is
to call the second line (FD_L2), which it does.  Then it looks like you
have an error with the second line which causes the call to terminate, at
which case it terminates the channel and never gets to voicemail.


So it looks like two problems, 1) your FD_L2 physical extension is buggy,
and 2) you need to label the voicemail entry point and jump to it if the
FD_L1 was any other state but BUSY.


"...
exten => 4,1,Dial(${FD_L1},25,trw)
exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2:vmail)
exten => 4,n(line2),Dial(${FD_L2},20,trw); <--- fix me!!
exten => 4,n(vmail),Voicemail(4)
exten => 4,n,Hangup()
..."


-Tim


On Sun, May 7, 2017 at 9:21 PM,  wrote:

> Call is not forwarded to voicemail in below dial plan, why?
>
> exten => 4,1,Dial(${FD_L1},25,trw)
> exten => 4,n,GotoIf($["${DIALSTATUS}"="BUSY"]?line2)
> exten => 4,n(line2),Dial(${FD_L2},20,trw)
> exten => 4,n,Voicemail(4)
> exten => 4,n,Hangup()
>
> -- Called SIP/4
> -- SIP/4-0288 is ringing
> -- Nobody picked up in 25000 ms
> -- Executing [4@extensions:2] GotoIf("IAX2/home_server-6364",
> "0?line2") in new stack
> -- Executing [4@extensions:3] Dial("IAX2/home_server-6364",
> "SIP/54,20,trw") in new stack
>   == Using SIP RTP CoS mark 5
> -- Called SIP/54
> -- SIP/54-0289 is ringing
>   == Spawn extension (extensions, 4, 3) exited non-zero on
> 'IAX2/home_server-6364'
> -- Hungup 'IAX2/home_server-6364'
>
> Extension 4 is not BUSY (just nobody pickup the call) so why isn't call
> going to "Voicemail" it shouldn't ring FD_L2 (SIP/54)
> Why isn't it going to "Voicemail"?
>
> --
> Thelma
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Check out the new Asterisk community forum at: https://community.asterisk.
> org/
>
> New to Asterisk? Start here:
>   https://wiki.asterisk.org/wiki/display/AST/Getting+Started
>
> 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 --

Check out the new Asterisk community forum at: https://community.asterisk.org/

New to Asterisk? Start here:
  https://wiki.asterisk.org/wiki/display/AST/Getting+Started

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users