Re: [asterisk-users] Substitute Macro() for Gosub in dialplan

2021-11-20 Thread Richard Reina
Thank you Thank you Thank you! I changed it to: exten =>
s/555333,1,Gosub(subBusy,s,1()) and it now works like a charm. Really
appreciate the help!


El sáb, 20 nov 2021 a las 10:55,  escribió:

> On 11/20/2021 11:51 AM, Richard Reina wrote:
> > Since Macro is deprecated I am trying to eliminate it from my diaplan. I
> > believe I have successfully done so in the example below.
> >
> > ; dial an internal extension
> > exten => 101,1  Macro(ext,100,Dahdi/15)
> >
> > TO:
> >
> > exten => 101,1,Dial(Dahdi/15,30)
> >
> > So far it seems to work. However I also in my dialplan have call routing
> > examples that use macro that I am not able to figure out.
> >
> > exten => s/555333,1,Macro(busy);
> >
> > TO:
> >
> > exten => s/555333,1,Gosub(subBusy,start,1());
> >
> > [subBusy]
> > exten => s,1,Answer
> > exten => s,2,Wait(1)
> > exten => s,3,Playtones(480+620/500,0/500)
> > exten => s,4,Wait(12)
> > exten => s,5,Hangup
> >
> > However, after reloading the diaplan and calling from the specified
> number
> > I get the error:
> >
> > Gosub attempted to reach non-existent destination 'subBusy
> You are trying to gosub to the extension subBusy,start,1. But you have
> only defined subBusy,s,1.
> "s" has no special meaning in a subroutine as it did with Macro. Either
> change start to s or s to start.
>
-- 
_
-- 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] Substitute Macro() for Gosub in dialplan

2021-11-20 Thread Richard Reina
Since Macro is deprecated I am trying to eliminate it from my diaplan. I
believe I have successfully done so in the example below.

; dial an internal extension
exten => 101,1  Macro(ext,100,Dahdi/15)

TO:

exten => 101,1,Dial(Dahdi/15,30)

So far it seems to work. However I also in my dialplan have call routing
examples that use macro that I am not able to figure out.

exten => s/555333,1,Macro(busy);

TO:

exten => s/555333,1,Gosub(subBusy,start,1());

[subBusy]
exten => s,1,Answer
exten => s,2,Wait(1)
exten => s,3,Playtones(480+620/500,0/500)
exten => s,4,Wait(12)
exten => s,5,Hangup

However, after reloading the diaplan and calling from the specified number
I get the error:

Gosub attempted to reach non-existent destination 'subBusy
-- 
_
-- 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] CURLOPT(useragent) fails with Set requires an '=' to be a valid assignment

2020-12-14 Thread Richard Mudgett
There are semicolons in the useragent string you are trying to set.  If
that is the exact dialplan line then
those semicolons are being seen as a start of a comment.

Richard

On Mon, Dec 14, 2020 at 12:25 PM Jonathan H  wrote:

> All my other CURLOPT settings like timeout work fine. But this:
>
> same  => n,Set(CURLOPT(useragent)="Mozilla/5.0 (Windows NT 10.0;
> Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.41
> Safari/537.36")
>
> give the following warning on dialplan reload, with and without quotes
> around the user agent. Everything else is fine - perhaps it is the
> parenthesis in the user agent?
> If so, how do I get round this? I am fairly sure it's a typo at my
> end, but I've looked at examples from other people/gists and my usage
> looks correct.
> It's only the useragent option it chokes on.
>
> -- Executing [s@setup:3] Set("Local/s@setup-0006;2",
> "CURLOPT(useragent") in new stack
> [Dec 14 17:24:30] WARNING[10243][C-0007]: pbx_variables.c:1140
> pbx_builtin_setvar: Set requires an '=' to be a valid assignment.
> -- Executing [s@setup:4] Set("Local/s@setup-0006;2",
> "CURLOPT(conntimeout)=3") in new stack
> -- Executing [s@setup:5] Set("Local/s@setup-0006;2",
> "CURLOPT(dnstimeout)=3") in new stack
>
>
> NOTE: The reason I'm doing this is because I want Asterisk to give a
> different user agent for ControlPlayback function and move on quickly
> if the remote file is not available / slow.
> If that is not the correct way then please let me know!
>
> --
> _
> -- 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] Digium TE134 compatibility issues with new Dell server - Zero interrupts

2020-10-22 Thread Richard Reina
I am getting zero interrupts for a new Digium TE134 Card on a new brand new
Dell T40 server with the latest BIOS. Is there something that I am missing
or is the card not compatible with Dell servers?

(cat /proc/interrupts ; sleep 1 ; cat /proc/interrupts) | grep -i wcte13xp0
  16:  0  0  0  0  IR-IO-APIC   16-fasteoi
  i801_smbus, wcte13xp0
  16:  0  0  0  0  IR-IO-APIC   16-fasteoi
  i801_smbus, wcte13xp0

lsmod | grep wcte13xp
wcte13xp   61440  24
oct612x   184320  1 wcte13xp
dahdi 241664  74 oct612x,wcte13xp


lspci -vv

03:00.0 Network controller: Digium, Inc. Wildcard TE134 single-span
T1/E1/J1 card (rev 02)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx-
Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- SERR- -- 
_
-- 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] Fwd: call-id on cdr's

2020-10-14 Thread Richard Mudgett
On Wed, Oct 14, 2020 at 5:09 AM Rui Mota  wrote:

> Hi.
> I'd like to get the call-id from a call (the *C-061c* part) to set in
> on a field on cdr's, like
>
> [Oct  8 16:09:37] VERBOSE[25701][*C-061c*] app_queue.c:
> SIP/12234-6b18 is busy
> [Oct  8 16:09:37] VERBOSE[25701][*C-061c*] app_queue.c: Nobody picked
> up in 0 ms
> [Oct  8 16:09:38] VERBOSE[25843][*C-0622*] netsock2.c: Using SIP RTP
> CoS mark 5
>
> ...
> same => n,Set(CDR(custom_callid)=*${CALL-ID}*)
>
> Is there any variable/way to get that value to use it in the dialplan?
>
> Thank you in advance
>

The function CHANNEL(callid) returns exactly what you want.
See https://wiki.asterisk.org/wiki/display/AST/Asterisk+16+Function_CHANNEL

Richard
-- 
_
-- 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] I can do alaw, ulaw and gsm; remote can do g729 and alaw; asterisk wants to translate g729 -> alaw. WHY?

2020-05-14 Thread Richard Mudgett
Argh.  That was for chan_pjsip and you are using chan_sip.  Be aware that
chan_sip is effectively dead.

Richard

On Thu, May 14, 2020 at 9:50 AM Richard Mudgett  wrote:

> The other end is sending g729 even though it was not negotiated.  The
> other end should not do this and it usually seems that the other ends that
> do send g729.
> This was recently fixed.  See
> https://issues.asterisk.org/jira/browse/ASTERISK-28139
>
> Richard
>
> On Thu, May 14, 2020 at 1:11 AM John Hughes  wrote:
>
>> I am having a problem with one of my callers who is using either g729 or
>> alaw.  I can do alaw but not g729 so asterisk should negotiate alaw right?
>> In fact from the sip debug it looks like it does, but then I get the
>> dreaded "channel.c:5630 set_format: Unable to find a codec translation
>> path: (g729) -> (alaw)" and the call hangs up.  Why?
>>
>> Last minute thought: Is it possible that the caller is sending g729 in
>> RTP even though the SIP negotiation clearly chooses alaw?  Maybe I need
>> some RTP debugging.
>>
>> Asterisk 13.14.1 on Debian, using chan_sip.
>>
>> Here's the trace:
>>
>> <--- SIP read from UDP:SUPPLIER:5060 --->
>> INVITE sip:LOCAL@ASTERISK:5060 SIP/2.0
>> Via: SIP/2.0/UDP SUPPLIER:5060;branch=z9hG4bK02B5ab9c8e55f864da9
>> From: ;tag=gK02498cb1
>> To: 
>> Call-ID: 205665777_90679951@SUPPLIER
>> CSeq: 539098 INVITE
>> Max-Forwards: 70
>> Allow: 
>> INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH
>> Accept: application/sdp, application/isup, application/dtmf, 
>> application/dtmf-relay, multipart/mixed
>> Contact: 
>> P-Asserted-Identity: 
>> Supported: timer,100rel,precondition
>> Session-Expires: 1800
>> Min-SE: 90
>> Content-Length: 282
>> Content-Disposition: session; handling=required
>> Content-Type: application/sdp
>>
>> v=0
>> o=Sonus_UAC 176880 320591 IN IP4 SUPPLIER
>> s=SIP Media Capabilities
>> c=IN IP4 213.41.124.6
>> t=0 0
>> m=audio 8526 RTP/AVP 18 8 101
>> a=rtpmap:18 G729/8000
>> a=fmtp:18 annexb=no
>> a=rtpmap:8 PCMA/8000
>> a=rtpmap:101 telephone-event/8000
>> a=fmtp:101 0-15
>> a=sendrecv
>> a=ptime:20
>> <->
>> --- (17 headers 13 lines) ---
>> Sending to SUPPLIER:5060 (no NAT)
>> Sending to SUPPLIER:5060 (no NAT)
>> Using INVITE request as basis request - 205665777_90679951@SUPPLIER
>> Found peer 'supplier' for 'REMOTE' from SUPPLIER:5060
>> Found RTP audio format 18
>> Found RTP audio format 8
>> Found RTP audio format 101
>> Found audio description format G729 for ID 18
>> Found audio description format PCMA for ID 8
>> Found audio description format telephone-event for ID 101
>> Capabilities: us - (alaw|ulaw|gsm), peer - 
>> audio=(alaw|g729)/video=(nothing)/text=(nothing), combined - (alaw)
>> Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 
>> (telephone-event|), combined - 0x1 (telephone-event|)
>> Peer audio RTP is at port 213.41.124.6:8526
>> Looking for LOCAL in supplier-in (domain ASTERISK)
>> sip_route_dump: route/path hop: 
>>
>> So, all looking good here, we've worked out that the combined
>> capabilities are (alaw)
>>
>> <--- Transmitting (no NAT) to SUPPLIER:5060 --->
>> SIP/2.0 100 Trying
>> Via: SIP/2.0/UDP 
>> SUPPLIER:5060;branch=z9hG4bK02B5ab9c8e55f864da9;received=SUPPLIER
>> From: ;tag=gK02498cb1
>> To: 
>> Call-ID: 205665777_90679951@SUPPLIER
>> CSeq: 539098 INVITE
>> Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
>> PUBLISH, MESSAGE
>> Supported: replaces, timer
>> Session-Expires: 1800;refresher=uas
>> Contact: 
>> Content-Length: 0
>>
>>
>> <>
>>
>> <--- Transmitting (no NAT) to SUPPLIER:5060 --->
>> SIP/2.0 180 Ringing
>> Via: SIP/2.0/UDP 
>> SUPPLIER:5060;branch=z9hG4bK02B5ab9c8e55f864da9;received=SUPPLIER
>> From: ;tag=gK02498cb1
>> To: ;tag=as4502927f
>> Call-ID: 205665777_90679951@SUPPLIER
>> CSeq: 539098 INVITE
>> Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4
>> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
>> PUBLISH, MESSAGE
>> Supported: replaces, timer
>> Session-Expires: 1800;refresher=uas
>> Contact: 
>> Content-Length: 0
>>
>>
>> <>
>> Audio is at 13948
>> Adding codec alaw 

Re: [asterisk-users] I can do alaw, ulaw and gsm; remote can do g729 and alaw; asterisk wants to translate g729 -> alaw. WHY?

2020-05-14 Thread Richard Mudgett
The other end is sending g729 even though it was not negotiated.  The other
end should not do this and it usually seems that the other ends that do
send g729.
This was recently fixed.  See
https://issues.asterisk.org/jira/browse/ASTERISK-28139

Richard

On Thu, May 14, 2020 at 1:11 AM John Hughes  wrote:

> I am having a problem with one of my callers who is using either g729 or
> alaw.  I can do alaw but not g729 so asterisk should negotiate alaw right?
> In fact from the sip debug it looks like it does, but then I get the
> dreaded "channel.c:5630 set_format: Unable to find a codec translation
> path: (g729) -> (alaw)" and the call hangs up.  Why?
>
> Last minute thought: Is it possible that the caller is sending g729 in RTP
> even though the SIP negotiation clearly chooses alaw?  Maybe I need some
> RTP debugging.
>
> Asterisk 13.14.1 on Debian, using chan_sip.
>
> Here's the trace:
>
> <--- SIP read from UDP:SUPPLIER:5060 --->
> INVITE sip:LOCAL@ASTERISK:5060 SIP/2.0
> Via: SIP/2.0/UDP SUPPLIER:5060;branch=z9hG4bK02B5ab9c8e55f864da9
> From: ;tag=gK02498cb1
> To: 
> Call-ID: 205665777_90679951@SUPPLIER
> CSeq: 539098 INVITE
> Max-Forwards: 70
> Allow: 
> INVITE,ACK,CANCEL,BYE,REGISTER,REFER,INFO,SUBSCRIBE,NOTIFY,PRACK,UPDATE,OPTIONS,MESSAGE,PUBLISH
> Accept: application/sdp, application/isup, application/dtmf, 
> application/dtmf-relay, multipart/mixed
> Contact: 
> P-Asserted-Identity: 
> Supported: timer,100rel,precondition
> Session-Expires: 1800
> Min-SE: 90
> Content-Length: 282
> Content-Disposition: session; handling=required
> Content-Type: application/sdp
>
> v=0
> o=Sonus_UAC 176880 320591 IN IP4 SUPPLIER
> s=SIP Media Capabilities
> c=IN IP4 213.41.124.6
> t=0 0
> m=audio 8526 RTP/AVP 18 8 101
> a=rtpmap:18 G729/8000
> a=fmtp:18 annexb=no
> a=rtpmap:8 PCMA/8000
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-15
> a=sendrecv
> a=ptime:20
> <->
> --- (17 headers 13 lines) ---
> Sending to SUPPLIER:5060 (no NAT)
> Sending to SUPPLIER:5060 (no NAT)
> Using INVITE request as basis request - 205665777_90679951@SUPPLIER
> Found peer 'supplier' for 'REMOTE' from SUPPLIER:5060
> Found RTP audio format 18
> Found RTP audio format 8
> Found RTP audio format 101
> Found audio description format G729 for ID 18
> Found audio description format PCMA for ID 8
> Found audio description format telephone-event for ID 101
> Capabilities: us - (alaw|ulaw|gsm), peer - 
> audio=(alaw|g729)/video=(nothing)/text=(nothing), combined - (alaw)
> Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 
> (telephone-event|), combined - 0x1 (telephone-event|)
> Peer audio RTP is at port 213.41.124.6:8526
> Looking for LOCAL in supplier-in (domain ASTERISK)
> sip_route_dump: route/path hop: 
>
> So, all looking good here, we've worked out that the combined capabilities
> are (alaw)
>
> <--- Transmitting (no NAT) to SUPPLIER:5060 --->
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP 
> SUPPLIER:5060;branch=z9hG4bK02B5ab9c8e55f864da9;received=SUPPLIER
> From: ;tag=gK02498cb1
> To: 
> Call-ID: 205665777_90679951@SUPPLIER
> CSeq: 539098 INVITE
> Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
> PUBLISH, MESSAGE
> Supported: replaces, timer
> Session-Expires: 1800;refresher=uas
> Contact: 
> Content-Length: 0
>
>
> <>
>
> <--- Transmitting (no NAT) to SUPPLIER:5060 --->
> SIP/2.0 180 Ringing
> Via: SIP/2.0/UDP 
> SUPPLIER:5060;branch=z9hG4bK02B5ab9c8e55f864da9;received=SUPPLIER
> From: ;tag=gK02498cb1
> To: ;tag=as4502927f
> Call-ID: 205665777_90679951@SUPPLIER
> CSeq: 539098 INVITE
> Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
> PUBLISH, MESSAGE
> Supported: replaces, timer
> Session-Expires: 1800;refresher=uas
> Contact: 
> Content-Length: 0
>
>
> <>
> Audio is at 13948
> Adding codec alaw to SDP
> Adding non-codec 0x1 (telephone-event) to SDP
>
> <--- Reliably Transmitting (no NAT) to SUPPLIER:5060 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/UDP 
> SUPPLIER:5060;branch=z9hG4bK02B5ab9c8e55f864da9;received=SUPPLIER
> From: ;tag=gK02498cb1
> To: ;tag=as4502927f
> Call-ID: 205665777_90679951@SUPPLIER
> CSeq: 539098 INVITE
> Server: Asterisk PBX 13.14.1~dfsg-2+deb9u4
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO, 
> PUBLISH, MESSAGE
> Supported: replaces, timer
> Session-Expires: 1800;refresher=uas
> Contact: 
> Content-Type: application/sdp
> Require

[asterisk-users] [asterisk-app-dev] True suppression of DTMF from audio

2020-02-25 Thread Richard Frith-Macdonald
I am developing apps using ARI which need suppression of DTMF tones in the 
audio, and I have been told (back in December) that asterisk depends on SIP 
providers to suppress DTMF tones in the audio stream.
Having sorted out my ARI code to suppress DTMF as I wanted, it turns out that 
SIP providers are not very good at doing that suppression (leaving audible 
clicks, or failing to suppress the tones on some calls).

So I'm looking for a way to suppress DTMF somewhat reliably, effectively by 
temporarily buffering RTP packets and 'emptying' those which contain DTMF audio 
(replacing the audio data with silence).
If the SIP provider uses RFC4733/RFC2833,  it should be possible to 'empty' the 
RTP packets around the signalling packets (getting rid of those audible clicks).
If the SIP provider does not reliably use RFC4733/RFC2833, it would be 
necessary to run signal analysis on each packet to detect those which contain 
DTMF tones, and 'empty' them.

First of all, has this already been done?  Am I missing some module asterisk 
already has available that could do this?
If not, what would be the best approach:  trying to direct  RTP through some 
separate server (eg sipwise/rtpengine) which would implement this, or modifying 
asterisk to support this?
I am really wondering how hard it would be to implement the buffering (holding 
back of RTP packets for a fraction of a second within asterisk?
Alternativey, how hard would it be to configure asterisk so that rtp passed 
through rtpengine before coming in ot asterisk?
Also, does anyone know if this would be workable for most codecs, or would it 
become horribly messy for anythng other than simple uncompressed codecs where 
(I assume) we can be sure that it's safe to zero data in a packet to empty it?

Thanks in advance for any help on this.
-- 




Every customer is unique. Engage each one. 


www.engagehub.com 
 

This communication is sent by Engage Hub and 
contains information which is confidential and privileged and is intended 
for the use of the addressee only. If you are not the intended recipient 
please destroy and contact the sender. Please note that any distribution, 
copying or use of this communication or the information in it is strictly 
prohibited. Any views expressed in this email are those of the individual 
sender and may not necessarily reflect the views of Engage Hub. Engage Hub 
makes no warranties that emails are virus free. This company is registered 
in England and Wales as Brainstorm Mobile Solutions Ltd and trading as 
Engage Hub (registered at Studio 311 Highgate Studios, 53-79 Highgate Road, 
London NW5 1TL. Company Number: 01661467; VAT Number: 214 9845 90) and 
Oxygen8 Communications Limited (registered in Ireland at 1st Floor, 21-22 
Grafton Street, Dublin 2, Ireland. Company No: 350312; VAT Number: 
6370312O).


___
asterisk-app-dev mailing list
asterisk-app-...@lists.digium.com
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev
-- 
_
-- 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] Looking for sample hangup_handler_pop and _wipe using vars

2020-02-04 Thread Richard Mudgett
>From the indicated wiki page:

*Pop a hangup handler off a channel and optionally push a replacement*

same => 
n,Set(CHANNEL(hangup_handler_pop)=[[[context,]exten,]priority[(arg1[,...][,argN])]]);

*Pop all hangup handlers off a channel and optionally push a replacement*

same => 
n,Set(CHANNEL(hangup_handler_wipe)=[[[context,]exten,]priority[(arg1[,...][,argN])]]);


What the syntax above is indicating is that the value to assign is
*optional*.  Thus to only pop or wipe hangup handlers you *do not* provide
a new handler to push.

[hdlr1]
exten = s,1,NoOp()
same = n,Return()

[hdlr2]
exten = s,1,NoOp()
same = n,Return()

[hdlr3]
exten = s,1,NoOp()
same = n,Return()

[my_new_handler_context]
exten = my_new_handler_exten,3,NoOp()
same = n,Return()

[my_current_context]
...
; This wipes all set hangup handlers because we are not providing an
optional replacement handler to push onto the empty stack.
same = n,NoOp() ; <-- At this point we may or may not have hangup handlers
set on the channel
same = n,Set(CHANNEL(hangup_handler_wipe)=)
same = n,NoOp() ; <-- At this point we have no hangup handlers on the
channel

; This wipes all set hangup handlers and pushes a new one onto the empty
stack.
same = n,NoOp() ; <-- At this point we may or may not have hangup handlers
set on the channel
same =
n,Set(CHANNEL(hangup_handler_wipe)=my_new_handler_context,my_new_handler_exten,3)
same = n,NoOp() ; <-- At this point we have only the one hangup handler we
just pushed: my_new_handler_context,my_new_handler_exten,3

; Hangup handler test dialplan
exten = 101,1,NoOp()
same = n,Set(CHANNEL(hangup_handler_push)=hdlr1,s,1)
same = n,Set(CHANNEL(hangup_handler_push)=hdlr2,s,1)
same = n,Set(CHANNEL(hangup_handler_push)=hdlr3,s,1)
; What is the hangup handler stack when the channel is in the Echo
application?
same = n,Echo()
same = n,Hangup()

exten = 102,1,NoOp()
same = n,Set(CHANNEL(hangup_handler_push)=hdlr1,s,1)
same = n,Set(CHANNEL(hangup_handler_push)=hdlr2,s,1)
same = n,Set(CHANNEL(hangup_handler_push)=hdlr3,s,1)
same =
n,Set(CHANNEL(hangup_handler_pop)=my_new_handler_context,my_new_handler_exten,3)
; What is the hangup handler stack when the channel is in the Echo
application?
same = n,Echo()
same = n,Hangup()

exten = 103,1,NoOp()
same = n,Set(CHANNEL(hangup_handler_push)=hdlr1,s,1)
same = n,Set(CHANNEL(hangup_handler_push)=hdlr2,s,1)
same = n,Set(CHANNEL(hangup_handler_push)=hdlr3,s,1)
same =
n,Set(CHANNEL(hangup_handler_pop)=my_new_handler_context,my_new_handler_exten,3)
; What is the hangup handler stack when the channel is in the Echo
application?
same = n,Echo()
same = n,Hangup()

You can enter the test dialplan portion above.  Then call the test
extensions to see what is on the channel's hangup handler stack while the
channel is in the Echo application by using the command line commands
mentioned on the wiki page.

Richard

On Mon, Feb 3, 2020 at 7:26 PM David P  wrote:

> Please point me to samples of popping and wiping hangup handlers. I don't
> need to use the values returned; I just need to clear any handlers before I
> push a new one.
>
> It's not clear at
> https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers+Specification how
> to provide vars on the right-hand side.
>
> Cheers,
> David
> --
> _
> -- 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] How to set http.conf for HTTPS support on Debian Buster ?

2019-11-18 Thread Richard Mudgett
On Mon, Nov 18, 2019 at 2:53 PM Olivier  wrote:

> Hello,
>
> I've installed a new Asterisk 17.0.0 on a Debian Buster system.
>
> This Asterisk instance is run by asterisk user (and group).
> I've got:
>
> # ls -l /etc/asterisk
> total 68
> -rw-r--r-- 1 asterisk asterisk  501 nov.  18 19:12 asterisk.conf
> -rw-r--r-- 1 asterisk asterisk  135 nov.  18 18:57 cdr.conf
> -rw-r--r-- 1 asterisk asterisk  684 nov.  18 18:57 cdr_custom.conf
> -rw-r--r-- 1 asterisk asterisk  103 nov.  18 18:57 confbridge.conf
> -rw-r--r-- 1 asterisk asterisk 6834 nov.  18 18:57 extensions.conf
> -rw-r--r-- 1 asterisk asterisk  138 nov.  18 21:42 http.conf
> -rw-r--r-- 1 asterisk asterisk  681 nov.  18 18:57 indications.conf
> drwxr-xr-x 2 root root 4096 nov.  18 20:47 keys
> -rw-r--r-- 1 asterisk asterisk  160 nov.  18 18:57 logger.conf
> -rw-r--r-- 1 asterisk asterisk 2769 nov.  18 18:57 modules.conf
> -rw-r--r-- 1 asterisk asterisk   50 nov.  18 18:57 musiconhold.conf
> -rw-r--r-- 1 asterisk asterisk 6360 nov.  18 18:57 pjsip.conf
> -rw-r--r-- 1 asterisk asterisk  790 nov.  18 18:57 pjsip_notify.conf
> -rw-r--r-- 1 asterisk asterisk  768 nov.  18 18:57 README
> -rw-r--r-- 1 asterisk asterisk  513 nov.  18 18:57 voicemail.conf
>
> # ls -l /etc/asterisk/keys/
> total 32
> -rw--- 1 root root 1224 nov.  18 20:47 asterisk.crt
> -rw--- 1 root root  578 nov.  18 20:46 asterisk.csr
> -rw--- 1 root root  887 nov.  18 20:46 asterisk.key
> -rw--- 1 root root 2111 nov.  18 20:47 asterisk.pem
>

I'd say that asterisk running as the asterisk user has no permission to see
the .pem file as only root can see it.

Richard


> -rw--- 1 root root  161 nov.  18 20:46 ca.cfg
> -rw--- 1 root root 1781 nov.  18 20:46 ca.crt
> -rw--- 1 root root 3311 nov.  18 20:46 ca.key
> -rw--- 1 root root  124 nov.  18 20:46 tmp.cfg
>
> # cat /etc/asterisk/http.conf
> [general]
> enabled=yes
> bindaddr=0.0.0.0
> bindport=8088
> tlsenable=yes
> tlsbindaddr=0.0.0.0:8089
> tlscertfile=/etc/asterisk/keys/asterisk.pem
>
> But, still I don't have any HTTPS server running:
>
> # asterisk -rx "http show status"
> HTTP Server Status:
> Prefix:
> Server: Asterisk/17.0.0
> Server Enabled and Bound to 0.0.0.0:8088
>
> Enabled URI's:
> /httpstatus => Asterisk HTTP General Status
> /static/... => Asterisk HTTP Static Delivery
>
> Enabled Redirects:
>   None.
>
>
>
> Can someone help me on this ?
> Is http;conf correct ?
> Am I mis-configuring files access rights or ownership ?
> Something else ?
>
> Best regards
>
>
>
>
>
>
> --
> _
> -- 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] Stuck "channel"

2019-11-01 Thread Richard Mudgett
On Thu, Oct 31, 2019 at 11:05 PM Carlos Chavez  wrote:

> I have tried both by hand and hitting tab to auto complete:
>
> *CLI> channel request hangup Message/ast_msg_queue
> Message/ast_msg_queue is not a known channel
>

This channel is used for processing all out of dialog SIP MESSAGE requests
in the dialplan.  It cannot be hung up.

Richard
-- 
_
-- 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] pattern matching "+"

2019-03-15 Thread Richard Mudgett
On Fri, Mar 15, 2019 at 9:19 AM sean darcy  wrote:

>  From my provider I get extensions of:
>
> +1<10digit number>
> 1<10 digit number>
> <10 digit number>
>
> seemingly randomly.
>
> What I'd like to do is
>
> exten=_!1234567890,1,Answer()
>
> which would match anything ending in 1234567890.
>
> But that doesn't work since ! can only be used at the end of a pattern.
>
> I tried
>
> [+\ ][1\ ]1234567890
>
> which didn't work, probably because "\ " means  space, not nothing.
>
> Any suggestions?
>

You must have multiple patterns to match the various starting sequences you
receive.
One that begins with +
One that begins with 1
One that is for a 10 digit number

Richard
-- 
_
-- 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] Outbound caller ID ignored

2019-01-13 Thread Richard Mudgett
On Sun, Jan 13, 2019 at 9:45 AM Mitch Claborn  wrote:

> Setting the outbound caller ID works fine on our PRI (T1) lines, but
> does not work on our local POTS lines. No errors in the logs, the new
> caller ID just seems to be ignored. Should I expect it to work on the
> analog lines?
>
> Dial plan:
> same =>n,Set(CALLERID(all)=111222)
> same =>n(dialit),Dial(DAHDI/50/1222333,30)
>
> Channels:
> signalling=fxs_ks
> callerid=asreceived
> group=20,21
> context=from-pstn
> faxdetect=incoming
> faxdetect_timeout=0
> faxbuffers => 12,half
> channel => 49-53
>
>
It will not work.  This is a limitation of analog lines.  In this case your
Asterisk box is
pretending to be a POTS phone.  Phones do not tell the PSTN who they are as
the PSTN
already knows who they are.

Richard
-- 
_
-- 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] Connected line update prevented

2018-12-04 Thread Richard Mudgett
On Tue, Dec 4, 2018 at 9:59 AM Mitch Claborn  wrote:

> I am seeing the following type of error in the console and verbose log.
>
> Connected line update to PJSIP/mlc296- prevented
>
> It is happening after a Dial command [Dial("PJSIP/mlc296-0006",
> "PJSIP/mlcx450,25,IktT")] before the other party answers the phone.
>
> This happens to be dialing from a Digium phone to a soft phone, but I
> also get the message when dialing the other way.
> I am using the latest Asterisk 16 and DPMA.
>
> There doesn't seem to be any damage - everything works OK, but I'd like
> to figure out what this means and fix it or prevent it.
>
> I did find
>
> https://wiki.asterisk.org/wiki/display/DIGIUM/Digium+Phones+and+Connected+Line+Updates
> and applied those changes but it did not help.
>
> Any ideas?
>

That message is not an error.  It is a verbose log stating what it did.  It
is a result
of you telling the Dial application to block the initial connected line
update because
you set Dial's 'I' option flag.

Richard
-- 
_
-- 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] pjsip aor stays in status created

2018-10-25 Thread Richard Mudgett
On Thu, Oct 25, 2018 at 6:58 AM marek cervenka  wrote:

> hi,
>
> i have webrtc client chrome69/jssip which is connecting to asterisk
> 13.23.1/pjsip
>
> i have strange problem where pjsip aor stays in status "created"
>
> sip trace on asterisk looks ok.
>
>
> do you think if this can be bug?
>

It is not a bug.  The contact has been "created".  It will stay in that
state unless
you are also going to qualify the endpoint.  Asterisk 16 simply renames the
state to
"NonQualified" to be more explicit.

Richard


>
> test*CLI> pjsip show aors
>
>Aor: 
> 
>  Contact:   
>  
>
> ==
>
>Aor:  vr1k50   1
>  Contact:  vr1k50/sip:6i2b9766@1.1.1.1:34434;tran b2ad914030
> Created   0.000
>
>
>
>
> <--- Received SIP request (566 bytes) from WSS:1.1.1.1:34434 --->
> REGISTER sip:sip.example.com SIP/2.0
> Via: SIP/2.0/WSS v0i0at11ojbn.invalid;branch=z9hG4bK2155317
> Max-Forwards: 69
> To: 
> From: "vr1k50" ;tag=d56ij3vuo3
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> CSeq: 13 REGISTER
> Contact:
>  ;transport=ws>;+sip.ice;reg-id=1;+sip.instance="";expires=60
> Expires: 60
> Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
> Supported: path,gruu,outbound
> User-Agent: JsSIP 3.2.9
> Content-Length: 0
>
>
> <--- Transmitting SIP response (484 bytes) to WSS:1.1.1.1:34434 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/WSS
> v0i0at11ojbn.invalid;rport=34434;received=1.1.1.1;branch=z9hG4bK2155317
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> From: "vr1k50" ;tag=d56ij3vuo3
> To: ;tag=z9hG4bK2155317
> CSeq: 13 REGISTER
> WWW-Authenticate: Digest
>
> realm="asterisk",nonce="1540467808/121f72ae15612cc46a72e2861657a940",opaque="3060464337b28725",algorithm=md5,qop="auth"
> Server: Asterisk PBX 13.23.1
> Content-Length:  0
>
>
> <--- Received SIP request (837 bytes) from WSS:1.1.1.1:34434 --->
> REGISTER sip:sip.example.com SIP/2.0
> Via: SIP/2.0/WSS v0i0at11ojbn.invalid;branch=z9hG4bK9799804
> Max-Forwards: 69
> To: 
> From: "vr1k50" ;tag=d56ij3vuo3
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> CSeq: 14 REGISTER
> Authorization: Digest algorithm=MD5, username="vr1k50",
> realm="asterisk", nonce="1540467808/121f72ae15612cc46a72e2861657a940",
> uri="sip:sip.example.com", response="376b4ac58b01dde2e043931467bba55a",
> opaque="3060464337b28725", qop=auth, cnonce="v8i7444gio8r", nc=0001
> Contact:
>  ;transport=ws>;+sip.ice;reg-id=1;+sip.instance="";expires=60
> Expires: 60
> Allow: INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO
> Supported: path,gruu,outbound
> User-Agent: JsSIP 3.2.9
> Content-Length: 0
>
>
> <--- Transmitting SIP response (446 bytes) to WSS:1.1.1.1:34434 --->
> SIP/2.0 200 OK
> Via: SIP/2.0/WSS
> v0i0at11ojbn.invalid;rport=34434;received=1.1.1.1;branch=z9hG4bK9799804
> Call-ID: 0mm678kf72bc9b5ur7ea8d
> From: "vr1k50" ;tag=d56ij3vuo3
> To: ;tag=z9hG4bK9799804
> CSeq: 14 REGISTER
> Date: Thu, 25 Oct 2018 11:43:28 GMT
> Contact: ;expires=59
> Expires: 60
> Server: Asterisk PBX 13.23.1
> Content-Length:  0
>
>
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Astricon is coming up October 9-11!  Signup is available at:
> https://www.asterisk.org/community/astricon-user-conference
>
> 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 --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] After updating to 16 "Some non-required modules failed to load"

2018-10-23 Thread Richard Mudgett
On Tue, Oct 23, 2018 at 5:07 PM Jonathan H  wrote:

> Thanks Richard - any idea if these matter? And how to stop the errors:
>
> cdr_sqlite3_custom declined to load.
> cel_sqlite3_custom declined to load
> pbx_ael declined to load
>
> Standard 16.0 build, just updated a 15.4; nothing fiddled with in
> menuselect.
>

You are likely lacking a config file for them.  Or if you don't need them
don't load them.
Declined modules just sit in memory and are not initialized.

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] After updating to 16 "Some non-required modules failed to load"

2018-10-23 Thread Richard Mudgett
On Tue, Oct 23, 2018 at 1:35 PM Dan Cropp  wrote:

> The res_pjsip_transport_websocket failing to load seems to be a conflict
> with the chan_sip.so loading.
>
> When I make the chan_sip.so not load, res_pjsip_transport_websocket.so
> does load.
>
> We have customers who need chan_sip and chan_pjsip, so we need to load
> both.  Is there a way to make the res_pjsip_transport_websocket load after
> the chan_sip?
>

res_pjsip_transport_websocket.so will fail to load if chan_sip is
configured to handle
websockets.  Only one channel driver can provide websocket services at a
time.
Either disable support in chan_sip's sip.conf (websocket_enabled = no) or
don't load
the res_pjsip_transport_websocket.so module.

>From sip.conf.sample:
;websocket_enabled = true   ; Set to false to prevent chan_sip from
listening to websockets.  This
; is needed when using chan_sip and
res_pjsip_transport_websockets on
    ; the same system.

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] Asterisk 16.0.0 Now Available

2018-10-16 Thread Richard Mudgett
On Tue, Oct 16, 2018 at 8:08 AM Marcelo Terres  wrote:

> Guys,
>
> just a small thing:
>
> the link on "thanks for download" webpage is still pointing to Asterisk 15.
>
> Here:
>
> https://www.asterisk.org/download-asterisk-thank-you
>
> Your download should begin in a few seconds. If not, download now
> <http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-15-current.tar.gz>
> Thanks for downloading Asterisk! style="font-size:16px;
> margin-bottom:0px">Your download should begin in a few seconds. If not,  href="
> http://downloads.asterisk.org/pub/telephony/asterisk/asterisk-15-current.tar.gz
> ">download now 
> But when the page is loaded it downloads the new version.
>

Should be fixed.

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] First attempt with statsd

2018-10-09 Thread Richard Mudgett
On Tue, Oct 9, 2018 at 6:16 AM Olivier  wrote:

> Hello,
>
> I've just read this [1] blog entry.
> I'm completely new with statsd.
>
> My questions are:
>
> 1. This [1] mentions both res_chan_stats and res_endpoint_stats.
> I can't find any res_chan_stats.so or res_endpoint_stats.so file in my
> debian Stretch asterisk box.
> What does it mean ?
>

Those two modules are example code for asterisk modules to subscribe to the
statsd stasis events.
They are not built by default.  You will have to build Asterisk from
source.  The blog post you reference
gives instructions on how to build them.

https://wiki.asterisk.org/wiki/display/AST/Installing+Asterisk+From+Source


>
> 2. On a general point of view, is collectd daemon extended with a statsd
> plugin able to collect Asterisk Statsd statistics ?
>

I don't know.

Richard


>
> [1]
> https://blogs.asterisk.org/2016/02/03/integrating-asterisk-with-statsd/
>
> Best regards
> --
> _
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> Astricon is coming up October 9-11!  Signup is available at:
> https://www.asterisk.org/community/astricon-user-conference
>
> 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 --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] Explain module reloading error message

2018-10-09 Thread Richard Mudgett
On Tue, Oct 9, 2018 at 5:58 AM Olivier  wrote:

> Hello,
>
> On a freshly update Debian Stretch packaged-Asterisk (13.14.1) box, I'm
> reading this:
>
> asterisktuto*CLI> module load res_statsd.so
> Unable to load module res_statsd.so
> Command 'module load res_statsd.so' failed.
> [Oct  9 12:53:26] WARNING[488]: loader.c:1077 load_resource: Module
> 'res_statsd.so' already exists.
> [asterisktuto*CLI> module reload res_statsd.so
> No such module 'res_statsd.so'
>
> Can you explain this second message as res_statsd.so module seems to exist
> ?
>

The reload message is incorrect when the statsd.conf file has not changed.
I have just
put up a patch on gerrit [1] to fix it.  There was another fix [2] made
about a week ago that fixed
a more general problem that affected the reported reload status of any
module if it failed.

Richard

[1] https://gerrit.asterisk.org/#/c/asterisk/+/10453/
[2] https://gerrit.asterisk.org/#/c/asterisk/+/10351/
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] Any idea what causes "Oooh, got a frame with format of g729 on channel 'PJSIP/121-000001d2' when we're sending 'ulaw', switching to match"

2018-10-03 Thread Richard Mudgett
On Wed, Oct 3, 2018 at 2:09 PM Dan Cropp  wrote:

> I’m reaching out to the asterisk users e-mail list in hopes someone there
> can provide guidance.  A couple of Digium’s developers check this e-mail
> group so they may respond.  Unfortunately, they are basically in the get
> ready for show mode.  Major show is next week and they are also releasing
> the next major version in a matter of days.
>
>
>
> Asking if them…
>
> What causes asterisk to output the Oooh, got a frame with format of g729
> on channel 'PJSIP/121-01d2' when we're sending 'ulaw', switching to
> match
>
> message?
>

Because Asterisk received a G729 RTP packet from the other side and is
being accommodating because asymmetric_rtp_codec=no is set.
In this case the other side is in error by not honoring the negotiation.


> Is it asterisk detecting rtp stream with g729?
>
> Why would asterisk change to g729 stream if the codec negotiation is
> clearly ulaw in the SIP packets?
>

This is mostly historical.  chan_sip didn't keep track of the truly
negotiated codecs in the channel's native capabilities.  So if the peer's
INVITE
asked for five codecs and Asterisk supported three of them, we would
respond with the three and then pick the one we were going to use and put
it into the
channel's native capabilities.  chan_pjsip has the asymmetric_rtp_codec
option to emulate this same behavior which results in the "Oooh"
message you are seeing.  If that option were disabled we would put those
three codecs in the channel's native capabilities.  Then you would get
this debug message instead:
"Oooh, got a frame with format of %s on channel '%s' when it has not been
negotiated"
and the frame would be discarded.

The primary reason for chan_sip's behavior and chan_pjsip's
asymmetric_rtp_codec=no option is because phone DSP's can only handle
a single codec at a time.  Technically if the peer's INVITE offered five
and we responded with three the peer should immediately renegotiate to
narrow the
codec choice to one.

Richard


>
>
> Dan Cropp
>
> Senior Software Engineer, R&D Software Dept.
>
> AMTELCO, 4800 Curtin Drive, McFarland, WI 53558-9424
>
> 608 838-4197 ext. 291
>
> 1-800-238-5275 ext 291
>
> www.amtelco.com
>
>
>
>
>
> *Statement of Confidentiality*
>
> The contents of this e-mail message and any attachments are confidential
> to American Tel-A-Systems, Inc. (AMTELCO), and are intended solely for the
> addressee(s). The information contained in this transmission also may be of
> a legally privileged nature. This transmission is sent in trust and is
> meant solely for delivery to the intended recipient(s). Receipt of this
> transmission does not convey any right to reproduce or disseminate any of
> the information it contains. If you are not the intended recipient, please
> immediately notify the sender by reply e-mail or telephone and delete this
> message and any attachments.
>
>
>
> *From:* Dan Cropp
> *Sent:* Wednesday, October 3, 2018 1:57 PM
> *To:* asterisk-users@lists.digium.com
> *Subject:* Any idea what causes "Oooh, got a frame with format of g729 on
> channel 'PJSIP/121-01d2' when we're sending 'ulaw', switching to match"
>
>
>
> The PJSIP endpoint is configured for ulaw only.  Not sure how or why we
> are seeing the g729 on calls for this endpoint.
>
>
>
> Would this be a case that asterisk detects the rtp stream is g729 even
> though it’s negotiated as ulaw?
>
> Why would asterisk change the format to g729 when disallow = all and allow
> = ulaw are the endpoint settings?
>
>
>
> [121]
>
> type = endpoint
>
> context = IS
>
> transport = transport1
>
> aors = 121
>
> accountcode = 2
>
> dtmf_mode = inband
>
> device_state_busy_at = 96
>
> force_rport = no
>
> identify_by = username,ip
>
> disallow = all
>
> allow = ulaw
>
> from_user = 121
>
> acl = acl1
>
>
>
> [10/03 11:29:34.240] DEBUG[21414][C-0226] chan_pjsip.c: Oooh, got a
> frame with format of g729 on channel 'PJSIP/121-01d2' when we're
> sending 'ulaw', switching to match
>
>
>
>
>
> INVITE sip:2...@xxx.xxx.xxx.xxx:5060 SIP/2.0
>
> Via: SIP/2.0/UDP YYY.YYY.YYY.YYY:5060;branch=z9hG4bKxqyYl2Jg84158000
>
> To: 
>
> From: ;tag=I0n4X7KK
>
> Contact: 
>
> Call-ID: OlrmFuyOq--@ YYY.YYY.YYY.YYY 
>
> CSeq: 2223 INVITE
>
> Max-Forwards: 70
>
> Allow: INVITE,ACK,CANCEL,BYE,OPTIONS,REFER,NOTIFY
>
> Supported: replaces
>
> Content-Type: application/sdp
>
> Content-Length: 335
>
>
>
> v=0
>
>

Re: [asterisk-users] Non-matching linkedid on CDR Records [SEC=UNCLASSIFIED]

2018-10-03 Thread Richard Mudgett
On Wed, Oct 3, 2018 at 12:20 AM Calum Power  wrote:

> Hi asterisk-users,
>
> We have recently moved to the 13.x branch of Asterisk from 11.x, and we're
> trying to correlate CDR records from multiple-legs for billing purposes.
> As part of this change we have added 'linkedid' to our CDR table schema in
> an attempt to join the multiple records into one billable record.
>
> The call path can be simplified as (transport types in brackets):
> SIP Phone---(SIP)---Asterisk Svr1---(IAX)---Asterisk
> Svr2---(IAX)---Asterisk Svr3---(SIP)---PSTN
>
> As per the CDR spec, I expected the 'linkedid' to propagate between the
> records and be the same throughout...
> However, we observe differing linkedid values for the same call... Thus
> (xxx's added for privacy):
> | id  | calldate| src| dst|
> accountcode | uniqueid  | linkedid | billsec | duration |
> | 5031920 | 2018-10-03 01:51:41 | 0362xx | 0449xx
> | | 1538531501.18974  | 1538531501.18974 |  64 |   71 |
> | 5031921 | 2018-10-03 01:52:52 | 6613   | 0449xx |
> 759553  | 1538531488.11368  | 1538531488.11368 |   0 |0 |
>
> Noting that our out-dial from Svr2 changes the CLID to 0362xx as we
> must present that CLID to our PSTN upstream provider as per their
> requirements.
>
> The first record is taken from Asterisk Svr2, the second from Asterisk
> Svr1 (Svr1 replicates MySQL to Svr2)
> As you can see, the linkedid records are different (1538531501.18974 vs
> 1538531488.11368)
>
> The difference appears to be the matter of microsecs that it takes to
> connect the call legs (over a satellite connection) so I could probably
> 'guess' that these two are the same call, however for billing purposes this
> is not accurate enough.
>
> Can someone shed some light on why the linkedid is not being shared
> between IAX channels?
>

Linkedid is not propagated between Asterisk boxes.  A linkedid is just the
uniqueid of the oldest associated channel
within the Asterisk box.  Uniqueid's are unique within an Asterisk box and
can be made unique across Asterisk boxes
by optionally adding the host name.

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

Astricon is coming up October 9-11!  Signup is available at: 
https://www.asterisk.org/community/astricon-user-conference

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] Queue breaks Dynamic_Features on Attended Transfer

2018-08-08 Thread Richard Mudgett
nnel
chains.  For instance I think your initial
non-queue call chain looks like:
PJSIP/caller --> Bridge1 --> L/caller;1 -- L/caller;2 --> Bridge2 -->
L/feature;1 -- L/feature;2 --> Bridge3 --> PJSIP/201

DTMF feature hooks match DTMF coming from a channel toward a bridge.  They
do not match DTMF
going in the other direction.  (This is why Local/queue_
dialplan_101@queue-59b2;2 does not act on
the DTMF above.)

SIP attended transfers involve two calls.  One call is placed on hold while
the endpoint initiates another
call.  When you complete the transfer the two remote parties get bridged
together.
For example:
A (PJSIP/A-1) calls B (PJSIP/B-1) and talk in Bridge1
B (PJSIP/B-1) places A (PJSIP/A-1) on hold to start an attended transfer
B (PJSIP/B-2) calls C (PJSIP/C-2) in another call and talk in Bridge2
When B completes the transfer A (PJSIP/A-1) is bridged with C (PJSIP/C-2).
* Note the A and C channels could wind up in either Bridge1 or Bridge2
depending upon circumstances.
* Note that there are two different PJSIP/B channels involved.
* Note that until the attended transfer is completed the second call B
makes has no connection with the
first call and thus inherits no channel variables from the first call.
* Note that if the A and C parties are connected to B through local
channels it is the local channels which
represent the A and C parties that are involved in the transfer.

Local channels always come in pairs.  When you dial a local channel it is
the ;1 channel that acts as an
outgoing channel and the ;2 channel executes dialplan and acts as an
incoming channel.  This is the
initial role between the two channels in a local channel pair.  In the
transfer scenario I describe above
(the answering channel initiates the transfer) the local channels maintain
the relationships after the transfer.

Richard
-- 
_
-- 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] Queue breaks Dynamic_Features on Attended Transfer

2018-08-08 Thread Richard Mudgett
On Wed, Aug 8, 2018 at 1:53 PM, Daniel Journo 
wrote:

> > Prior to a call entering a Queue, I set __DYNAMIC_FEATURES=NewRecordApp.
> > AgentA answers and is able to use that feature code.
> > If AgentA performs an attended transfer of a call from a queue to
> AgentB, the
> > feature code no longer works.
> >
> > It only doesn’t work when using Queue() and an Attended transfer is
> > performed.
> >
> > Is this a bug or is there something that needs to be set to allow the
> > DYNAMIC_FEATURES to be inherited after an attended transfer from a queue?
>
> Doing some more tests, this reads like a bug to me.
> Using a hanguphandler with DumpChan in the dialplan context that executes
> the Queue, I can see that DYNAMIC_FEATURES is set.
> After the attended transfer when the call is ended, the hanguphandler
> still shows that DYNAMIC_FEATURES is set. It's just not accessible.
>
> Any thoughts?
>
It likely depens on how you are doing the attended transfer.  Via DTMF?
Via SIP or channel technology protocol?
Does the Agent B channel have the DYNAMIC_FEATURES channel variable set on
it?

Richard
-- 
_
-- 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] dialplan reload not showing debug info even with debug on (ast 15.5)

2018-07-30 Thread Richard Mudgett
On Sun, Jul 29, 2018 at 10:04 AM, Jonathan H  wrote:

> OK, many thanks for that. Not sure I see the point of the change, but
> at least I can get the info back by changing
>
> console => notice,warning,error
> to
> console => notice,warning,error,debug
>
> That said, dialplan reload seems to show significantly fewer items
> than before. I've got loads of extensions, and it does indeed seem to
> reload them all, but only shows about 1/4 of them in the console when
> doing dialplan reload. Hmmm...
>
> Incidentally, just while I'm here, is there a particular reason that
> debug can only every be pushed higher when connecting to the console?
> it's always been the case since I started using Asterisk 3 years ago
> so I guess there's a reason, and I never questioned it before. I'm
> just curious!
> For example:
>
>
> asterisk -rvddd
> Core debug was 2 and is now 3.
>
> asterisk -rv
> Core debug was 3 and is now 4.
>
> asterisk -rvdd
> Core debug is still 4.
>
> asterisk -rvd
> Core debug is still 4.
>
> But it always respects "core set debug" in whichever direction of
> verbosity is required.
>

When you connect to a remote asterisk with the -r option, there are a couple
commands automatically sent every time.  These automatic commands tell
the remote asterisk what verbose and debug level you passed on the
command line.

core set verbose at least X silent
core set debug atleast X

That is why the debug level does not go down.  Another thing is that the
debug level
is global to the system.  Thus if you set the level in one connection it
affects all
connections including future ones.  The verbose level is per connection.

Richard
-- 
_
-- 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] Any way of "flattening out" 2 channels back into one?

2018-07-29 Thread Richard Mudgett
On Sat, Jul 28, 2018 at 4:08 PM, Jonathan H  wrote:

> Last question for today, I promise!
>
> The problem: In order to disconnect calls after x minutes, I need to do
> this:
>
> [setup]
> exten => setup,1,Answer()
> same => n,Set(LIMIT_PLAYAUDIO_CALLER=yes)
> same => n,Set(LIMIT_WARNING_FILE=/var/lib/asterisk/sounds/en_GB_TNS/
> time_limit_reached)
> same => n,Dial(Local/s@root/n,3,L(354:6))
> same => n,Hangup()
>
> [root]
> exten => s,1,Verbose(1,Call to: ${CALLERID(name)} from: ${CALLERID(num)})
> same => n,Set(CHANNEL(hangup_handler_push)=hdlr1,s,1)
>
> etc etc
>
> Works well, but the result is it looks like there are 2 active calls
> in the console. Is there any way of forcing the drop of a call after x
> minutes without doing this "double dialling" business?
>

Heh.  This is similar to the example given describing local channel
optimization [1] and
what happens to state information on those channels when local channels
optimize out.

The "call" counter you mention from the CLI "core show channels" output is
an
approximation and is not very accurate.  Asterisk has no concept of what a
"call" is.
That counter simply counts the number of channels that started PBX's to
execute
dialplan normal.  In your dialplan you have two channels that do this and
thus two
"calls" are counted.

If you want to eliminate the "double dialing" business avoid using local
channels.  Have your
incoming PJSIP channels call other PJSIP channels directly.  Or you can
make it so the
local channels can optimize themselves out.  Remember you cannot have state
information
stored on an optimizing local channel as that information goes away when
the local
channels optimize out.

The Dial 'L' option currently puts state on the caller and called channels
depending on which
features are configured (who hears things).  If you set the verbose level
to 4 you get information
in the log about that.

Richard

[1] https://wiki.asterisk.org/wiki/display/AST/Local+Channel+Optimization
-- 
_
-- 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] dialplan reload not showing debug info even with debug on (ast 15.5)

2018-07-29 Thread Richard Mudgett
On Sat, Jul 28, 2018 at 1:10 PM, Jonathan H  wrote:

> I've not needed to do a dialplan reload for a while, so I don't know
> exactly which version is stopped working, but on 15.5, I'm not seeing
> ANY debug info at any debug level.
> So I'm not really sure how to find mistakes in the dialplan.  This is
> all I get... how do I enable this debug mode to see the previous
> behaviour? Thanks
>
> asterisk -rvd
> (enters console)
> dialplan reload
> Dialplan reloaded.
> [...]
> -- pbx_config successfully loaded 125 contexts (enable debug for
> details).
>

Many of those messages now go out as DEBUG level 1 messages.  You would
need to enable those to go out to your console in logger.conf if they
aren't enabled.
Or you need to look at one of the logging files (like full) that has debug
messages
routed to it.

https://issues.asterisk.org/jira/browse/ASTERISK-27084 is the issue that
did that
which went out in v15.3.0 and is mentioned in the CHANGES file:

Core
--
 * During dialplan reload log messages are produced for each context,
   extension and include.  These messages are no longer printed by the
   verbose loggers, they are now only logged as debug messages.


Richard
-- 
_
-- 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] Recompiling Ast results in a binary with differing SHA256 sums?

2018-07-20 Thread Richard Mudgett
On Wed, Jul 18, 2018 at 4:37 AM, Stefan Viljoen 
wrote:

> Hi Guys
>
> If I recompile Asterisk (on a Centos 7 test box, Asterisk 1.8.32.3)
> multiple
> times in a row, e. g.
>
> make clean;configure;make menuselect;make
>
> I note that the asterisk binary in the /main folder in the source tree, has
> a different SHA256 hash each time I recompile Asterisk using the above
> commands.
>
> I do not change anything on the system or in the menuselect configs for
> each
> run.
>
> But each time the checksum for the "asterisk" binary is different.
>
> Why is that? Shouldn't a freshly compiled binary off the same source, with
> no changes in the Asterisk menuselect, with nothing changed on the rest of
> the system, result each time in an IDENTICAL binary, down to the last byte?
>
> Why am I getting a completely different "asterisk" ELF binary each time I
> recompile asterisk, according to checksum?
>
> Can someone shed light...
>

A timestamp is added to the version string when you build Asterisk.  Thus
every
time you recompile Asterisk you get a different timestamp in the version
string.
Thus the checksum will be different every time.

Richard
-- 
_
-- 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] Passing arguments to the 'mailcmd' option in voicemail.conf

2018-07-06 Thread Richard Mudgett
On Fri, Jul 6, 2018 at 10:57 AM, Tech Support 
wrote:

> All;
>
> I’d like to change the default command that is used to send email when
> a person has a new voicemail. I believe that’s set in voicemail.conf as the
> ‘mailcmd’ option. The default is to use the /usr/sbin/sendmail –t command.
> I wrote a quick test script to see what arguments are passed to the command
> (@ARGV), but no arguments were sent. So my question is this, how are
> arguments sent to the ‘mailcmd’ command?
>

>From the source there are no arguments, the email body is sent to the
command from stdin.
( mailcmd < temp-email-body-file ; rm -f temp-email-body-file ) &

Richard
-- 
_
-- 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] Core show channels concise = deprecated

2018-07-03 Thread Richard Mudgett
On Mon, Jul 2, 2018 at 7:49 PM, Telium Support Group 
wrote:

> I want to get a list of all active channels from the AM.  I’ve been using
> ‘core show channels concise’ (as a commands from the AMI) but I see in the
> documentation that the command is deprecated and will be removed.
>
>
>
> What’s the best way to get the equivalent from the AMI?
>

The equivalent AMI action is: CoreShowChannels.

You can see what AMI actions are available by issuing this CLI command:
manager show commands
For what you want you can issue the CLI command: manager show command
CoreShowChannels
Or you can go to the wiki
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+AMI+Actions
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+ManagerAction_CoreShowChannels

Richard
-- 
_
-- 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] Asterisk crashing on AAAA lookup

2018-06-26 Thread Richard Mudgett
On Tue, Jun 26, 2018 at 6:15 PM, Dovid Bender  wrote:

> I have Asterisk running on a Ubuntu 18.0.4 on Digital Ocean. Every so
> often asterisk crashes and then restarts. I am not seeing any core dumps on
> the box. The only I thing I see every time is a second before Asterisk
> crashes there is a  lookup for the boxes hostname. As soon as it gets
> the response I see that asterisk is restarting. Any idea what would cause
> this and how would get a dump or further debug? I did build Asterisk with
> DONT_OPTIMIZE and BETTER_BACKTRACES but not seeing any traces anywhere. I
> am using Asterisk 15.4.1.
>

You have to start asterisk with the -g option to make asterisk create core
files.
https://wiki.asterisk.org/wiki/display/AST/Getting+a+Backtrace

Richard
-- 
_
-- 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] How to check modules loading order or force such order ?

2018-04-27 Thread Richard Mudgett
On Fri, Apr 27, 2018 at 5:23 AM, Olivier  wrote:

> Hello,
>
> From [1], you can read:
> "If you don't have an identify section defined, or else you have
> res_pjsip_endpoint_*identifier_ip* loading *after* res_pjsip_endpoint_
> *identifier_user*, then ..."
>
> To remove the above uncertainty coming from modules loading order, how can
> you either or both :
> - check modules loading order
> - force such order.
>
> Would it be welcomed addition to the wiki pages ?
>
> Best regards
>
> [1] https://wiki.asterisk.org/wiki/display/AST/PJSIP+
> Configuration+Sections+and+Relationships
>

That particular page is a little out-of-date.  The
endpoint_identifier_order option for the global section [1] was
created to remove that short coming quite awhile ago so load order is no
longer a determining factor.

The most-up-to-date and accurate option documentation for your Asterisk
version will be what is installed
online with your Asterisk installation.  In this case CLI "config show help
res_pjsip global endpoint_identifier_order",
and "core show help pjsip show identifiers".

Richard

[1]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip
-- 
_
-- 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] Alias for country in indications.conf

2018-04-23 Thread Richard Mudgett
It looks like any support for "alias" as a tone zone alias feature was
removed
back in 2009 (in git commit 4ec301360cdd84be911b06cd0adda2459d66bc6e) as
part of a code cleanup likely because alias was poorly conceived and didn't
work.  What you have done by defining "alias" now is to define a tone event
called alias with a tone cadence of "gb".

Richard

On Mon, Apr 23, 2018 at 1:08 AM, Patrick Wakano  wrote:

> Hello list,
> Hope you all doing fine!
> I've tried to use the 'alias' directive in the indications.conf file but
> apparently it doesn't work
> It looks like maybe this feature was removed, because old sample for the
> indications.conf file have example using the alias parameter, but newer
> samples don't have it anymore also I couldn't find any ticket saying
> this parameter was deprecated Anyway when trying to use it, it doesn't
> work. Anyone aware of some change related to this?
> I am using Asterisk 13.6.0 and have this in indications.conf:
> [uk]
> *alias = gb*
> description = United Kingdom
> ringcadence = 400,200,400,2000
> ; These are the official tones taken from BT SIN350. The actual tones
> ; used by BT include some volume differences so sound slightly different
> ; from Asterisk-generated ones.
> dial = 350+440
> ; Special dial is the intermittent dial tone heard when, for example,
> ; you have a divert active on the line
> specialdial = 350+440/750,440/750
> ; Busy is also called "Engaged"
> busy = 400/375,0/375
> ; "Congestion" is the Beep-bip engaged tone
> congestion = 400/400,0/350,400/225,0/525
> ; "Special Congestion" is not used by BT very often if at all
> specialcongestion = 400/200,1004/300
> unobtainable = 400
> ring = 400+450/400,0/200,400+450/400,0/2000
> callwaiting = 400/100,0/4000
> ; BT seem to use "Special Call Waiting" rather than just "Call Waiting"
> tones
> specialcallwaiting = 400/250,0/250,400/250,0/250,400/250,0/5000
> ; "Pips" used by BT on payphones. (Sounds wrong, but this is what BT claim
> it
> ; is and I've not used a payphone for years)
> creditexpired = 400/125,0/125
> ; These two are used to confirm/reject service requests on exchanges that
> ; don't do voice announcements.
> confirm = 1400
> switching = 400/200,0/400,400/2000,0/400
> ; This is the three rising tones Doo-dah-dee "Special Information Tone",
> ; usually followed by the BT woman saying an appropriate message.
> info = 950/330,0/15,1400/330,0/15,1800/330,0/1000
> ; Not listed in SIN350
> record = 1400/500,0/6
> stutter = 350+440/750,440/750
>
> The CLI shows Asterisk definitely understood the 'alias' parameter:
> CLI> indication show uk
> Country Indication  PlayList
> =
> uk 400,200,400,2000
> *uk  alias   gb*
> uk  dial350+440
> uk  specialdial 350+440/750,440/750
> uk  busy400/375,0/375
> uk  congestion  400/400,0/350,400/225,0/525
> uk  specialcongesti 400/200,1004/300
> uk  unobtainable400
> uk  ring400+450/400,0/200,400+450/400,0/2000
> uk  callwaiting 400/100,0/4000
> uk  specialcallwait 400/250,0/250,400/250,0/250,400/250,0/5000
> uk  creditexpired   400/125,0/125
> uk  confirm 1400
> uk  switching   400/200,0/400,400/2000,0/400
> uk  info950/330,0/15,1400/330,0/15,1800/330,0/1000
> uk  record  1400/500,0/6
> uk  stutter 350+440/750,440/750
>
> But the dialplan execution causes this:
> ERROR[20778][C-0006]: func_channel.c:661 func_channel_write_real:
> Unknown country code '*gb*' for tonezone. Check indications.conf for
> available country codes.
>
> Any info is much appreciated!
> Cheers,
> Patrick Wakano
>
>
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
>  Virus-free.
> www.avg.com
> <http://www.avg.com/email-signature?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail>
> <#m_4360720622955853513_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2>
>
> --
> _
> -- 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] Asterisk / PRI and Outbound Overlap Dialing

2018-04-05 Thread Richard Mudgett
On Thu, Apr 5, 2018 at 7:20 AM, Mtt Cannon  wrote:

>
>
> I am trying to setup Asterisk to act like a PBX connected via a PRI
> gateway to a voice netowrk where Asterisk is doing outbound
> overlap dialing for calls that terminate via that PRI. AFter researching
> through the archives and online dcocs, I thought I had
> everyting setup right, dialplan configured for '_X!' and the
> 'overlapdial=yes' in the chan_dahdi.conf file, but when I try and
> make a call, while the first digit triggers the outbound SETUP message,
> that SETUP message always includes a 'Sending Complete'
> parameter and any subsequent digits received from the originaing client
> seem to be getting ignored as opposed to sent over in
> subsequent ISDN INFORMATION messages.
>
> Any idea what I might be missing here...i did restart both DAHDI and
> Asterisk after making the changes to support overlap.
>
> Logs and snippets are below..
>
> Thanks
> matt
>
>
> localhost*CLI> core show version
> Asterisk 15.2.0 built by root @ localhost.localdomain on a x86_64 running
> Linux on 2018-02-21 19:10:36 UTC
>
>
> chan_dahdi.conf
>
> ; Overlap dialing mode (sending overlap digits)
> ; Cannot be changed on a reload.
> ;
> ; incoming: incoming direction only
> ; outgoing: outgoing direction only
> ; no: neither direction
> ; yes or both: both directions
> ;
> overlapdial=yes
>

Where is this option set in the chan_dahdi.conf file?  To have any effect
on a particular channel the option
MUST be set before the channel line that creates the channel.

[channels]
context=incoming
switchtype=euroisdn
signaling=pri_cpe
overlapdial=yes

; All options currently set are used to create the specified channels on
the next line.
channel=1-15,17-31
; Any options set AFTER the channel line above DO NOT affect those channels.

context=other

Richard
-- 
_
-- 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] Strange problem with PRI on 64-bit?

2018-04-03 Thread Richard Mudgett
On Tue, Apr 3, 2018 at 4:57 PM, Matt Fredrickson  wrote:

> On Tue, Apr 3, 2018 at 4:38 PM, Tony Mountifield 
> wrote:
> > In article  mail.gmail.com>,
> > Matt Fredrickson  wrote:
> >> On Tue, Apr 3, 2018 at 5:44 AM, Tony Mountifield 
> wrote:
> >> > I have some more investigation to do on this, but I wanted to see if
> anyone
> >> > here had any insight into the issue I've run into.
> >> >
> >> > The hardware is a HP DL360 G6 with a TE420 gen 5 4-port T1 PRI card.
> It is one
> >> > of several systems that have been running without issue since
> 2010/2011. They
> >> > have all been running CentOS 4 32-bit with Zaptel 1.4.12.1 (with
> patch for gen
> >> > 5 card), libpri 1.2.8 and asterisk 1.2.32.
> >> >
> >> > Having taken this particular system out of production, I updated it
> to CentOS
> >> > 6.9 32-bit, with DAHDI 2.11.1, LibPRI 1.6.0 and Asterisk 11.25.3
> (this version
> >> > of Asterisk is required at the moment due to custom modifications).
> >> > This appears to work fine.
> >> >
> >> > In order to reduce the number of different versions we support, I
> reinstalled
> >> > the OS using the 64-bit version of CentOS 6.9 instead, and rebuilt,
> using
> >> > the same versions as above.
> >> >
> >> > However, for reasons I don't understand, the 64-bit version was
> logging
> >> > frequent PRI errors every few minutes:
> >> >
> >> > [Apr  1 03:40:52] VERBOSE[8989] chan_dahdi.c: PRI Span: 2 TEI=0
> MDL-ERROR (A): Got supervisory frame with F=1 in state 7(Multi-frame
> established)
> >> > [Apr  1 03:40:58] VERBOSE[8988] chan_dahdi.c: PRI Span: 1 TEI=0
> MDL-ERROR (A): Got supervisory frame with F=1 in state 7(Multi-frame
> established)
> >> > [Apr  1 03:44:06] VERBOSE[8990] chan_dahdi.c: PRI Span: 3 TEI=0
> MDL-ERROR (A): Got supervisory frame with F=1 in state 7(Multi-frame
> established)
> >> > [Apr  1 03:46:38] VERBOSE[8990] chan_dahdi.c: PRI Span: 3 TEI=0
> MDL-ERROR (A): Got supervisory frame with F=1 in state 7(Multi-frame
> established)
> >> > [Apr  1 03:47:20] VERBOSE[8988] chan_dahdi.c: PRI Span: 1 TEI=0
> MDL-ERROR (A): Got supervisory frame with F=1 in state 7(Multi-frame
> established)
> >> > [Apr  1 03:47:24] VERBOSE[8989] chan_dahdi.c: PRI Span: 2 TEI=0
> MDL-ERROR (A): Got supervisory frame with F=1 in state 7(Multi-frame
> established)
> >> >
> >> > This left the PRIs in strange states - trying to make a call failed
> with cause 101.
> >> >
> >> > So I re-installed the 32-bit OS again, and rebuilt, and the above
> MDL-ERRORs
> >> > were no longer present, and the system operated normally again.
> >> >
> >> > So my question is: does anyone have any clues why there would be a
> difference
> >> > in PRI behaviour between 32-bit and 64-bit builds? Has anyone else
> run into
> >> > anything similar?
> >>
> >>
> >> That does seem quite odd.  If I remember right, those messages would
> >> come up if it looked like the other end hadn't received a message when
> >> it thought it should have.  I can't think of anything that would
> >> particularly impact 64 bit systems versus 32 bit systems in that
> >> domain (ISDN real time message timing, etc).  Are you sure there's
> >> nothing else different (kernel version or something else like that)?
> >> Maybe also run a patlooptest on the spans in question to make sure
> >> that they're running cleanly.
> >
> > Hi Matt, thanks for the reply.
> >
> > Both the 32-bit and 64-bit were fresh installs of the latest CentOS 6.9
> from
> > online repositories using a kickstart build. I'm going to try installing
> the
> > 64-bit version again tomorrow to see if the problem re-appears, just to
> be
> > certain it wasn't anything transient. I don't think there is anything
> unclean
> > about the spans, because they were running fine on CentOS 4 with the
> versions
> > I mentioned, and are now running well again with 32-bit CentOS 6.
>

The libpri makefile doesn't install things for 64 bit systems in the right
place [1]
without your help.  You'll need to specify where to install the library on
the
command line for your system:

sudo make install libdir=/usr/lib64


Richard

[1] https://issues.asterisk.org/jira/browse/PRI-100
-- 
_
-- 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] Which CDR processing for high load ?

2018-02-22 Thread Richard Mudgett
On Thu, Feb 22, 2018 at 3:23 PM, Olivier  wrote:

>
> 1. Would say CDR_ODBC has a greater chance than CDR_CUSTOM (if I may call
> them both as such) to become a bottleneck under pressure ?
>

I don't know.  The cdr_custom back end appends CSV records to the end of a
text file you specify.  The cdr_odbc back end sends the records to a
database.


> 2. I didn't know about batch mode existence. Thanks for presenting it.
> In such batch mode, where are stored CDRs before being written to files or
> database ? Does it also apply to data later found in cdr-scv/Master.csv
> file ?
>

Before CDRs get written to the back ends (i.e., permanent storage) they are
in memory data structures.  Where else could they be before getting written
to the back ends?

Richard
-- 
_
-- 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] Which CDR processing for high load ?

2018-02-22 Thread Richard Mudgett
On Thu, Feb 22, 2018 at 5:23 AM, Olivier  wrote:

> Hello,
>
> I'm load testing a new Asterisk 13 system (Debian  Stretch, packaged
> asterisk).
> One system writes CDR though an ODBC connection to a local Postgres
> database over the LAN.
>
>
> When sending 50 new calls per second with SIPp, I'm seeing one system
> outputs :
> taskprocessor.c: The 'subm:cdr_engine-0003' task processor queue
> reached 5000 scheduled tasks again.
>
> This [1] thread mentions such limit.
>
> I was thinking of simply writing CDR entries to a local file before
> centralizing them into my database.
>
> What would you suggest on this topic ?
>

You should get better CDR performance enabling batch mode which is disabled
by default for legacy reasons.

The CDR code processes all call events in one thread to create CDRs.  This
thread is what processes the
'subm:cdr_engine-0003' task processor queue you mention above.  If you
don't have batch mode enabled
then that same thread also has to immediately write the CDRs to each back
end configured.  If you do have
batch mode enabled then the CDRs are passed to another thread to write to
the back ends.

You need to be using at least v13.19.1 or v15.2.1 to also have some CDR
performance enhancements to
help CDR processing of call events.

For information about ODBC connection pooling performance problems see [2].

Richard

[2] http://blogs.asterisk.org/2016/06/15/asterisk-odbc-connections/


>
>
> Best regards
>
> [1] http://lists.digium.com/pipermail/asterisk-dev/2016-June/075607.html
>
> --
> _
> -- 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] pjsip trunking configuration issue

2018-02-08 Thread Richard Mudgett
On Thu, Feb 8, 2018 at 1:53 AM, Kevin Long 
wrote:

>
>
> Greetings !
>
>
> My goal is to get Twilio trunking working, and with TLS/SRTP.
>
> I see this concerning message in my log:
>
> [Feb  7 16:50:26] ERROR[20596] res_sorcery_config.c: Could not create an
> object of type 'endpoint' with id ’twilio' from configuration file
> ‘pjsip.conf’
>
>
>
> Thus, ‘pjsip show endpoints’  does not show the endpoint for the Twilio
> trunk.
>
>
> Hoping for a sanity check of my pjsip.conf file, and what could be causing
> this.
>
> A test call form Twilio’s system hits the PBX (over TLS), but always says
> “No matching endpoint found” in the asterisk log.
>
>
>
> pjsip.conf
>
> [transport-tls]
> type = transport
> protocol = tls
> bind = 0.0.0.0:5061
> cert_file=cert_file
> priv_key_file=key_file
> method=tlsv1
> external_media_address=X.Y.Z.D
> external_signaling_address=X.Y.Z.D
> verify_client=no
> verify_server=no
> allow_reload=yes
>
> [twilio](!)
> type=endpoint
> transport=transport-tls
> context=from-twilio
> disallow=all
> allow=ulaw
> dtmf_mode=inband
> media_encryption=sdes
> rtp_symmetric=yes
> rewrite_contact=yes
> force_rport=yes
> canreinvite=no
>

canreinvite has been replaced by directmedia in chan_sip's config
file for at least a decade.  It has never existed for chan_pjsip.  For
chan_pjsip it is direct_media.


> tlsdontverifyserver=yes
>

>
> [auth-out](!)
> type=auth
> auth_type=userpass
>
> [twilio]
> aors=twilio-aors
>

This section looks like you are trying to actually create the twilo
endpoint but
you need to include the twilo template you defined earlier: [twilo](twilo).
It would
be better if you actually gave the twilo template a different name.


>
> [twilio-aors]
> type=aor
> contact=sips:trunkname.pstn.twilio.com:5061 ;tried with sip: also
>
> [twilio]
> type=identify
> endpoint=twilio
> match=54.172.60.0
> match=54.172.60.1
> match=54.172.60.2
> match=54.172.60.3
>
> [endpoint-basic](!)
> type=endpoint
> transport=transport-tls
> context=from-phones
> disallow=all
> allow=ulaw
>
> [auth-userpass](!)
> type=auth
> auth_type=userpass
>
> [aor-single-reg](!)
> type=aor
> max_contacts=20
>
> [1001](endpoint-basic)
> auth=auth1001
> aors=1001
>
> [auth1001](auth-userpass)
> password=password123
> username=1001
>
> [1001](aor-single-reg)
>
>
> Extensions.conf
>
> [from-twilio]
> exten => _+1NX,1,Dial(PJSIP/1001)
>
> [from-phones]
> exten => _NXXNXX,1,Set(CALLERID(all)="David" <78451234>)
> same => n,Dial(PJSIP/+1${EXTEN}@twilio)
>

You might want to look over config file common syntax [1] and template
usage [2].
You might also want to look over pjsip configuration [3].

Richard

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+Configuration+Files
[2] https://wiki.asterisk.org/wiki/display/AST/Templates
[3]
https://wiki.asterisk.org/wiki/display/AST/PJSIP+Configuration+Sections+and+Relationships
-- 
_
-- 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] Running on virtual machine and audio not intelligable

2018-01-24 Thread Richard Mudgett
On Wed, Jan 24, 2018 at 7:55 PM, Jerry Geis  wrote:

> >why load or even install dahdi if no cards are used?
>
> I thought dahdi was needed for a timing source. Doesn't ConfBridge need a
> timing source?
>

DAHDI is required for MeetMe to do the audio mixing.  ConfBridge does not
need DAHDI since
it does its own mixing in Asterisk.

As for timing sources you have several to choose from of which DAHDI is one
of them.  See
menuselect res_timing_xxx modules.  Timing is really only needed when
playing back sound
prompts when nothing is being received.

Richard
-- 
_
-- 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] asterisk not transcoding on a re-invite codec change

2018-01-23 Thread Richard Robson
I have an old setup based in Asterisk 1.8. The carrier is accepting Ulaw in
the initial invite, but immediately the call is established they send a
re-invite to change to Alaw. This doesn't get transcoded and the user gets
no audio from after the re-invite

 

Is/was this a problem for asterisk changing the codec and transcoding during
the call? The user is only offering ulaw.

 

Regards,

 

rik

-- 
_
-- 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] Confbridge GUI?

2018-01-18 Thread Richard Kenner
> >> If you can provide details, even vague ones, about how you did it, I
> >> can update the WMM package.
> > 
> > See http://asterisk.gnat.com/meetme.tgz 
> > 
> > That's a gzipped tar of our working directory plus the relevant parts of
> > extensions.conf.  I xxx'ed out phone numbers and Google interface data.
> 
> The above tarball appears to be no longer available.

Sorry.  That machine was moved to new hardware and I forgot that I'd
put that out there.  It's there again. I hope it's useful, and I'll help
if I can, but it's not something I can "support".

-- 
_
-- 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] asterisk queues in off-hook mode ?

2017-12-19 Thread Richard Mudgett
On Tue, Dec 19, 2017 at 2:56 PM, Khalil Khamlichi <
khamlichi.kha...@gmail.com> wrote:

> Hi,
>
> I am looking to configure asterisk queues in off-hook mode, that is,
> the agent calls into the system and stays connected to this call, when
> new customer calls, he is redirected to the queue which should
> distribute to connected agents.  is this possible on teh actual
> app_queue or we would need to implement it using ARI.
>
> Thanks in advance.
>

You need to use app_queue[1] with app_agent_pool[2][3][4] for your agents.

Richard

[1] https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue
[2]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_AgentRequest
[3]
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_AgentLogin
[4]
http://blogs.asterisk.org/2016/02/10/converting-from-chan_agent-to-app_agent_pool/
-- 
_
-- 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] How can I check backtrace files ?

2017-12-06 Thread Richard Mudgett
On Wed, Dec 6, 2017 at 12:13 PM, Olivier  wrote:

>
>
> 2017-12-06 15:52 GMT+01:00 George Joseph :
>
>>
>>
>> On Tue, Dec 5, 2017 at 9:20 AM, Olivier  wrote:
>>
>>> Hello,
>>>
>>> I carefully read [1] which details how backtrace files can be produced.
>>>
>>> Maybe this seems natural to some, but how can I go one step futher, and
>>> check that produced XXX-thread1.txt, XXX-brief.txt, ... files are OK ?
>>>
>>> In other words, where can I find an example on how to use one of those
>>> files and check by myself, that if a system ever fails, I won't have to
>>> wait for another failure to provide required data to support teams ?
>>>
>>
>> It's a great question but I could spend a week answering it and not
>> scratch the surface. :)
>>
>
> Thanks very much for trying, anyway ;-)
>
>
>>  It's not a straightforward thing unless you know the code in question.
>> The most common is a segmentation fault (segfault or SEGV).
>>
>
> True ! I experienced segfaults lately and I could not configure the
> platform I used then (Debian Jessie) to produce core files in a directory
> Asterisk can write into.
> Now, with Debian Stretch, I can produce core file at will (with a kill -s
> SIGSEGV ).
> I checked ast_coredumped worked OK as it produced thread.txt files and so
> on.
>
> Ideally, I would like to go one step further: check now that a future .txt
> file would be "workable" (and not "you should have compiled with option XXX
> or configured with option YYY) .
>
>
>
>>   In that case, the thread1.txt file is the place to start.  Since most
>> of the objects passed around are really pointers to objects, the most
>> obvious cause would be a 0x0 for a value.  So for instance "chan=0x0".
>> That would be a pointer to a channel object that was not set when it
>> probably should have been.  Unfortunately, it's not only 0x0 that could
>> cause a segv.   Anytime a program tries to access memory it doesn't own,
>> that signal is raised.  So let's say there a 256 byte buffer which the
>> process owns.  If there's a bug somewhere that causes the program to try
>> and access bytes beyond the end of the buffer, you MAY get a segv if that
>> process doesn't also own that memory.  If this case, the backtrace won't
>> show anything obvious because the pointers all look valid.  There probably
>> would be an index variable (i or ix, etc) that may be set to 257 but you'd
>> have to know that the buffer was only 256 bytes to realize that that was
>> the issue.
>>
>
> So, with an artificial kill -s SIGSEGV , does the bellow
> output prove I have a workable .txt files (having .txt files that let
> people find the root cause of the issue is another story as we probably can
> only hope for the best here) ?
>
>
> # head core-brief.txt
> !@!@!@! brief.txt !@!@!@!
>
>
> Thread 38 (Thread 0x7f2aa5dd0700 (LWP 992)):
> #0  pthread_cond_timedwait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/
> x86_64/pthread_cond_timedwait.S:225
> #1  0x55cdcb69ae84 in __ast_cond_timedwait (filename=0x55cdcb7d4910
> "threadpool.c", lineno=1131, func=0x55cdcb7d4ea8 <__PRETTY_FUNCTION__.8978>
> "worker_idle", cond_name=0x55cdcb7d4b7f "&worker->cond",
> mutex_name=0x55cdcb7d4b71 "&worker->lock", cond=0x7f2abc000978,
> t=0x7f2abc0009a8, abstime=0x7f2aa5dcfc30) at lock.c:668
> #2  0x55cdcb75d153 in worker_idle (worker=0x7f2abc000970) at
> threadpool.c:1131
> #3  0x55cdcb75ce61 in worker_start (arg=0x7f2abc000970) at
> threadpool.c:1022
> #4  0x55cdcb769a8c in dummy_start (data=0x7f2abc000a80) at utils.c:1238
> #5  0x7f2aeddad494 in start_thread (arg=0x7f2aa5dd0700) at
> pthread_create.c:333
>

The number one question when you supply a backtrace: Does it have symbols?

So yes, the sample above is at least workable.  It has symbols as it shows
the function
name, source file name, and line number in the backtrace.  Without symbols
nobody can
look at the backtrace and see what is going on.  It is just a bunch of
numbers and question
marks (??) with maybe a public function name.

The second question:  Is the backtrace from an unoptimized build?

Optimized builds provide some performance improvement for normal
operation.  However,
what the compiler does to the code can be difficult to figure out in a
backtrace.  The compiler
can optimize out variables that could make understanding what is going on
harder.

So it depends upon what happened if an optimized backtrace can help find
the root cause
or not.  It is up to you whether 

Re: [asterisk-users] Chan Local, Originate and slin

2017-11-22 Thread Richard Mudgett
On Wed, Nov 22, 2017 at 12:38 PM, Kseniya Blashchuk 
wrote:

> Again - when Originate is run from dialplan, i get:
>
> NativeFormats: (slin192)
> WriteFormat: slin
>  ReadFormat: slin192
>  WriteTranscode: Yes (slin@8000)->(slin@192000)
>   ReadTranscode: No
>
> When it's made with a call file (no matter how a call file is created), I
> see
>
> NativeFormats: (slin)
> WriteFormat: slin
>  ReadFormat: slin
>  WriteTranscode: No
>   ReadTranscode: No
>
> Please note - I do not use any manager API
> Can anybody explain how the native format is chosen in these cases?
>
Version 13.1 is a very old version of Asterisk 13.  The current version of
Asterisk 13 is 13.18.2.
I also recall an issue where local channels tended to use slin192 when
there was no need.  However,
I'm unable to find the issue to know when that was done.

Richard
-- 
_
-- 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] How to correctly set REDIRECTING to indicate diversion reason

2017-11-21 Thread Richard Mudgett
On Tue, Nov 21, 2017 at 5:04 AM, Benoit Panizzon 
wrote:

> Hi Richard
>
> Thank you
>
> > You need to set more redirecting information [1].
> >
> > In sip.conf send_diversion=yes needs to be in effect.  You also need
> > to setup
> > the from party id information (at least the from number) to indicate
> > where you
> > are redirecting from.  You should also increment the redirecting
> > count.
> >
> > Richard
> >
> > [1]
> > https://wiki.asterisk.org/wiki/display/AST/Manipulating+
> Party+ID+Information
>
> I'm back to chan_sip to get quicker progress in our test scenario as I
> know this better than pjsip :-)
>
> send_diversion=yes is the default if it is not set, so that's correctly
> set.
>
> I altered my test dialplan and got some success but also another weird
> problem now:
>
> exten => XX,1,NoOp(Call to ${EXTEN} from ${CALLERID(all)})
> exten => XX,n,Progress
> exten => XX,n,Ringing
> exten => XX,n,Wait(10)
> exten => XX,n,set(REDIRECTING(from-num)=${EXTEN})
>

You need to use the 'i' option of REDIRECTING here as described in the
manipulating
party id wiki page.


> exten => XX,n,set(REDIRECTING(reason)=cfnr)
> exten => XX,n,Transfer(SIP/ZZ)
>
> How everytime REDIRECTING is called, this causes a 181 call is being
> forwarded to the caller, but containing no diversion information.
>
> The Transfer (302 Moved Temporarily) contains two Diversion: headers,
> one with reason=unknown and one with reason=no-answer which would be the
> correct one.
>
> I start to think I stumbled over a bug. Maybe using REDIRECTING() would
> set the correct headers if I used DIAL to forward the call. But I don't
> want to create a second call leg. So maybe Transfer already is setting
> a Diversion: header with hardcoded reason 'unknown'.
>

That could be possible and would be a bug in chan_sip.

Richard
-- 
_
-- 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] How to correctly set REDIRECTING to indicate diversion reason

2017-11-20 Thread Richard Mudgett
On Mon, Nov 20, 2017 at 8:43 AM, Benoit Panizzon 
wrote:

> Hello List
>
> Next question where google did not spit out an unsable answer.
>
> When redirecting a call with Transfer, I would like to correctly
> indicate the reason.
>
> I did try this:
>
> exten => XX,1,NoOp(Call to ${EXTEN} from ${CALLERID(all)})
> exten => XX,n,Dial(SIP/ZZ)
> exten => XX,n,set(REDIRECTING(reason)=cfb)
> exten => XX,n,Transfer(SIP/YY)
>
> I did try with 'reason' 'orig-reason' I added cfb with and only quotes,
> I did try cfnr.
>
> But the 302 message generated this way allways contains reason=unknown
> in the diversion header.
>
> Any hint welcome.
>

You need to set more redirecting information [1].

In sip.conf send_diversion=yes needs to be in effect.  You also need to
setup
the from party id information (at least the from number) to indicate where
you
are redirecting from.  You should also increment the redirecting count.

chan_pjsip has the same requirements.  pjsip.conf send_diversion=yes needs
to
be in effect and you also need to setup the from party id information.

Richard

[1]
https://wiki.asterisk.org/wiki/display/AST/Manipulating+Party+ID+Information
-- 
_
-- 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] Ringing (180) no SDP to progress(183) with SDP transition => no audio.

2017-11-20 Thread Richard Mudgett
On Mon, Nov 20, 2017 at 7:31 AM, Benoit Panizzon 
wrote:

> Dear List
>
> I am testing various early audio scenarios with different voice IC's,
> phones and pbxes.
>
> In Switzerland, when you operate a value added number, you have to
> announce the price of the call, usually in early audio, before the call
> is established.
>
> In 'dialplan' terms this would be:
>
> exten => XX,1,Ringing
> exten => XX,n,Wait(15)
> exten => XX,n,Progress
> exten => XX,n,Playback(price-announce,noanswer)
> exten => XX,n,Wait(5)
> exten => XX,n,Answer
>
> I see the asterisk playing the early announcement audio in the rtp
> stream. Some devices (arris EMTA) calling the asterisk also do play it
> to the caller.
>
> But!
>
> Most other devices I have tested just keep playing the locally generated
> ringtone despite getting an 183 with SDP and the announcement is never
> to be heard by the caller.
>
> If I do to force inband ringback tone, this works with all devices I
> have tested so far.
>
> exten => XX,1,Progress
> exten => XX,n,Ringing
> exten => XX,n,Wait(15)
> exten => XX,n,Playback(price-announce,noanswer)
> exten => XX,n,Wait(5)
> exten => XX,n,Answer
>
> Is anything wrong with the transition of ringing without SDP (to have
> the local device generating ringback tone) and then start sending early
> audio with 183?
>

Both orderings of Ringing and Progress are valid.  It is up to the calling
device to handle it.  As you have seen, there is quite a difference in
how devices handle it.  I have even seen where the calling device needs
Ringing before Progress to handle the call correctly.  I think that case was
because the device was converting ISDN to SIP.  I do think that the devices
that don't stop local ringback in favor of the incoming RTP stream following
the 183 are broken.  Unfortunately it is something that is out of your
control.

Richard
-- 
_
-- 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] PJSIP console messages with Zoiper

2017-11-06 Thread Richard Mudgett
On Sun, Nov 5, 2017 at 10:11 PM, Brian Capouch  wrote:

> I'm running Asterisk 15.1.0 and in the process of converting my
> various SIP endpoints to use PJSIP.
>
> My Zoiper client causes the messages quoted below to show up on the
> CLI once per minute.  Things seem to work OK, but I am curious because
> there seems to be no way to suppress the messages, and there are three
> per minute, clogging up the console.
>

Your console has the verbose level set to 3 or higher so you have asked to
see them.  Setting the verbose level to 1 will suppress them on the console.

Richard
-- 
_
-- 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] Return without Gosub: stack is empty

2017-11-02 Thread Richard Mudgett
On Thu, Nov 2, 2017 at 1:25 PM, Dmitriy Serov  wrote:

> [sub-out-do-dial]
> exten => s,1,NoOp(Dial)
>  same => n,NoOp(FirstChannel: ${CHANNEL})
>  same => n,Dial(,60,gF)
>  same => n,NoOp(SecondChannel: ${CHANNEL})
>  same => n,Return()
>
> [some]
> exten => s,1,GoSub(sub-out-do-dial,s,1)
>
> In case of the destination channel hangs up in log i see:
> ERROR[26570][C-00e7] app_stack.c: Return without Gosub: stack is empty
>

I think you mean if the calling channel hangs up you get the error message.


>
> Yes. SecondChannel != FirstChannel.
> Is it a wrong way to use Dial(g)+Gosub? Or any Dial in sub?
>

The first channel (calling party) knows about being in the subroutine.  It
was the
channel executing dialplan to get into the subroutine.  Use of the g option
with this
dialplan is OK as the calling channel knows where the subroutine was called
from.

The second channel (called party) knows nothing about being in a subroutine
so it
cannot return from one.  It has not executed any dialplan before.  The F
option simply
tells it to start executing dialplan at the priority after the dial
application.  This dialplan
needs to be able to distinguish between the two channels and act
accordingly.  Using
the F() option with a dialplan location is the simplest way to distinguish
between the
two channels.

Richard
-- 
_
-- 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] Confbridge GUI?

2017-10-17 Thread Richard Kenner
> If you can provide details, even vague ones, about how you did it, I
> can update the WMM package.

See http://asterisk.gnat.com/meetme.tgz 

That's a gzipped tar of our working directory plus the relevant parts of
extensions.conf.  I xxx'ed out phone numbers and Google interface data.

This should help.  I hope it's useful.

-- 
_
-- 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] Confbridge GUI?

2017-10-13 Thread Richard Kenner
>  I have a very old server that is used only for conferences on 
> Meetme.  To manage the conference rooms we use Web Meetme.  Now it is 
> time to upgrade everything but since Meetme is no longer available I 
> need to find a replacement GUI to manage the conference rooms.  Anyone 
> know a solution that works with Confbridge?  

It's straightforward to use web-meetme with Confbridge; we've been doing
it here for years.

-- 
_
-- 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] Gerrit usage?

2017-09-29 Thread Richard Mudgett
On Fri, Sep 29, 2017 at 10:16 AM, Daniel Tryba  wrote:

> I'm trying to figure out how to commit some code for review. Following:
> https://wiki.asterisk.org/wiki/display/AST/Gerrit+Usage
>
> Created a ssh alias.
> Cloned using: "git clone ssh://asterisk/asterisk"
> Set name and email.
> Installed the gerrit commit hook: "git review -s"
> Try to change to asterisk 13 for creating a patch: "git checkout 13"
> This fails with:
> error: pathspec '13' did not match any file(s) known to git.
>
>
> "git checkout -b 13" appears to fix this.
>
> Created a new branch:
> git checkout -b ASTERISK-27284
>
> Did some work, added and commited this work. So far so good.
>
> Now trying to submit this: "git review 13"
> Fails with:
>
> >Errors running git rebase -p -i remotes/gerrit/13
> >error: could not apply 5760526... Update UPGRADE.txt for 13 branch
> >
> >When you have resolved this problem, run "git rebase --continue".
> >If you prefer to skip this patch, run "git rebase --skip" instead.
> >To check out the original branch and stop rebasing, run "git rebase
> >--abort".
> >Could not pick 5760526f69ad02189c8e385e2e974be4cba11b6e
> >It is likely that your change has a merge conflict. You may resolve it
> >in the working tree now as described above and then run 'git review'
> >again, or if you do not want to resolve it yet (note that the change can
> >not merge until the conflict is resolved) you may run 'git rebase
> >--abort' then 'git review -R' to upload the change without rebasing.
>
>
> Somehow some way, UPGRADE.txt and UPGRADE-13.txt are changed and I can't
> find any way to discard/ignore/remove/skip these changes. Clearly I
> don't understand git and the way it handles conflicts it created by
> itself.
>
> What is going wrong? What is the magical git command to just commit the
> 2 files I added/commited for review?
>

>From the information you provided in your email, what I suspect happened is
you
simply cloned the Asterisk git repository.  By default the current branch
is the master
branch.  You then did a "git checkout -b 13" which creates a local branch
called "13"
based off of the currently checked out "master" branch.  This "13" branch
is just
another branch of master and not a real 13 branch.  When you tried to put
it up for review
to the real 13 branch using "git review 13", git tried to merge your master
"13" branch
onto the real 13 branch and failed because of conflicts.

Richard
-- 
_
-- 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] Interpreting pjsip.conf

2017-09-17 Thread Richard Mudgett
On Sat, Sep 16, 2017 at 7:03 PM, Michelle Dupuis  wrote:

> I am looking at the pjsip.conf file shipped with asterisk, and trying to
> understand it.  For example, there are 3 transport-X sections as noted
> below.  Does this mean I could uncomment all 3?  Must I uncomment 1?  Is
> the -X portion of [transport-X] arbitrary?
>
>
>
> ; Basic UDP transport
> ;
> ;[transport-udp]
> ;type=transport
> ;protocol=udp;udp,tcp,tls,ws,wss
> ;bind=0.0.0.0
>
> ; UDP transport behind NAT
> ;
> ;[transport-udp-nat]
> ;type=transport
> ;protocol=udp
> ;bind=0.0.0.0
> ;localnet=192.0.2.0/24
> ;external_media_address=203.0.113.1
> ;external_signaling_address=203.0.113.1
>
> ; Basic IPv6 UDP transport
> ;
> ;[transport-udp-ipv6]
> ;type=transport
> ;protocol=udp
> ;bind=::
>

The sample pjsip.conf file provides samples and minimal option
descriptions.  For more documentation on pjsip please see the wiki [1].  A
fictitious example company [2] is documented showing how that company could
setup Asterisk.

As to your questions:
* You need to have at least one transport section to tell pjsip how to send
and receive SIP messages.  The provided samples may or may not apply to
your particular network.
* The name of a transport section is completely arbitrary.  What makes it a
transport section is the "type=transport" line.

[1] https://wiki.asterisk.org/wiki/display/AST/Configuring+res_pjsip
[2] https://wiki.asterisk.org/wiki/display/AST/Super+Awesome+Company

Richard
-- 
_
-- 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] ERROR during high volume MoH dialplan

2017-08-31 Thread Richard Mudgett
On Thu, Aug 31, 2017 at 11:15 AM, Joseph Smith 
wrote:

> Is there any more information I can provide to give insight to these
> errors?
>
> Any further advice on avoiding these during high call volume?
>
>
> I was hoping Asterisk would handle more than 4k simultaneous calls.
>

* There is no user configurable option to change the excessive ref count
trigger value.  However, you could change the EXCESSIVE_REF_COUNT define
value in the main/astobj2.c file and recompile.

Richard
-- 
_
-- 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] Odd audio issue with video conference

2017-08-30 Thread Richard Kenner
We're experimenting with using Asterisk (14.6.0) for video conferences.
This test has three endpoints, a Polycom Trio with its video accessory,
and two desktops running Linphone.  The video is all H.264.  We're using
Opus for audio on the Linphone Windows desktops and have tried both
G.722 and Siren14 on the Polycom.

When we have a two-party conference, everything works fine.  But when
we add a third party, it gets odd.  The two Linphone users can hear
each other just fine and the Polycom user can hear the Linphone users
fine, but when the Polycom user starts talking, all is OK for about
four seconds, then it gets replaced by a hiss for the rest of the period
of talking, then goes back to being OK and repeats.

This is peculiar.  It doesn't sound like an Asterisk bridge issue because
it only happens for one particular participant, but it's hard to see
how it can be a Polycom issue since it can't tell between two and three
participants.

Does anybody have any ideas here about what to try next to see if we can
diagnose this?

-- 
_
-- 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] Bug in main/bridge.c:ast_bridge_update_talker_src_video_mode

2017-08-28 Thread Richard Mudgett
On Mon, Aug 28, 2017 at 6:35 PM, Richard Kenner  wrote:

> I've had two Asterisk crashes today that seem to be caused by errors
> where chan->tech_pvt is pointing to something that can't be deallocated
> and I think I see a reference count bug in the above function.
>
> It contains:
>
> if (data->chan_old_vsrc) {
> ast_channel_unref(data->chan_old_vsrc);
> }
>
> Shouldn't this also have:
>
> data->chan_old_vsrc = NULL;
>
> It seems to me that if it doesn't and the next condition also isn't
> true, then the next time this same code is executed, it'll decrement
> the reference count of the old channel again, which is wrong since it
> hasn't been decremented.
>

Yes, doing that would be a good thing.  What you point out does leave a
dangling
channel pointer in data->chan_old_vsrc if the pointer is not set to NULL.
Please
create an issue for the dangling pointer.  The patch needs to be done for
v13+.

Richard
-- 
_
-- 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] Bug in main/bridge.c:ast_bridge_update_talker_src_video_mode

2017-08-28 Thread Richard Kenner
I've had two Asterisk crashes today that seem to be caused by errors
where chan->tech_pvt is pointing to something that can't be deallocated
and I think I see a reference count bug in the above function.

It contains:

if (data->chan_old_vsrc) {
ast_channel_unref(data->chan_old_vsrc);
}

Shouldn't this also have:

data->chan_old_vsrc = NULL;

It seems to me that if it doesn't and the next condition also isn't
true, then the next time this same code is executed, it'll decrement
the reference count of the old channel again, which is wrong since it
hasn't been decremented.

What am I missing?

-- 
_
-- 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] ERROR during high volume MoH dialplan

2017-08-28 Thread Richard Mudgett
On Mon, Aug 28, 2017 at 1:04 PM, Joseph Smith 
wrote:

> Hello,
>
> I've recently setup a small load test against an instance of Asterisks.
> I've tested on asterisk 13.5 and 14.6 with the same results.
>
I think you mean 13.15.0 as the excessive ref count trap is not in 13.5.0.

> I am using PJSIP.  My dial plan is,
>
> [test]
>
> exten => 1001,1,Answer
>
> exten => 1001,n,MusicOnHold(15)
>
> exten => 1001,n,Hangup
>
>
> I am using SIPP to test.  I can share XML if desired but it simply waits
> on the line while music plays for 8 seconds.  I used sippycup to generate
> it with the following steps in the yaml file.
>
>
> steps:
>
>   - invite
>
>   - wait_for_answer
>
>   - ack_answer
>
>   - sleep 8
>
>   - send_bye
>
>
> At around 500 calls per second I begin to see the following ERRORs,
>
>
> [Aug 28 17:46:14] ERROR[26150][C-5594]: frame.c:343 ast_frdup:
> Excessive refcount 10 reached on ao2 object 0x26bffc0
>
> [Aug 28 17:46:14] ERROR[26150][C-5594]: frame.c:343 ast_frdup: FRACK!,
> Failed assertion Excessive refcount 10 reached on ao2 object 0x26bffc0
> (0)
>
> Got 19 backtrace records
>
> #0: [0x45d229] /usr/sbin/asterisk(__ao2_ref+0x1a9) [0x45d229]
>
> #1: [0x526ce6] /usr/sbin/asterisk(ast_frdup+0x116) [0x526ce6]
>
> #2: [0x5fa616] /usr/sbin/asterisk(ast_translate+0x306) [0x5fa616]
>
> #3: [0x4bf16b] /usr/sbin/asterisk(ast_write+0x104b) [0x4bf16b]
>
> #4: [0x7efeb578230b] /usr/lib/asterisk/modules/res_musiconhold.so(+0x430b)
> [0x7efeb578230b]
>
> #5: [0x4b5b52] /usr/sbin/asterisk() [0x4b5b52]
>
> #6: [0x4c259c] /usr/sbin/asterisk() [0x4c259c]
>
> #7: [0x4c4a45] /usr/sbin/asterisk() [0x4c4a45]
>
> #8: [0x7efeb578478d] /usr/lib/asterisk/modules/res_musiconhold.so(+0x678d)
> [0x7efeb578478d]
>
> #9: [0x58ec79] /usr/sbin/asterisk(pbx_exec+0xb9) [0x58ec79]
>
> #10: [0x582e84] /usr/sbin/asterisk() [0x582e84]
>
> #11: [0x584e7c] /usr/sbin/asterisk() [0x584e7c]
>
> #12: [0x5863fb] /usr/sbin/asterisk() [0x5863fb]
>
> #13: [0x60002a] /usr/sbin/asterisk() [0x60002a]
>
>
This inline backtrace would be more useful if you had BETTER_BACKTRACES
enabled.


>
> I've also seen similar behavior when using playback instead of
> MusicOnHold.  CPU usage gets around 50%.  Can anyone enlighten me on the
> meaning and cause of the error?  Is there some steps (config etc) that can
> be taken to alleviate the issue?
>

This particular FRACK is meant to help find ao2 object reference leaks.  It
acts as an early warning for excessive references to any particular ao2
object used in the code.  The FRACK itself is benign.  Based upon the
inline backtrace the ao2 object is likely to be a codec format.

* What codecs are you using in this setup?

* With 500 calls/sec and the calls lasting 8 seconds that comes to 4000
active channels.  Hitting the FRACK would result in an average of 25
references to the format per channel.  This is a simplistic calculation as
there are going to be some references that have nothing to do with a call.
The number of base references would depend upon which codec is involved.

* There is no user configurable option to change the excessive ref count
trigger value.  However, you could change the EXCESSIVE_REF_COUNT define
value in the main/astobj2.c file and recompile.

Richard
-- 
_
-- 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] Detecting DoS attacks via SIP

2017-08-15 Thread Richard Mudgett
On Tue, Aug 15, 2017 at 2:37 PM, mdiehl  wrote:

> Hi all,
>
> Lately, I've seen an increase in the number of attacks against my system
> from the so-called "Friendly Scanner."  When one of these script kiddies
> targets my server, all I see for symptoms is a few of my trunks become
> lagged due to server load and a stream of messages on the console that
> resemble this:
>
> [Aug  2 20:27:50]   == Using SIP VIDEO CoS mark 6
> [Aug  2 20:27:50]   == Using SIP RTP TOS bits 24
> [Aug  2 20:27:50]   == Using SIP RTP CoS mark 5
> [Aug  2 20:32:47]   == Using SIP VIDEO TOS bits 24
> [Aug  2 20:32:47]   == Using SIP VIDEO CoS mark 6
> [Aug  2 20:32:47]   == Using SIP RTP TOS bits 24
> [Aug  2 20:32:47]   == Using SIP RTP CoS mark 5
> [Aug  2 20:34:26]   == Using SIP VIDEO TOS bits 24
> [Aug  2 20:34:26]   == Using SIP VIDEO CoS mark 6
>
>
> I have to turn on sip debugging to find out who's hitting me.  However, I
> can't just leave it on because it would kill my logging system.
>
> So, how are other people handling this?  Is there an AMI event I want
> watch for?  I watch for PeerStatus, but since there's no actual peer in the
> attack, I don't seem to get an event from AMI.
>
> Any ideas?
>

There is an AMI security class that you can use to monitor the AMI security
events.
See manager.conf.sample

Richard
-- 
_
-- 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] Asterisk 13 on old VMware ESXI 4

2017-08-02 Thread Richard Kenner
> There are certain versions of the Linux kernel that have no support
> under the older version of ESXI.  We started having issues under our
> ESXI v4 setup with RH Enterprise and vmware's response was, "It's
> not supported"

"not supported" and "does not work" are not the same thing.  ESXI
emulates specific hardware.  Most kernels will work with old hardware,
so they should work with old ESXI, though there may need to be some
configuration changes and there's always the possibility of bugs in
ESXI that weren't detected by older kernels.  But the question here
was *Asterisk*, not kernels.  User-level code has *way* fewer
dependencies.

-- 
_
-- 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] Asterisk 13 on old VMware ESXI 4

2017-08-02 Thread Richard Kenner
> The version is licensed and the customer does not want to invest on new 
> hardware/software at the moment.  If the ESXI version is too old I need 
> to give them definitive proof that the segfaults are caused by that but 
> since the old elastix has been running there for years they do not quite 
> believe it.

I wouldn't believe it either.  I'd be quite surprised if something won't
work with any ESXI version.  *Perhaps* there's a configuration issue, but
I'd be surprised about that too.

-- 
_
-- 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] MoH via AGI broken after upgrade.

2017-07-20 Thread Richard Mudgett
On Thu, Jul 20, 2017 at 11:50 AM, mdiehl  wrote:

> I recently upgraded Asterisk from 1.8.x to 13.x and am now finding that
> music on hold isn't working like it used to.
>
> It seems that even though the correct MoH class is being set, the system
> still plays the "default" music.
>
> All of my call handling is done with an AGI script.  When a call is made,
> the AGI script sets the MoH class before dialing.
>
> The log indicates that the correct class is being set:
> [Jul 18 15:14:57] -- AGI Script Executing Application:
> (SetMusicOnHold) Options: (jazz)
>
> However, when the call is placed on hold, the "default" MoH class is used:
> [Jul 18 15:15:50] -- Started music on hold, class 'default', on
> channel 'SIP/trunk-bfa9'
>
>
> My AGI script is writen in Perl.  Here is the line that does the MuH class
> setting:
>
> $agi->exec("SetMusicOnHold", $o->{musiconhold});
>
> I have verified that $o->{musiconhold} contains the name of a valid MoH
> class.
>
> Is there a different/new way to set the MoH class in version 13?
>
> Any advise would be welcome.
>

The SetMusicOnHold application was deprecated in v1.6 and removed in v13.
Use
Set(CHANNEL(musicclass)=class) instead to set the music class on the
channel.

The change was documented in the UPGRADE.txt files.

Richard
-- 
_
-- 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] Pre-Dial Handler return something like GOSUB_RESULT?

2017-07-18 Thread Richard Mudgett
On Tue, Jul 18, 2017 at 6:49 PM, John Kiniston 
wrote:

> I'm messing around with pre-dialer handlers today and running into a wall.
>
> Dial has the U option where I can execute a Gosub when the channels bridge
> and there I can set the variable GOSUB_RESULT to BUSY to make Dial act like
> the channel I called was Busy.
>

> I want to do something similar with a Pre-Dial handler but don't see a way
> I can Set a variable or return a value that will cause Dial to act like the
> channel I called was Busy?
>
> Use case:
> Endpoint 100 calls Extension 101
>
> Extension 101 has a Pre-Dial Handler that checks how many calls Endpoint
> 101 has in progress and if it's greater than X returns a Busy.
>
> Dial acts like it got a Busy back from the Endpoint, Sets DIALSTATUS and
> continues through it's dial-plan.
>
> I've tried using the BUSY() Application inside my Pre-Dial handler.
> I've tried sending BUSY back as a Value with Return() to be picked up in
> GOSUB_RETVAL
> I've tried setting DIALSTATUS to BUSY.
>
> Am I trying to use the wrong tool for the Job here?
>

Why don't you do the how many calls the endpoint has check before Dial()?
You can use the LOCK/UNLOCK functions as shown in [1] on the calling
channel pre-dial
routine to prevent reentrancy issues while doing the check.  The called
channel pre-dial
routine is only to setup the channels you have decided to dial.


>
> Related, Why can we have multiple Hangup handlers but not Pre-Dial
> handlers?
>

* There is only one dial to execute the called channel pre-dial handler
while there are many opportunities to specify hangup handlers.
* How do you think you could associate different pre-dial handlers to
different called channels?

Richard

[1]
http://blogs.asterisk.org/2017/03/29/dialplan-handler-routines-allow-customization/
-- 
_
-- 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] DMTF payload bug in 13.14.1 with pjsip and direct_media?

2017-06-29 Thread Richard Mudgett
On Thu, Jun 29, 2017 at 8:32 AM, Daniel Tryba  wrote:

> While trying to use direct_media I'm seeing RTP payload mismatches after
> succesful reinvites.
>
> Initial INVITE from endpoint A to asterisk has rfc4733 DMTF
> m=audio 35648 RTP/AVP 9 8 111 96
> a=rtpmap:96 telephone-event/8000
> a=fmtp:96 0-16
>
> From asterisk to upstream U:
> m=audio 14338 RTP/AVP 9 8 111 18 0 101
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
>
> So the payload types in the RTP streams from A and to U differ. This
> works fine when asterisk is relaying media.
>
> With direct_media=yes there are reinvites sent from asterisk to both A
> and U. The invite to A contains:
> c=IN IP4 ipaddrofU
> m=audio 33142 RTP/AVP 8 96
> a=rtpmap:96 telephone-event/8000
> a=fmtp:96 0-16
>
> And the invite to U contains:
> c=IN IP4 ipaddrofA
> m=audio 35648 RTP/AVP 9 8 111 101
> a=rtpmap:101 telephone-event/8000
> a=fmtp:101 0-16
>
> Both sides respond with a 200 OK and asterisk is not
> relaying/transcoding the media anymore. At this moment DTMF send from A
> isn't getting recognized by U, which IMHO is totally understandable
> since U doesn't know about payload 96.
>
> To me this looks like a bug in asterisk. Either asterisk should use the
> same rtp payloads for telephone-events on both call legs during inital
> callsetup or asterisk should come to the conclusion there is an
> incompatible "codec" on both legs so it shouldn't switch to direct
> media.
>
> Has anyone else seen this issue?
>

This is an old issue.  One of the latest issues is:

https://issues.asterisk.org/jira/browse/ASTERISK-25166

Richard
-- 
_
-- 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] Difference between Application Set and Function SET?

2017-06-16 Thread Richard Mudgett
On Fri, Jun 16, 2017 at 1:43 PM, Jonathan H  wrote:

> OK, thanks. That sort of makes sense. Is it case sensitive?
>

Is what case sensitive?  Function names are case sensitive.  Application
names have historically been not case sensitive.


>
> Bonus quickie while I'm here (not worth own thread) - Asterisklint
> complains that:
>
> H_PAT_NON_CANONICAL: pattern '_#' is not in the canonical form '#'
>
> for the line
>
> exten => _#,1,Goto(s,1)
>
> I'm sure I read somewhere it should be _#.
>
> Am I imagining it?!
>

You are declaring an extension line with a pattern but the pattern only has
literal characters so it really isn't a pattern.  It takes more CPU to match
than the non-pattern form and is more likely an error.

Richard

[1] https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
-- 
_
-- 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] Difference between Application Set and Function SET?

2017-06-16 Thread Richard Kenner
> It was only when I ran AsteriskLint over my dialplan that I noticed this:
> 
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Application_Set
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_SET
> 
> Hmmm, they both seem to do the same thing. Or don't they?

In some sense they do, but one's an application, meaning that it's
like a subprogram in a programming-language sense, and the other is a
function, which returns a value.

-- 
_
-- 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] Difference between Application Set and Function SET?

2017-06-16 Thread Richard Mudgett
On Fri, Jun 16, 2017 at 12:41 PM, Jonathan H  wrote:

> It was only when I ran AsteriskLint over my dialplan that I noticed this:
>
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Application_Set
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_SET
>
> Hmmm, they both seem to do the same thing. Or don't they?
>

Yes they both do the same thing which is set a channel variable.  However,
when they can be invoked is different.  The Set application can only be
invoked in dialplan.  The SET function can be invoked anywhere a function
can be invoked and not just in dialplan.

Richard
-- 
_
-- 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] Surrogate channels

2017-05-15 Thread Richard Mudgett
On Mon, May 15, 2017 at 1:21 AM, Patrick Wakano  wrote:

> Hello Asterisk list!
>
> I've been facing some scenarios in my dialplan where I see the "h"
> extension being executed for Surrogate channels.
> For me, it is kind of a mystery what these Surrogate channels are... I
> couldn't find good information about them... the source code is where I
> could find the most detailed info:
>
> /*! \brief Channel technology used to extract a channel from a running 
> application. The * channel created with this technology will be immediately 
> hung up - most external
>  * applications won't ever want to see this.
>  */
>
> It mentions "*won't ever want to see this*", so I am unsure if they are
> only internal to Asterisk core and I should not be seeing these channels
> executing my dialplan, or if indeed I will see them in my dialplan, and
> then I have to handle them somehow (even if I don't want them)
>
> Anyway, does anyone know a good explanation about these surrogate
> channels, and what is expected of them when it comes to dialplan execution?
>

The surrogate channels are replacement channels for masquerades to swap with
your target channel.  They are created to die after a masquerade has
substituted it
for the target channel.  If you are seeing them in dialplan then just let
them die
without doing anything else with them.  The target channel is off doing
whatever
caused the masquerade in the first place.

Richard
-- 
_
-- 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] CM for menuselect choices

2017-05-07 Thread Richard Kenner
> Use menuselect's command line (--enable and --disable). 

Great idea!  How would you recommend generating the set of --enable and
--disable options that differ from the default from a build that was done?

-- 
_
-- 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] CM for menuselect choices

2017-05-05 Thread Richard Kenner
> Of course, you might run into problems if the later release introduces new 
> options (or deprecates old ones) which then aren't going to be in your 
> makeopts file

That's my question: how do I reflect the changes that I made to the
defaults in a way that's not dependent on the exact set of options
that each release has?

-- 
_
-- 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] CM for menuselect choices

2017-05-05 Thread Richard Kenner
I'd like to be able to save the choices made in menuselect in a way
that they can be tracked in a CM system and applied to a later release
of Asterisk using an automated tool like Ansible.  What's the best
way to do that?

-- 
_
-- 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] ** in extensions.conf

2017-04-26 Thread Richard Mudgett
On Wed, Apr 26, 2017 at 2:28 PM, Jerry Geis  wrote:

> I just tried this in my extensions.conf
>
> exten => **,1,Noop(Testing)
> exten => **,n,Playback(demo-congrats)
>
> Did a reload... and the above does not happen.
> I created as 12 instead of the ** and that works fine.
>
> Is there anyway to get the ** to work?  I also am using a polycom phone if
> that affects things. I'm using asterisk 13.15.0
>

A ** extension should work just fine.  I expect it is the dialplan in the
polycom phone
that doesn't allow it.

Richard
-- 
_
-- 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] Crashes in jitterbuffer with framedata->timer_interval > 1000

2017-04-18 Thread Richard Kenner
I had three crashes this morning on a divide-by-zero, for example at
abstract_jb.c:1008 in 14.3.0.

Does this ring any bell to anybody?

-- 
_
-- 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] More issues with Siren14 datalen == 0 packets

2017-04-12 Thread Richard Kenner
> The feed function in slinfactory explicitly does not allow frames
> without a data payload to be added to the queue. It would have prevented
> this crash.

Ah, so the fix should really be there, righty?

> I think the underlying issue is that the data pointer is not NULL when
> it sanely should be in the codec implementation.

Note that that would still leave a bug in func_speex.c, since it checks
for neither case.

And, of course, that's not open-source, so I can't fix it.

> > Can you suggest ways of searching for other possible occurrences of
> > this bug?  These crashes are occurring during important conferences and
> > are causing significant issues.
> 
> Not really. Frames are used a lot across Asterisk, so you have to follow
> the flow based on the features in use.

I did some searches and came across one suspicious case:

In funcs/app_jack.c:queue_voice_frame

That's all I see.

-- 
_
-- 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] More issues with Siren14 datalen == 0 packets

2017-04-12 Thread Richard Kenner
> All patches need to go into JIRA with a license agreement to be
> accepted.

Understood, but I was using it as an illustration.  Note, however, that,
from a legal perspective, a patch such as this has no protectable IP (you
can't copyright the only way of doing something) and the GNU projects have
a formal rule that sufficiently-small patches need no assignments for that
reason, which I suggest you may want to adopt as well.

> > Why is samples being used as a length instead of datalen?
> 
> Internally a signed linear factory operates in terms of samples, not the
> data payload itself. I've also commented on your original issue in
> regards to the siren codecs that it should NULL out the data pointer
> itself. That is more commonly used.

But I don't think that it would have helped in either case, this one
or in func_speex.c, because neither tests for a null data pointer either.

Can you explain the difference between "datalen" and "samples" in this
context, shouldn't they always be related by a (small) linear factor?

Should I open a JIRA issue for this as well?

Can you suggest ways of searching for other possible occurrences of
this bug?  These crashes are occurring during important conferences and
are causing significant issues.

-- 
_
-- 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] More issues with Siren14 datalen == 0 packets

2017-04-12 Thread Richard Kenner
Another crash with a packet:

$10 = {frametype = AST_FRAME_VOICE, subclass = {integer = 0, 
format = 0x12c62170, frame_ending = 0}, datalen = 0, samples = 640, 
  mallocd = 1, mallocd_hdr_len = 324, offset = 64, 
  src = 0x2ad290064a08 "siren14tolin32/speex", data = {ptr = 0x80893318, 
uint32 = 2156475160, pad = "\030\063\211\200\000\000\000"}, delivery = {
tv_sec = 1492000520, tv_usec = 225198}, frame_list = {next = 0x0}, 
  flags = 0, ts = 0, len = 0, seqno = 0}

Note that datalen is zero, but samples aren't.

main/slinfactory.c near line 177 doesn't check for datalen of zero,
but copies using samples.

Fixed thusly:

*** slinfactory.c.orig  2017-02-13 15:00:19.0 -0500
--- slinfactory.c   2017-04-12 08:48:16.0 -0400
***
*** 174,178 
frame_data = frame_ptr->data.ptr;
  
!   if (frame_ptr->samples <= ineed) {
memcpy(offset, frame_data, frame_ptr->samples * 
sizeof(*offset));
sofar += frame_ptr->samples;
--- 174,180 
frame_data = frame_ptr->data.ptr;
  
!   if (frame_ptr->datalen == 0)
! ;
!   else if (frame_ptr->samples <= ineed) {
memcpy(offset, frame_data, frame_ptr->samples * 
sizeof(*offset));
sofar += frame_ptr->samples;

How many more of these cases are there going to be?

Why is samples being used as a length instead of datalen?

-- 
_
-- 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] Issues with Siren14 codec in Asterisk 14.3.0

2017-04-06 Thread Richard Kenner
> I would say this is a bug in func_speex and not in codec_siren14. This
> is because the datalen is zero. 

Ah!  So, like?

*** func_speex.c.orig   2017-02-13 15:00:19.0 -0500
--- func_speex.c2017-04-06 11:16:03.0 -0400
***
*** 185,189 
}
  
!   speex_preprocess(sdi->state, frame->data.ptr, NULL);
snprintf(source, sizeof(source), "%s/speex", frame->src);
if (frame->mallocd & AST_MALLOCD_SRC) {
--- 185,190 
}
  
!   if (frame->data.ptr && frame->datalen)
! speex_preprocess(sdi->state, frame->data.ptr, NULL);
snprintf(source, sizeof(source), "%s/speex", frame->src);
if (frame->mallocd & AST_MALLOCD_SRC) {


-- 
_
-- 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] Issues with Siren14 codec in Asterisk 14.3.0

2017-04-06 Thread Richard Kenner
I'm seeing Asterisk crashes with the following frame at func_speex.c:188:

(gdb) p *frame
$6 = {frametype = AST_FRAME_VOICE, subclass = {integer = 0, 
format = 0xe2f9e20, frame_ending = 0}, datalen = 0, samples = 640, 
  mallocd = 1, mallocd_hdr_len = 232, offset = 64, 
  src = 0x2ac07413e7f8 "siren14tolin32", data = {ptr = 0x3cab9378, 
uint32 = 1017877368, pad = "x\223\253<\000\000\000"}, delivery = {
tv_sec = 1491485582, tv_usec = 407272}, frame_list = {next = 0x0}, 
  flags = 0, ts = 0, len = 0, seqno = 0}

frame->data.ptr is an out-of-range address.

Does this ring a bell to anybody?  Without sources of the Siren14 codec,
how would you recommend we debug this?

-- 
_
-- 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] how to hangup this channel "Message/ast_msg_queu

2017-04-02 Thread Richard Mudgett
On Sat, Apr 1, 2017 at 9:56 PM, Motty Cruz  wrote:

> omega*CLI> core show channels
> Channel  Location State Application(Data)
> Message/ast_msg_queu 4002@sipphones:2 Up VoiceMail(4002@default,u)
>
> "Message/ast_msg_queu" it's been up for the last day, how to hangup this
> channel?
>

That is the special out-of-dialog SIP MESSAGE handling channel.  Its
purpose is
for dialplan to process those messages.  See the MESSAGE, and MESSAGE_DATA
dialplan functions, MessageSend application, and message_context pjsip
config option.
The channel is reused to process each message in dialplan.  It is invalid
for dialplan to
do anything with media on that channel and VoiceMail definitely falls into
that category.

Richard

https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_MessageSend
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_MESSAGE
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Function_MESSAGE_DATA
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_res_pjsip#Asterisk13Configuration_res_pjsip-endpoint_message_context
-- 
_
-- 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] Asterisk crash when playing a WAV file to G722 SIP

2017-03-31 Thread Richard Kenner
I recently upgraded to Asterisk 14.3.0.  When playing a SIP file to a
G722 SIP channel (via chan_sip), I get a crash with the following
traceback.  This is reproducable:

#0  0x0036fdc30265 in raise () from /lib64/libc.so.6
#1  0x0036fdc31d10 in abort () from /lib64/libc.so.6
#2  0x0036fdc69beb in __libc_message () from /lib64/libc.so.6
#3  0x0036fdc7174f in _int_free () from /lib64/libc.so.6
#4  0x0036fdc75a4b in free () from /lib64/libc.so.6
#5  0x0050e19e in ast_frame_free (frame=0x5c35, cache=1) at frame.c:171
#6  0x00502bac in ast_readaudio_callback (s=0x6a5df88) at file.c:921
#7  0x00502d19 in ast_fsread_audio (data=0x5c35) at file.c:952
#8  0x004bb3df in __ast_read (chan=0x7ba68f8, dropaudio=0)
at channel.c:3848
#9  0x00504e51 in waitstream_core (c=0x7ba68f8, 
breakon=0x2b9630672bdb "", forward=0x5e56f8 "", reverse=0x5e56f8 "", 
skip_ms=0, audiofd=-1, cmdfd=-1, context=0x0, cb=0) at file.c:1602
#10 0x005053bf in ast_waitstream (c=0x5c35, 
breakon=0x5fca ) at file.c:1754
#11 0x2b963067272e in playback_exec (chan=0x7ba68f8, 

Does this "ring a bell" to anyone?  It looks like frame chainin has
gotten corrupted somehow, but this should be a straightforward case.


-- 
_
-- 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] ConfBridge function slight change from 11 to 13

2017-03-29 Thread Richard Mudgett
On Wed, Mar 29, 2017 at 9:40 AM, Michaël Gaudette 
wrote:

> Hi,
>
>
>
> I have been using ConfBridge since Asterisk 11, and I recently upgraded a
> server to 13.  While everything that needed fixing seems fixed, I have an
> issue that does not seem documented anywhere.
>
>
>
> The way I used ConfBridge is that I have a standard bridge profile, user
> profile and menu that (almost) everyone uses. I call the ConfBridge this
> way:
>
>
>
> exten => s,1,Confbridge(some_id,bridge_basic,user_basic,admin_menu_basic)
>
>
>
> But, even though everyone uses the same basic config, each conference has
> a different NIP to get it. So what I USED to do is this:
>
>
>
> exten => s,1,Set(CONFBRIDGE(user,pin)=123456)
>
> exten => s,2,Confbridge(some_id,bridge_basic,user_basic,admin_menu_basic)
>
>
>
> This, as far as I could tell on Asterisk 11, meant that the user_basic
> profile was used, but whatever default PIN present in confbridge.conf was
> “overwritten” by my on-the-fly to the ConfBridge(user,pin) value
>
>
>
> Now, on Asterisk 13.14 (I don’t have an Asterisk 12 I can play with) it
> seems that the fact that I am referencing the user_basic profile in my call
> to the ConfBridge app means that whatever PIN value I put in my dial plan
> is ignore, since a user profile is present. While, before, the PIN value
> overwrote the profile value by having that defined in my dialplan.
>
>
>
> · TBH this seems the legit way to use ConfBridge The wiki says:
>
> ·
>
> · “user_profile - The user profile name from confbridge.conf.
> When left blank, a dynamically built user profile created by the CONFBRIDGE
> dialplan function is searched for on the channel and used. If no dynamic
> profile is present, the 'default_user' profile found in confbridge.conf is
> used”
>
> ·
>
> · …but it suited me better to use it the way it worked in
> Asterisk 11.
>
> Is there any way to make the channel values overwrite the profile values
> instead of be ignored by the presence of a profile in the dialplan
> application parameters? Or something that has a similar effect, i.e. an
> easy to change overall default bridge user that can be slightly modified
> through the dialplan?
>

You have to explicitly create your dynamic user profile based upon the
desired user profile
first.  Otherwise, it uses the "default_user" profile as the basis of the
dynamic profile.

; Use a non-default user profile as the basis of the dynamic user profile
exten = ,1,NoOp()
same = n,Set(CONFBRIDGE(user,template)=user_basic)
same = n,Set(CONFBRIDGE(user,pin)=123456)
same = n,ConfBridge(some_id,bridge_basic,,admin_menu_basic)

; Use the default "default_user" profile as the basis of the dynamic user
profile
exten = ,1,NoOp()
same = n,Set(CONFBRIDGE(user,pin)=123456)
same = n,ConfBridge(some_id,bridge_basic,,admin_menu_basic)

If you explicitly specify a bridge, user, or menu profile to ConfBridge
then that is what gets
used regardless of any dynamic profile you created.

See the online documentation:
core show application ConfBridge
or
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_ConfBridge

config show help app_confbridge user_profile template
or
https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Configuration_app_confbridge

Richard
-- 
_
-- 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] UniMRCP and Asterisk 14

2017-03-27 Thread Richard Kenner
> I can't speak for the MRCP guys, but from a difference perspective,
> swapping MRCP from Asterisk 13 to Asterisk 14 shouldn't be too
> difficult.  Most of the changes between the two shouldn't affect most
> people's use cases, including projects such as MRCP.  I'd definitely
> check with their discussion forums though, since it seems that they
> don't monitor the asterisk-users mailing lists.

I got it working.  It indeed wasn't much:

*** ./app-unimrcp/Makefile.in.orig  2016-07-29 19:18:09.0 -0400
--- ./app-unimrcp/Makefile.in   2017-03-26 10:43:52.0 -0400
***
*** 132,136 
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
! CFLAGS = @CFLAGS@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
--- 132,136 
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
! CFLAGS = @CFLAGS@ -DAST_MODULE_SELF_SYM=__internal_app_swift
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
*** ./app-unimrcp/app_unimrcp.c.orig2014-07-10 17:04:03.0 -0400
--- ./app-unimrcp/app_unimrcp.c 2017-03-26 10:49:12.0 -0400
***
*** 57,61 
  #include "ast_compat_defs.h"
  
! #if AST_VERSION_AT_LEAST(1,4,0)
  #define AST_COMPAT_STATIC static
  ASTERISK_FILE_VERSION(__FILE__, "$Revision: $")
--- 57,64 
  #include "ast_compat_defs.h"
  
! #if AST_VERSION_AT_LEAST(14,0,0)
! ASTERISK_REGISTER_FILE()
! #define AST_COMPAT_STATIC static
! #elif AST_VERSION_AT_LEAST(1,4,0)
  #define AST_COMPAT_STATIC static
  ASTERISK_FILE_VERSION(__FILE__, "$Revision: $")
*** ./res-speech-unimrcp/Makefile.in.orig   2016-07-29 19:18:09.0 
-0400
--- ./res-speech-unimrcp/Makefile.in2017-03-26 10:43:08.0 -0400
***
*** 130,134 
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
! CFLAGS = @CFLAGS@
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
--- 130,134 
  CC = @CC@
  CCDEPMODE = @CCDEPMODE@
! CFLAGS = @CFLAGS@ -DAST_MODULE_SELF_SYM=__internal_res_speech_unimrcp
  CPP = @CPP@
  CPPFLAGS = @CPPFLAGS@
*** ./res-speech-unimrcp/res_speech_unimrcp.c.orig  2014-12-10 
22:37:36.0 -0500
--- ./res-speech-unimrcp/res_speech_unimrcp.c   2017-03-26 11:31:10.0 
-0400
***
*** 29,33 
--- 29,41 
  
  #define AST_MODULE "res_speech_unimrcp" 
+ #if AST_VERSION_AT_LEAST(14,0,0)
+ ASTERISK_REGISTER_FILE()
+ #elif AST_VERSION_AT_LEAST(1,4,0)
+ #define AST_COMPAT_STATIC static
  ASTERISK_FILE_VERSION(__FILE__, "$Revision: $")
+ #else  /* 1.2 */
+ #define AST_MODULE_LOAD_DECLINE -1
+ #define AST_COMPAT_STATIC
+ #endif
  
  #include 

-- 
_
-- 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] UniMRCP and Asterisk 14

2017-03-23 Thread Richard Kenner
When I look at the lastest UniMRCP manual, they only mention as high as
Asterisk 13.  Does anybody know if I need to do anything to allow it
to work on Asterisk 14 and, if so, what that is?

-- 
_
-- 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] BUG or ???

2017-02-24 Thread Richard Mudgett
On Fri, Feb 24, 2017 at 3:30 PM, Антон Сацкий  wrote:

> Got a strange situation
>
> [ext-queues]
> ...
> exten => h,2,ExecIf($[${CALLERID(num)} = ' ']?Set(var29=${SHELL(curl -X
> POST --header "Content-Type: application/json" --header "Accept:
> application/json" -d "{\"Phone\": ${FROMEXTEN}, \"Source\": \"asterisk\"}" "
> http://sIte.com:80/api/v1/calls?apiKey=UABVAEI&clientId=3";)}))
>
> exten => h,3,NoOp(${var29})
> exten => h,4,Macro(hangupcall,)
> ;--== end of [ext-queues] ==--;
>
>
> so when i execute  it got
>
>
> -- Executing [h@ext-queues:1] NoOp("SIP/100-0050", "100") in new stack
> -- Executing [h@ext-queues:2] ExecIf("SIP/100-0050", "0
> ?Set(var29=[{"RequestedCount":0,"MissedCount":7,"Total":7}])") in new
> stack
> -- Executing [h@ext-queues:3] NoOp("SIP/100-0050", "") in new
> stack
> -- Executing [h@ext-queues:4] Macro("SIP/100-0050",
> "hangupcall,") in new st
>
>
> U can see  that Execif = 0 = falce   but   somehow
> Shell ${SHELL(curl -X POST --header "Content-Type: application/json"
> --header "Accept: application/json" -d "{\"Phone\": ${FROMEXTEN},
> \"Source\": \"asterisk\"}" "http://sIte.com:80/api/v1/
> calls?apiKey=UABVAEI&clientId=3")}
> executes and  get answer  from the server   [{"RequestedCount":0,"
> MissedCount":7,"Total":7}]
>

The Set isn't being executed by the ExecIf.  However the ${} substitution
containing
the SHELL is evaluated before anything else is examined.  This isn't a bug
but the
order of how things are evaluated.  You will have to do what you want
another way:

same = n,GotoIf($["${CALLERID(num)}" = ""]?skip)
same = n,Set(var29=${SHELL(...)})
same = n(skip),NoOp(${var29})

Richard
-- 
_
-- 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] Advices when Asterisk segfaults and nothing useful in logs

2017-02-17 Thread Richard Mudgett
On Fri, Feb 17, 2017 at 8:30 AM, Olivier  wrote:

>
>
> 2017-02-17 14:39 GMT+01:00 George Joseph :
>
>>
>>
>>
>> If asterisk was compiled with DEBUG_THREADS,
>>
>
> Would you then  advise to run an Asterisk server in production with
> DEBUG_THREADS enabled ?
>

No, you should not leave DEBUG_THREADS on in a normal production
environment.  Only enable it when you
are actually hunting for a deadlock.  DEBUG_THREADS causes a noticeable
drop in performance.

Richard
-- 
_
-- 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] Beep on Attended Transfer

2017-02-16 Thread Richard Mudgett
On Thu, Feb 16, 2017 at 2:02 PM, Daniel Journo  wrote:

> Hi,
>
>
>
> During an attended transfer using the SIP phone feature buttons, I’m
> getting a few complaints from recipients that they can’t tell when the call
> they are receiving has been transferred.
>
> Is there any way (even if it’s complicated) to generate a beep tone to the
> recipient of the transferred call when the transfer is completed?
>
>
>
> I know you can do this with DTMF codes but they want to use the phone’s
> transfer features.
>

Set the ATTENDED_TRANSFER_COMPLETE_SOUND channel variable to the sound
file to play on a transfer.

Richard
-- 
_
-- 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] Execution of pre-bridge handlers

2017-02-14 Thread Richard Mudgett
On Tue, Feb 14, 2017 at 6:24 AM, Patrick Wakano  wrote:

> Hello Asterisk Users,
>
> Hope you all doing fine!
> I am working with a quite complex dialplan, and I've come to some
> situations where it makes some nasty use of pre-bridge handlers.
> The pre-bridge handlers wiki (https://wiki.asterisk.org/wik
> i/display/AST/Pre-Bridge+Handlers) doesn't have the big warning the
> pre-dial one has indicating it must return and must not put the
> caller/callee in other applications (https://wiki.asterisk.org/wik
> i/display/AST/Pre-Dial+Handlers). So apparently, looks like they wouldn't
> have this restriction... However I had the feeling this was not true, so
> after some research I found this issue https://issues.asterisk.org/ji
> ra/browse/ASTERISK-25690, that says "*Connected line subroutines are
> meant** to be fast and as a result there is an expectation that
> applications invoked will not consume frames*". I am assuming that
> connected lines subroutines are just different words for pre-bridge
> handlers, right?
> Anyway my question is, what happens if I do not return straight away from
> the pre-bridge handler? Or even worst, if I execute a Dial application for
> example? Will I fall in some "undefined behaviour"?
>
> Anyone has experienced something like this?
>

There are several handler routines available and each handles situations
for the
different states of a call.  It makes no sense to use the Hangup()
application in
any of them and you must return from all of them.  Most of the handlers
operate
from within the Dial application.

Pre-dial handlers
  The purpose of these routines is to setup a channel to place a call.  The
pre-dial
  routines can be run on the calling and called channels.  See the Dial
application
  documentation.

  For the calling channel, you can do most anything to the calling channel
except
  hangup because you are still within the Dial application's control.  The
reason
  for the ability to execute a pre-dial routine on the calling channel
instead of doing
  all the setup before executing Dial is to eliminate a window of
opportunity when using
  the Lock/Unlock applications with Dial.

  For the called channel, you can only setup the channel.  At this point,
the channel
  exists but is not connected to anything nor has the call been placed.  Do
your
  channel setup and return.

Redirecting interception handlers
  This routine normally executes on the calling channel because the called
channel
  has indicated that the call is being diverted/forwarded/redirected to
somewhere
  else.  The purpose of this routine is to get the REDIRECTING party
information
  setup as you want and then return.  You do not have control of the media
nor should
  you hangup.  You also should be quick about it.

Pre-bridge handlers
  At this point the called channel has answered and all other called
channels that were
  dialed have been hung up.  The called channel is about to be bridged with
the calling
  channel.

  The purpose of this routine is to give the called person an opportunity
to decide if
  he even wants to talk to the caller.  You have control of the media
stream to the called
  party.  You cannot hangup the channel in the routine because you must
return.  If you
  want to abort bridging the call with the channel you must set a return
value as
  documented by the Dial application.  You need to remember that the caller
is
  waiting to be connected the entire time you are in this routine.

Connected-line interception handlers
  At this point the channels are bridged together and may have been talking
for awhile.

  The purpose of this routine is to get the CONNECTEDLINE party information
setup
  as you want and then return.  The bridged peer has changed identity
likely because
  of a transfer.  You do not have control of the media nor should you
hangup.  You also
  need be quick about it or you risk causing a noticeable interruption to
the media.

Hangup handlers
  At this point the channel is hungup and you should be gathering
information about
  the call for further processing later.  You should not be doing extensive
post call
  analysis at this time because you are delaying the channel technology
hangup
  sequence.  You have the same restrictions with the h extension.

Given what I have stated about pre-bridge handlers you should be able to
see that
doing a Dial in a pre-bridge handler (or any handler for that matter) is a
bad thing to
do and definitely falls into the "undefined behavior" category.

Richard
-- 
_
-- 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] pjsip asterisk 13 add time between DTMF digits

2017-02-05 Thread Richard Mudgett
On Sun, Feb 5, 2017 at 3:36 AM, Saint Michael  wrote:

> I noticed that when I dial some 7 followed by any digit, the other side
> gets confused. I would like to double the milliseconds inter-digits in
> SendDTMF(). Is there a way to change both the DTMF duration and its
> interval?
>

>From the CLI do:
core show application SendDTMF

Right there in the documentation it says you can specify the intra-tone
time and the DTMF duration.
You can also look on wiki.asterisk.org for the SendDTMF documentation.

Richard
-- 
_
-- 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] Kernel/Asterisk/DAHDI/Libpri version matrix?

2017-01-16 Thread Richard Mudgett
On Mon, Jan 16, 2017 at 11:53 AM, Steve Edwards 
wrote:

> I googled about a bit without success, so...
>
> Is there a version matrix available?
>
> Something that would say: for kernel version w, you can run up to version
> x of Asterisk, DAHDI version y, and libpri version z?
>

I don't think there is such a table.


>
> For example, I have a bunch of remote hosts running kernel 2.6.26,
> Asterisk 11.6.0, and DAHDI 2.7.0.1.
>
> We experience occasional Asterisk crashes, so I'd like to get as up to
> date as possible to see if that resolves the crashes before diving deeper.
>
> 1) What is the 'highest' versions of DAHDI and libpri that I can run with
> kernel 2.6.26 and Asterisk 11.6.0?
>
> 2) What is the highest version of Asterisk I can run with kernel 2.6.26
> and what would be the appropriate versions of DAHDI and libpri?
>

You probably would have to be using a mid-life v1.4 Asterisk or earlier
version to have
compatibility/compilation issues with the latest libpri.  Asterisk versions
v1.8 and later
are just able to take advantage of new features in libpri.  Any Asterisk
v11 version should
be able to use all of the current libpri features.

Only DAHDI would really care about the kernel version and I cannot say if
that kernel is
supported with the latest DAHDI.  The easiest way would be to try compiling
it.

Richard
-- 
_
-- 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] IMPORT from bridged Local channels not importing.

2016-12-09 Thread Richard Mudgett
On Tue, Nov 15, 2016 at 8:21 AM, Ethy H. Brito 
wrote:

>
> Hi All
>
> I have some users that can access outside world telephone number.
> They have external numbers to be reached as well.
>
> Due to internal policy restrictions, they are not allowed to dial
> each other internal numbers. I Can't change that.
>
> When an internal user dials the external number for another internal user,
> I Dial(Local/...) the second user.
>
> So I end up with two channels:
> SIP/origin to Local/dest_ext_num;1
> and
> Local/dest_ext_num;2 to SIP/destination
>
> When the call is hung up (h extension), I need to grab the stats of both
> legs (SIP/origin and SIP/destination) of the call, so I use:
>
> ${RTPAUDIOQOS}
>
> to grab the origin leg stats and
>
> Set(MyDESTCH=${CUT(CDR(dstchannel),\;,1)}\;2)
> Set(DESTCH=${IMPORT(${MyDESTCH},BRIDGEPEER)})
> Set(STATS=${IMPORT(${DESTCH},CHANNEL(rtpqos,audio,all))})
>
> to grab the stats for destination leg.
>
> MyDESTCH is correctly set to "Local/dest_ext_num;2"
> DESTCH receives "SIP/destination"
> But STATS is ""
>
> What am I missing here?
>

You cannot get information from a channel that no longer exists.
SIP/destination almost certainly no longer exists when the h exten
runs on SIP/origin.


> Is there a smarter way for grabbing these?
>

I would suggest using hangup handlers [1].  Add a hangup handler to
SIP/origin and SIP/destination.  The handler will run on the respective
channel when it hangs up.  These two channels will hang up at different
times so you can only get the current channel's information.  If you have
to process both channel's information then you are going to have to do that
after both channels have hung up.


>
> Another questions: when the call is hung, in which context is "h
> extension" run?

Always originator? Always destination? Depends on what?
> What about in this scenario I describe (four contexts involved)?
>

In your case, the h exten is run by SIP/origin and Local/dest_ext_num;2.
These
channels executed dialplan when the call was originally placed.  The h
exten runs
on the respective channel in the last context the channel executed
dialplan.  This
is usually at the Dial application.

Richard

[1] https://wiki.asterisk.org/wiki/display/AST/Hangup+Handlers
-- 
_
-- 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] What to do when changing from one asterisk version to another ?

2016-12-08 Thread Richard Mudgett
On Thu, Dec 8, 2016 at 11:38 AM, Olivier  wrote:

>
>
> 2016-12-08 18:23 GMT+01:00 Olivier :
>
>> Hello,
>>
>> I'm compiling Asterisk from source on Debian systems.
>>
>> I'm currently writing a script I'm planning to launch when upgrading from
>> one Asterisk version to another one within the same class (from 13.4.0 to
>> 13.12.0 or from 13.12.0 to 13.8.0, for instance).
>>
>> Reading [1], I thought the following would work:
>> cd /usr/src/asterisk-13.4.0
>> ./configure
>> make
>> make install
>> ...
>> cd /usr/src/asterisk-13.4.0
>> make dist-clean
>>
>> After running above commands, /usr/sbin/asterisk and
>> /usr/lib/asterisk/modules/*.so files still exist.
>> I would expect both /usr/sbin/asterisk and /usr/lib/asterisk/modules/*.so
>> filesto be removed so that if I newly installed asterisk instance wouldn't
>> inherit uncontrolled files.
>>
>> I also tried with make clean and make uninstall with the same result but
>> I may have missed some steps during my trials.
>>
>
> Correcting myself, make uninstall seems to be what I was after for
> Asterisk itself.
> I'm still searching for the equivalent make target for pjproject.
>

pjproject has a make uninstall target as well.

Since v13.8, Asterisk has a --with-pjproject-bundled option [1].  This will
configure, build,
and statically link with pjproject to give better integration with
Asterisk.  It also applies a
few backported fixes to the pjproject version used.

Richard

[1] https://wiki.asterisk.org/wiki/display/AST/Building+and+Inst
alling+Asterisk
-- 
_
-- 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] Non-global variable that follows channel?

2016-11-27 Thread Richard Mudgett
On Sun, Nov 27, 2016 at 11:13 AM, Jonathan H  wrote:

> Thanks, Richard - your code does indeed work reliably 100% of the
> time, and thank you for that explanation.
>
> I do think the docs at
> https://wiki.asterisk.org/wiki/display/AST/Asterisk+14+Function_SHARED
> could do with more clarification.
>
> BTW, there were a couple of typos in your code, so for anyone who
> wants to copy/paste, here's Richard's code WITH the curly braces  (
> Set(SHARED(sharedVar,MY_CALLER) should be
> Set(SHARED(sharedVar,${MY_CALLER}) )
>
> [svtest1]
> exten => s,1,Answer()
> same => n,Verbose(1,Answered channel:${CHANNEL})
> same => n,Set(__MY_CALLER=${CHANNEL(name)})
> same => n,Dial(Local/s@svtest2,,g)
> same => n,Verbose(1,***In channel:${CHANNEL}
> sharedVar:${SHARED(sharedVar)})
> same => n,Hangup()
>
> [svtest2]
> exten => s,1,NoOp()
> same => n,Set(SHARED(sharedVar,${MY_CALLER})="I have been set in
> svtest2 by ${CHANNEL(name)}")
> same => n,Verbose(1,***In channel:${CHANNEL} sharedVar:
> ${SHARED(sharedVar,Local/s@svtest2)})
> same => n,Answer()
> same => n,Hangup()
>
> Thanks again.
>
> (BTW, looking forward to the day when Asterisk gets some kind of
> asynchronous dialplan application - all this "dialling a local
> channel" is just to get via music on hold so there's not silence while
> a long operation happening, as per
> http://lists.digium.com/pipermail/asterisk-users/2016-November/290384.html
> :) )
>

Have you looked into ARI [1]?  I think it would be a closer fit to what you
want
to do.

Richard

[1] https://wiki.asterisk.org/wiki/pages/viewpage.action?pageId=29395573
-- 
_
-- 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] Non-global variable that follows channel?

2016-11-27 Thread Richard Mudgett
On Sun, Nov 27, 2016 at 8:07 AM, Jonathan H  wrote:

> Thanks, Max.
>
> Yes, of course, you are right, and I am an idiot because I was tired
> and putting underscores before the variable name when I read it back!
> Then I forgot to post the followup email to say I had figured it out.
>
> Now, this SHARED was not something I was aware of, but looked like an
> ideal solution to passing variables BACK from to the parent channel.
>
> However, it does not seem to be very reliable.
>
> Code:
>
> [svtest1]
> exten => s,1,Answer()
> same => n,Verbose(1,Answered channel:${CHANNEL})
> same => n,Dial(Local/s@svtest2,,g)
> same => n,Verbose(1,***In channel:${CHANNEL} sharedVar:
> ${SHARED(sharedVar,Local/s@svtest2)} )
> same => n,Hangup()
>
> [svtest2]
> exten => s,1,NoOp()
> same => n,Set(SHARED(sharedVar,Local/s@svtest2)="I have been set
> in svtest2")
> same => n,Verbose(1,***In channel:${CHANNEL} sharedVar:
> ${SHARED(sharedVar,Local/s@svtest2)})
> same => n,Answer()
> same => n,Hangup()
>

There are a few problems with the way you are trying to use SHARED
here.
1)  Dial with the g option continues in the dialplan when the called channel
hangs up and you are accessing a SHARED variable on the called channel
while it is being destroyed.  Thus it may or may not still exist when you
attempt to access it.
2) You are using local channels.  Remember local channels always come
in pairs.  The local channel name you are using to reference the SHARED
variable is ambiguous.  Not only do you not know which half of a local
channel pair you will get, you may not even get one of the local channels
the Dial created for this call if you have more than one of these calls
happening in parallel.

Executing this CLI command:
CLI> originate local/s@svtest1 application echo

Your dialplan creates this channel chain when Local/s@svtest2 executes
the Answer:

Echo() -- Local/s@svtest1-;1 -- Local/s@svtest1-;2 --
Local/s@svtest2-0001;1 -- Local/s@svtest2-0001;2 -- Answer()

These problems can be avoided if we make a couple of changes.
1) Change which channel maintains the SHARED variables to the calling
channel.
2) Pass the calling channel name to the called channel using variable
inheritance.

[svtest1]
exten = s,1,NoOp()
same = n,Answer()
same = n,Set(__MY_CALLER=${CHANNEL(name)})
same = n,Dial(Local/s@svtest2,,g)
same = n,NoOp(Returned SHARED(sharedVar) = '${SHARED(sharedVar)'}
same = n,Hangup()

[svtest2]
exten = s,1,NoOp()
exten = n,Set(SHARED(sharedVar,MY_CALLER)="I have been set in svtest2 by
${CHANNEL(name)}")
exten = n,Answer()
exten = n,Hangup()

Richard
-- 
_
-- 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] What could be stopping "Disconnect Call" feature from working (set in features.txt)

2016-11-08 Thread Richard Mudgett
On Tue, Nov 8, 2016 at 5:19 PM, Jonathan H  wrote:

> Asterisk 14.1
>
> Here's a bit of test dialplan, which works as expected and simulates
> exactly what I'm doing at the top of my large dialplan...
>
> [dial-pre-test]
> exten => s,1,NoOp()
> same => n,Set(LIMIT_PLAYAUDIO_CALLER=yes)
> same => n,Set(LIMIT_WARNING_FILE=time_limit_reached)
> same => n,Dial(Local/s@dial-test,3,L(354:6))
> same => n,Hangup()
>
> [dial-test]
> exten => s,1,NoOp()
> same => n,Dial(Local/s@dial-dest,,gH)
> same => n,Playback(goodbye)
> same => n,Hangup()
>
> [dial-dest]
> exten => s,1,Answer()
> same => n,MusicOnHold()
> same => n,Hangup()
>
> See what I'm doing here? I'm using a little fiddle to allow the caller
> to stop listening to music on hold. And it works. the gH means
> that the caller can hang up the remote end. Great!
>
> BUT I have a large dialplan, and something, somehow, somewhere, is
> messing with "Disconnect Call".
>
> Because once through, nothing, not even star, does anything. It's like
> the receiving end (dial-dest in the example above) has become deaf!
>
> I've turned on debug and verbose to level 9, and there's nothing. It
> connects, starts music on hold, and then just ignores everything.
>
> Anything else I can add to the dialplan to see what might be causing
> this? (I've also tried dumpchan, too).
>
> It USED to work, and some point in the last week, it stopped working.
> (But the test dialplan above works). Mind boggled!
>
> Just to double check, yes, it's all set OK
>
> features show
> Builtin Feature   Default Current
> ---   --- ---
> Pickup*8  *8
> Blind Transfer#   #
> Attended Transfer
> One Touch Monitor
> Disconnect Call   *   *
>
>
Beware of local channel optimization.  You are putting state on local
channels
that can optimize out.  When the local channels optimize out they take the
state with them.

In the dialplan above you are creating the channel chain below.

PJSIP/caller --> Local/s@dial-test;1 -- Local/s@dial-test;2 -->
Local/s@dial-dest;1 -- Local/s@dial-dest;2

PJSIP/caller gets the L() duration and sounds put on it.
The Local/s@dial-test;1 gets the L() duration put on it.
The Local/s@dial-test;2 gets the H dial option put on it.

There is a bridge connecting PJSIP/caller and Local/s@dial-test;1
There is a bridge connecting Local/s@dial-test;2 and Local/s@dial-dest;1

When Local/s@dial-dest;2 executes Answer it will allow Local/s@dial-test;1
and ;2 to
optimize out because both ends are in a bridge.  Thus the H dial option
will disappear from
the channel chain.

Richard
-- 
_
-- 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] res_pjsip parkinglot configuration?

2016-10-03 Thread Richard Mudgett
On Mon, Oct 3, 2016 at 6:36 PM, John Kiniston 
wrote:

> I'm trying to find where you configure the parking lot used by phones
> registered via pjsip.
>
> In sip.conf you could set the default lot for call parking with the
> 'parkinglot=mylot' setting but I don't see an equivalent in pjsip.conf
>
> Do I need to use setvar to set CHANNEL(parkinglot) on my endpoint to do
> this now?
>

Yes.  In your type=endpoint section you specify
set_var=CHANNEL(parkinlot)=mylot

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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] Queue show : failed to extend from 240 to 327

2016-09-12 Thread Richard Mudgett
On Sat, Sep 10, 2016 at 5:18 AM, Jonas Kellens 
wrote:

> On 10-09-16 09:42, Jonas Kellens wrote:
>
>
> On 10-09-16 00:50, Richard Mudgett wrote:
>
>
>
> On Fri, Sep 9, 2016 at 5:37 PM, Jonas Kellens 
> wrote:
>
>> Hello
>>
>> when I type on the Asterisk CLi 'queue show', I first get a list of my
>> queues and then the following :
>>
>>
>> failed to extend from 240 to 327
>>
>
> 
>
> failed to extend from 240 to 334
>>
>>
>> I could not find any information on this on the web, except this :
>> https://issues.asterisk.org/jira/browse/ASTERISK-8828
>>
>> which is an old 'bug' that should have been fixed meanwhile.
>>
>> Any more thoughts on why I should be getting this message when asking
>> information about queues (I don't see this message on any other command).
>>
>
> That message is a result of trying to build a string where the buffer is
> too
> small to contain it.  I would expect that there is a truncated string in
> the
> 'queue show' output.
>
> You haven't stated which Asterisk version you are using.  It may already
> be fixed.
>
>
> Hello
>
> I have this with asterisk-certified-13.8-cert1 and also with
> asterisk-certified-13.8-cert2
>
> Could it be that the membername value (and interface value) in my realtime
> MySQL table queue_members is too long ??
>
> It looks like this :
>
> Local/01_vlaebidvxcrxrheebdin354@ExternalCallFromQueue
> Local/02_vlaebidvxcrxrheebdin114@ExternalCallFromQueue
> Local/03_vlaebidvxcrxrheebdin329@ExternalCallFromQueue
>
> I have the idea that this is the "problem".
>
> FYI : it also makes that Asterisk restarts (with core dump) whenever a
> queue is addressed. Very *annoying* !
>
>
> So string size too large and buffer too small.
>
> FYI : I do not have this with any version of Asterisk 1.8. This is a
> "problem" that exists only in Asterisk 13.
>
>
>
> How to fix this ??
>
>
> This is an example output for queue show <> on Asterisk version
> asterisk-certified-13.8-cert2 (same on asterisk-certified-13.8-cert1) :
>
>
> sip*CLI> queue show cvikbubohirndceiaetsq
> cvikbubohirndceiaetsq has 0 calls (max unlimited) in 'ringall' strategy
> (0s holdtime, 0s talktime), W:0, C:0, A:0, SL:0.0% within 0s
>Members:
>   cvikbubohirndceiaets012 
> (Local/cvikbubohirndceiaets012@ExternalCallFromQueue
> from Local/cvikbubohirndceiaets012@ExternalCallFromQueue) (ringinuse
> disabled) (realtime) (Not in use) has taken no
>   cvikbubohirndceiaets248 
> (Local/cvikbubohirndceiaets248@ExternalCallFromQueue
> from Local/cvikbubohirndceiaets248@ExternalCallFromQueue) (ringinuse
> disabled) (realtime) (Not in use) has taken no
>   cvikbubohirndceiaets428 
> (Local/cvikbubohirndceiaets428@ExternalCallFromQueue
> from Local/cvikbubohirndceiaets428@ExternalCallFromQueue) (ringinuse
> disabled) (realtime) (Not in use) has taken no
>   cvikbubohirndceiaets461 
> (Local/cvikbubohirndceiaets461@ExternalCallFromQueue
> from Local/cvikbubohirndceiaets461@ExternalCallFromQueue) (ringinuse
> disabled) (realtime) (Not in use) has taken no
>   cvikbubohirndceiaets629 
> (Local/cvikbubohirndceiaets629@ExternalCallFromQueue
> from Local/cvikbubohirndceiaets629@ExternalCallFromQueue) (ringinuse
> disabled) (realtime) (Not in use) has taken no
>No Callers
>
> failed to extend from 240 to 327
> failed to extend from 240 to 327
> failed to extend from 240 to 327
> failed to extend from 240 to 327
> failed to extend from 240 to 327
>

I have created https://issues.asterisk.org/jira/browse/ASTERISK-26360 to
keep track of the
issue.  I have also put a patch up on gerrit to increase the size of the
buffer.  Since it is
unlikely that you have a Digium SLA [1] concerning certified Asterisk, the
fix will not make its
way into certified asterisk.

Richard

[1] https://www.digium.com/products/asterisk/certified-asterisk
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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] Queue show : failed to extend from 240 to 327

2016-09-09 Thread Richard Mudgett
On Fri, Sep 9, 2016 at 5:37 PM, Jonas Kellens 
wrote:

> Hello
>
> when I type on the Asterisk CLi 'queue show', I first get a list of my
> queues and then the following :
>
>
> failed to extend from 240 to 327
>



failed to extend from 240 to 334
>
>
> I could not find any information on this on the web, except this :
> https://issues.asterisk.org/jira/browse/ASTERISK-8828
>
> which is an old 'bug' that should have been fixed meanwhile.
>
> Any more thoughts on why I should be getting this message when asking
> information about queues (I don't see this message on any other command).
>

That message is a result of trying to build a string where the buffer is too
small to contain it.  I would expect that there is a truncated string in the
'queue show' output.

You haven't stated which Asterisk version you are using.  It may already be
fixed.

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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] No ringback heard

2016-08-25 Thread Richard Mudgett
On Thu, Aug 25, 2016 at 2:14 PM, Saint Michael  wrote:

> I dial two destination like this
>
> Dial(PJSIP/endpoint1/sip:${EXTEN}@${IPA}&PJSIP/endpoint1/sip:${EXTEN}@
> ${IPB})
>
> But I need the audio from one of them to be heard by the caller.
> None gets heard. I switch the order but nothing.
> How I get the audio for  one in particular?
>

You cannot.

In the general case, forked dials like that cannot pass any early media
back to the caller
because you would need to mix any early media from the two (or more)
outgoing
channels.  In addition, any mixed audio would be confusing.  Imaging
hearing "an all
circuits are busy" recording while at the same time hearing overlapping
ringback tones from
several other channels.

In specific cases, you are talking about a new feature which requires a
code change.

If what you want is ringback with a recording interspersed at intervals,
you can create a
music-on-hold class and have the caller hear that instead.

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

Join the Asterisk Community at the 13th AstriCon, September 27-29, 2016
  http://www.asterisk.org/community/astricon-user-conference

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] Toll free pattern matching

2016-08-05 Thread Richard Mudgett
On Fri, Aug 5, 2016 at 9:06 AM, D'Arcy J.M. Cain  wrote:

> I have this in my config:
>
> exten => _800XXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
>   same => n,Dial(SIP/tollfree/1${EXTEN})
> exten => _1800XXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
>   same => n,Dial(SIP/tollfree/${EXTEN})
> exten => _NXXNXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
>   same => n,Dial(SIP/trunk/1${EXTEN})
> exten => _1NXXNXX,1,Verbose(0,${CHANNEL(peername)} Calling ${EXTEN})
>   same => n,Dial(SIP/trunk/${EXTEN})
>
> I came across
> http://stackoverflow.com/questions/7235291/asterisk-
> priorities-that-have-a-possibility-of-matching
> which seems to imply that the above won't work and that all the calls
> would go to the trunk.  However, this is working as expected for me.
> Did the behaviour change in the last four years or could I run into
> problems with this setup?  Perhaps I am misunderstanding the poster's
> issue.
>

Dialplan will stay on the current series of extensions until it runs out.
If there isn't an explicit hangup
to stop execution it will look for the next priority match.  You can easily
test this yourself by creating
some test dialplan to match your situation.

Given the below dialplan:

exten = _800XX,1,NoOp(Start of 800 series)
same = n,NoOp(Next in 800 series)

exten = _NXXN,1,NoOp(Generic series)
same = n,NoOp(next in generic series)
same = n,NoOp(third in generic series)

If you have an 800 number starting in dialplan then these are the priorities
executed:
1, Start of 800 series
2, Next in 800 series
Since we have run out of the 800 series Asterisk looks for a priority 3
that matches the extension
and finds priority 3 of the generic series.
3, third in generic series
There is no priority 4 so the call is hung up.

Richard


[1]
https://wiki.asterisk.org/wiki/display/AST/Contexts%2C+Extensions%2C+and+Priorities
[2] https://wiki.asterisk.org/wiki/display/AST/Pattern+Matching
-- 
_
-- 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 13 High CPU usage

2016-07-21 Thread Richard Mudgett
On Thu, Jul 21, 2016 at 6:02 PM, Chirag Desai  wrote:

> Hi all,
>
> I was using 13.5 but upgraded today to 13.9 (13.10 came out a few hours
> after I upgraded).
>
> On both 13.5 and 13.9 asterisk seems to use 100% of the CPU. This usually
> happens a few hours after starting asterisk. A restart of asterisk gets the
> CPU back down, but only for a little while.
>
> There asterisk box has no call traffic flowing through it, just 15 or so
> registrations.
>
> I'm sure this is not best practise but for now I am using chan_sip and
> pjsip at the same time. My pjsip endpoints are using TLS.
>
> I am not sure where to start looking in order to debug the CPU usage by
> asterisk and would very much appreciate some guidance.
>
Actually v13.10 has some changes to address high CPU usage in regards to
pjsip.
Also you should look here for more information:
http://blogs.asterisk.org/2016/07/13/asterisk-task-processor-queue-size-warnings/

Richard
-- 
_
-- 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

  1   2   3   4   5   6   7   8   9   10   >