Re: [asterisk-users] Asterisk 13 chan_sip trunk appending @string to dialled number

2015-08-18 Thread Brendan Ord
Halt the wild goose chase 


It was obviously something left over in the dial plan.  Restarted Asterisk 
seeing as though we're now after-hours and I can do interruptive work, and it 
seems to have solved my @CUBE problem.

Interestingly, it persisted through a "dialplan reload" and the equivalent of a 
"core reload" too ..

[2015-08-18 17:04:30] VERBOSE[25543][C-] app_dial.c: Called 
SIP/testing/0429920437
[2015-08-18 17:04:30] VERBOSE[25543][C-] app_dial.c: Everyone is 
busy/congested at this time (1:0/0/1)

This is expected, I need to review the dial-peer configurations on the Cisco 
GW.  At least it isn't throwing the suffix on the end anymore it seems...

Thanks for the help and apologies for the goose chase ..

Brendan Ord
OntheNet - Network Engineer
P 07 5553 9222
F 07 5593 3557
Level One, 165 Varsity Parade Varsity Lakes Qld 4227 (Map)
www.OntheNet.com.au

 

  
NOTICE:

This e-mail and any attachments are private and confidential and may contain 
privileged information. If you are not an authorised recipient, the copying or 
distribution of this e-mail and any attachments is prohibited and you must not 
read, print or act in reliance on this e-mail or attachments. Any pricing 
information supplied via email is an estimate or indicative only and may 
require a formal quotation to verify full terms and conditions.


-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Brendan Ord
Sent: Tuesday, 18 August 2015 4:48 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Asterisk 13 chan_sip trunk appending @string to 
dialled number

Hello,

So, I found this line under macro-dialout-trunk, in extensions_additional.conf 
(FreePBX, so it controls the conf files mostly);

exten => 
s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})

If I grep for OUT_3_SUFFIX in all files in /etc/asterisk I get nothing..

Here's a paste of a few things out of the two files that I thought were 
relevant to how FreePBX configured this trunk ...

http://pastebin.com/5fRy2Ai9


Brendan Ord
OntheNet - Network Engineer
P 07 5553 9222
F 07 5593 3557
Level One, 165 Varsity Parade Varsity Lakes Qld 4227 (Map) www.OntheNet.com.au

 

  
NOTICE:

This e-mail and any attachments are private and confidential and may contain 
privileged information. If you are not an authorised recipient, the copying or 
distribution of this e-mail and any attachments is prohibited and you must not 
read, print or act in reliance on this e-mail or attachments. Any pricing 
information supplied via email is an estimate or indicative only and may 
require a formal quotation to verify full terms and conditions.

-Original Message-
From: asterisk-users-boun...@lists.digium.com 
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Bruce Ferrell
Sent: Tuesday, 18 August 2015 4:38 PM
To: asterisk-users@lists.digium.com
Subject: Re: [asterisk-users] Asterisk 13 chan_sip trunk appending @string to 
dialled number

just got back to my mail.

What I'd do is go into /etc/asterisk and grep for OUT_3_SUFFIX in all the files

once the file with that variable is located, we can figure out why it's adding 
it



On 08/17/2015 11:26 PM, David Cunningham wrote:
> Yes indeed.
>
> Do you have the dialplan, eg from /etc/asterisk/extensions.conf?
>
> Something is getting this OUT_3_SUFFIX variable and including it in a Dial to 
> 172.22.4.12.
>
>
> On 18 August 2015 at 16:21, Brendan Ord  > wrote:
>
> Starting to make sense when I saw this line:
>
>  
>
> [2015-08-18 15:01:33] DEBUG[19366][C-1cfc]: pbx.c:3785 
> ast_str_retrieve_variable: Result of 'OUT_3_SUFFIX' is '@CUBE'
>
>  
>
> But I can’t find where this is in configuration ..
>
>  
>
> Brendan Ord
> OntheNet - Network Engineer
> P 07 5553 9222
> F 07 5593 3557
> Level One, 165 Varsity Parade Varsity Lakes Qld 4227 (Map 
> )
> www.OntheNet.com.au 
>
>  
>
> *From:*asterisk-users-boun...@lists.digium.com 
>  
> [mailto:asterisk-users-boun...@lists.digium.com
> ] *On Behalf Of *Brendan 
> Ord
> *Sent:* Tuesday, 18 August 2015 3:44 PM
>
>
> *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> *Subject:* Re: [asterisk-users] Asterisk 13 chan_sip trunk 
> appending @string to dialled number
>
>  
>
> David,
>
>  
>
> I should also note;
>
>  
>
> 246 is my extension, it has IP 172.22.3.238.
>
>  
>
> 172.22.4.8 is the PBX, and 172.22.4.12 is the 2800 gateway.
>
>  
>
> The trunk is called ‘testing’ at the moment.  The route that selects this 
> trunk uses a 9 prefix.
>
>  
>
> This system is in semi-production, so th

[asterisk-users] No audio when using TLS/SRTP with Kamailio and Asterisk 13

2015-08-18 Thread Chirag Desai
Hi all,

I'm using Kamailio + Asterisk 13 (PJSIP), where Kamailio (using rtpengine)
acts as the registrar and forwards all calls to Asterisk.

This works fine when using udp / tcp and RTP. When switching to TLS/SRTP,
the call is set up correctly, however, I get no audio.

When I skip kamailio and connect my two endpoints to asterisk directly I
get a perfect call with SRTP.

The same is also true when I skip asterisk and have the call handled by
Kamailio (using RTPEngine).

In PJSIP my transports look like this:

[transport-tcp]
type=transport
protocol=tcp;udp,tcp,tls,ws,wss
bind=0.0.0.0:5060
local_net=[asterisk local ip]/17
external_media_address=[asterisk external ip]
external_signaling_address=[asterisk external ip]

[transport-tls]
type=transport
protocol=tls
bind=0.0.0.0:5063
ca_list_file=/etc/asterisk/certificates/cert.crt
cert_file=/etc/asterisk/certificates/certificate.crt
priv_key_file=/etc/asterisk/certificates/key.key
method=tlsv1


My endpoint looks like this:

[kamailio]
type=endpoint
context=kam_out
disallow=all
allow=alaw
allow=g722
allow=ulaw
allow=gsm
aors=kamailio
direct_media=no
media_encryption=sdes
media_address=[Asterisk Local IP]
rtp_symmetric=yes
force_rport=no
rewrite_contact=yes
outbound_proxy=sip:[Kamailio Local IP]:5060\;transport=tcp\;lr

[kamailio]
type=identify
endpoint=kamailio
match=[Kamailio Local IP]/17

[kamailio]
type=aor
contact=sip:[Kamailio Local IP]:5060\;transport=tcp


My dialplan looks like this

[kam_out]

exten => 1001,1,Playback(demo-echotest)  ; Let them know what's going on
same => n,Echo ; Do the echo test
same => n,Playback(demo-echodone)  ; Let them know it's over
same => n,Hangup()


exten => _kb-.,1,NoOp(Calling a registred user with number ${EXTEN})
same => n,Set(callee=${PJSIP_HEADER(read,To)})
same => n,Set(callee=${callee:5})
same => n,Set(callee=${callee:0:-1}) ; removes the >
same => n,Dial(PJSIP/kamailio/sip:${callee})
same => n,Hangup()

When a call comes via kamailio it comes with a prefix of 'kb' if the value
is an extension e.g. 1000 - 1999. Otherwise users can dial a prefix of 45
e.g. 451001 to hit the Echo Test.

As mentioned the echo test works fine, however the actual call between two
endpoints has no audio. RTP debug shows nothing. PJSIP shows two channels
in a simple bridge, but no sound. Usually PJSIP says RTP Probation passed
and shows the IP address but in this case it does not.

I'm guessing the issue is something funny in PJSIP, although I'm not 100%
since it does work when I turn SRTP and TLS off.

For testing I'm using CsipSimple and a Snom 760. Both are set with SRTP
mandatory and are using TLS to talk to Kamailio.

When kamailio talks to asterisk it uses TCP over a local network.

I've been pulling my hair out for days. I really would appreciate any ideas
or some pointing in the right direction here.

Thanks in advance,

C
-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --
New to Asterisk? Join us for a live introductory webinar every Thurs:
   http://www.asterisk.org/hello

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

[asterisk-users] Stopping recordings on all legs

2015-08-18 Thread Leandro Dardini
Hello,I'd like to use a feature code for stopping recordings. Things are
quite easy when the call is received from the outside or just dialed from
inside to outside, but it can go really crazy when there are blind and
attended transfer going on. It ends I don't know on which call leg is the
recording started, so I cannot stop the recording on the right one.
I usually use the following features.conf
# =>
,[/],[,[,MOH_Class]]
FromOutsideStopMixMonitor =>
#0,peer/callee,Macro(pause-recording)FromOutsideStartMixMonitor =>
#1,peer/callee,Macro(unpause-recording)
FromInsideStopMixMonitor =>
#0,self/caller,Macro(pause-recording)FromInsideStartMixMonitor =>
#1,self/caller,Macro(unpause-recording)
So if the call is coming from inside, I use the "FromInside", while if the
call is coming from outside, I use the "FromOutside" in DYNAMIC_FEATURES.
I can use "both" for the ActivatedBy, but I want also to run the
pause-recording on both channel legs because I do not know on which one the
recording has been started. How can I do?
Here the macros used:
[macro-pause-recording]exten => s,1,NoOp(Stopping Recording -
MIXMONITOR_FILENAME is ${MIXMONITOR_FILENAME})exten => s,n,StopMixMonitor()
[macro-unpause-recording]exten => s,1,NoOp(Resuming Recording -
MIXMONITOR_FILENAME is ${MIXMONITOR_FILENAME})exten =>
s,n,MixMonitor(${MIXMONITOR_FILENAME},ab)ldardiniNewsterisk Leandro
-- 
_
-- 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 chan_sip trunk appending @string to dialled number

2015-08-18 Thread David Cunningham
Glad to hear it's sorted.


On 18 August 2015 at 17:08, Brendan Ord  wrote:

> Halt the wild goose chase 
>
>
> It was obviously something left over in the dial plan.  Restarted Asterisk
> seeing as though we're now after-hours and I can do interruptive work, and
> it seems to have solved my @CUBE problem.
>
> Interestingly, it persisted through a "dialplan reload" and the equivalent
> of a "core reload" too ..
>
> [2015-08-18 17:04:30] VERBOSE[25543][C-] app_dial.c: Called
> SIP/testing/0429920437
> [2015-08-18 17:04:30] VERBOSE[25543][C-] app_dial.c: Everyone is
> busy/congested at this time (1:0/0/1)
>
> This is expected, I need to review the dial-peer configurations on the
> Cisco GW.  At least it isn't throwing the suffix on the end anymore it
> seems...
>
> Thanks for the help and apologies for the goose chase ..
>
> Brendan Ord
> OntheNet - Network Engineer
> P 07 5553 9222
> F 07 5593 3557
> Level One, 165 Varsity Parade Varsity Lakes Qld 4227 (Map)
> www.OntheNet.com.au
>
>
>
>
> NOTICE:
>
> This e-mail and any attachments are private and confidential and may
> contain privileged information. If you are not an authorised recipient, the
> copying or distribution of this e-mail and any attachments is prohibited
> and you must not read, print or act in reliance on this e-mail or
> attachments. Any pricing information supplied via email is an estimate or
> indicative only and may require a formal quotation to verify full terms and
> conditions.
>
>
> -Original Message-
> From: asterisk-users-boun...@lists.digium.com [mailto:
> asterisk-users-boun...@lists.digium.com] On Behalf Of Brendan Ord
> Sent: Tuesday, 18 August 2015 4:48 PM
> To: asterisk-users@lists.digium.com
> Subject: Re: [asterisk-users] Asterisk 13 chan_sip trunk appending @string
> to dialled number
>
> Hello,
>
> So, I found this line under macro-dialout-trunk, in
> extensions_additional.conf (FreePBX, so it controls the conf files mostly);
>
> exten =>
> s,n,Dial(${OUT_${DIAL_TRUNK}}/${OUTNUM}${OUT_${DIAL_TRUNK}_SUFFIX},${TRUNK_RING_TIMER},${DIAL_TRUNK_OPTIONS})
>
> If I grep for OUT_3_SUFFIX in all files in /etc/asterisk I get nothing..
>
> Here's a paste of a few things out of the two files that I thought were
> relevant to how FreePBX configured this trunk ...
>
> http://pastebin.com/5fRy2Ai9
>
>
> Brendan Ord
> OntheNet - Network Engineer
> P 07 5553 9222
> F 07 5593 3557
> Level One, 165 Varsity Parade Varsity Lakes Qld 4227 (Map)
> www.OntheNet.com.au
>
>
>
>
> NOTICE:
>
> This e-mail and any attachments are private and confidential and may
> contain privileged information. If you are not an authorised recipient, the
> copying or distribution of this e-mail and any attachments is prohibited
> and you must not read, print or act in reliance on this e-mail or
> attachments. Any pricing information supplied via email is an estimate or
> indicative only and may require a formal quotation to verify full terms and
> conditions.
>
> -Original Message-
> From: asterisk-users-boun...@lists.digium.com [mailto:
> asterisk-users-boun...@lists.digium.com] On Behalf Of Bruce Ferrell
> Sent: Tuesday, 18 August 2015 4:38 PM
> To: asterisk-users@lists.digium.com
> Subject: Re: [asterisk-users] Asterisk 13 chan_sip trunk appending @string
> to dialled number
>
> just got back to my mail.
>
> What I'd do is go into /etc/asterisk and grep for OUT_3_SUFFIX in all the
> files
>
> once the file with that variable is located, we can figure out why it's
> adding it
>
>
>
> On 08/17/2015 11:26 PM, David Cunningham wrote:
> > Yes indeed.
> >
> > Do you have the dialplan, eg from /etc/asterisk/extensions.conf?
> >
> > Something is getting this OUT_3_SUFFIX variable and including it in a
> Dial to 172.22.4.12.
> >
> >
> > On 18 August 2015 at 16:21, Brendan Ord  > wrote:
> >
> > Starting to make sense when I saw this line:
> >
> >
> >
> > [2015-08-18 15:01:33] DEBUG[19366][C-1cfc]: pbx.c:3785
> ast_str_retrieve_variable: Result of 'OUT_3_SUFFIX' is '@CUBE'
> >
> >
> >
> > But I can’t find where this is in configuration ..
> >
> >
> >
> > Brendan Ord
> > OntheNet - Network Engineer
> > P 07 5553 9222
> > F 07 5593 3557
> > Level One, 165 Varsity Parade Varsity Lakes Qld 4227 (Map <
> https://goo.gl/maps/p25WF>)
> > www.OntheNet.com.au 
> >
> >
> >
> > *From:*asterisk-users-boun...@lists.digium.com  asterisk-users-boun...@lists.digium.com> [mailto:
> asterisk-users-boun...@lists.digium.com
> > ] *On Behalf Of
> *Brendan Ord
> > *Sent:* Tuesday, 18 August 2015 3:44 PM
> >
> >
> > *To:* Asterisk Users Mailing List - Non-Commercial Discussion
> > *Subject:* Re: [asterisk-users] Asterisk 13 chan_sip trunk
> > appending @string to dialled number
> >
> >
> >
> > David,
> >
> >
> >
> > I should also note;
> >
> >
> >
> > 246 is my extension, it has IP