[asterisk-users] Tranfer the called number in 3 way call

2016-12-08 Thread sam habash
Hey there,


I have a question i want a dialplan to send the called number of the client 
instead of my callerID when making a 3way call or when transfering to an 
extension from a bridge to another pbx. The problem i add a variable and using 
thw two underscores but i still see the my calledID , i am using both asterisk 
1.8.29 and other is asterisk 11.4 here is the dialplan inherit which i do :


exten=> _6XX,n,set(__var=${EXTEN})

exten=> _6XX,n,Dial(IAX2/bridge/${EXTEN},,tTor)


I want to recieve the client number that were called from my first pvx with 5XX 
extensions to be shown on my second pbx with 6XX while making a transfer to the 
bridge with 3 way call or blind transfer , I know i am missing something here , 
can you guys help me.

Sent from my LG Mobile
-- 
_
-- 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-08 Thread Ethy H. Brito
On Tue, 15 Nov 2016 12:21:31 -0200
"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?
> Is there a smarter way for grabbing these?
> 
> 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)?
> 
> Environment is: asterisk -V
> 
>   Asterisk 11.7.0~dfsg-1ubuntu1 running on Ubuntu 14.04.5 LTS
> 
> 
> Thanx for your time.
> Cheers
> 
> Ethy

Hi All

No suggestions at all??

Cheers

Ethy


-- 
_
-- 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] Change Media IP in SDP [SOLVED]

2016-12-08 Thread Harel
Hello Max,

Thank you for your detailed reply.

Indeed all my nat-related settings are configured properly and I make use of 
two NIC cards to access the various networks I'm connected to.
When you mentioned 'externip' I assume you meant 'externaddr' because there is 
no 'externip' in sip.conf...
I've made some tests and found out that this setting has no effect on the 
[peer] level and can only be used on the [general] section of sip.conf.
Your suggestion of using the 'localnet' together with the 'externaddr' did the 
trick for me. Even though the remote non-public networks are by no way 'local' 
I have defined them as such thus disabling any IP replacements with the 
'externaddr' which is the wrong IP for these networks. For the benefit of 
others who may come across this thread I would mention that this solution would 
work on the following two conditions:
1. Only one external network may be NATed to the Asterisk. This limitation is 
due to the fact that only one 'externaddr' may be configured per-box.
2. All other end-points in other networks are within a well-known IP range 
which can be defined in 'localnet' settings.

It will be nice to have the 'externaddr' work on the [peer] level thus 
providing more valuable tools to solve NAT issues.

Harel

 Original Message *
Hi,

normally, Asterisk handles RTP IP addresses in SDP correctly, if you have 
specified
 - that NAT traversal is enabled for all peers (e.g. nat=force_rport,comedia)
 - your local network with "localnet=yournetwork/networkmask" - e.g. 
"localnet=192.168.1.0/255.255.255.0"
 - directmedia, canreinvite, directrtpsetup is deacitivated

In this case, your Asterisk will always stay in the RTP stream and signalling 
only it's own IP address to other peers which is configured for the interface 
which Asterisk uses to reach the peer.


But: If you have only one interface configured on your Asterisk server and an 
external firewall/router is managing your separated networks, this might not 
help.
In this case you can use "externip" on a per peer basis in your SIP 
configuration to specify the IP address Asterisk uses in the SDP.
Maybe, a global configuration of "externip" and "localnet" is all you need to 
help Asterisk setting the SDP address correctly.
Also, enabling ICE support can help you getting the correct IP address if the 
remote peer supports it.



Greetings
 Max


Am 07.12.2016 um 00:02 schrieb Harel:
> Hello List,
> I need your help with information going out on my SDP.
> Is it possible to update the Media Address on a per-call basis or a 
> per-channel basis?
> Reason:
> My Asterisk is in a private network and needs to connect to UA on its 
> internal network and also few external networks. One network is public and 
> the others are not public. Between each other the external networks are not 
> routable. Signaling is flowing with no issues because SIP Registers and NAT 
> boxes maintain sessions correctly. The problem is with RTP. After making 
> traces on all possible nodes of this network I clearly found out that the RTP 
> fails because the Asterisk doesn't manage to communicate the correct address 
> to the UAs in the SDP. It will report its internal IP address and the remote 
> UA will try to send its RTP to this address which, of course, will fail 
> miserably. 
> Obviously I can't use externaddr or media_address in sip.conf because it will 
> only be good for one network while the other external networks will fail just 
> the same. Same applies for STUN, it will only be good for the network the 
> STUN requests are being sent from. 
> On all networks I have fix IP addresses on my side and I fully control a 
> professional security box. 
> Asterisk is 13.6.0
> I can't, and don't want to, touch user-side equipment which is normally some 
> kind of voip phone behind a standard home VDSL router.
> 
> Any ideas how can I transmit the correct IP address in SDP to UAs on 
> different networks?
> 
> Many thanks,
> Harel
> 
> 


-- 
_
-- 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] AST-2016-009:

2016-12-08 Thread Asterisk Security Team
 Asterisk Project Security Advisory - ASTERISK-2016-009

 ProductAsterisk  
 Summary
Nature of Advisory  Authentication Bypass 
  SusceptibilityRemote unauthenticated sessions   
 Severity   Minor 
  Exploits KnownNo
   Reported On  October 3, 2016   
   Reported By  Walter Doekes 
Posted On   
 Last Updated OnDecember 8, 2016  
 Advisory Contact   Mmichelson AT digium DOT com  
 CVE Name   

Description  The chan_sip channel driver has a liberal definition for 
 whitespace when attempting to strip the content between a
 SIP header name and a colon character. Rather than   
 following RFC 3261 and stripping only spaces and horizontal  
 tabs, Asterisk treats any non-printable ASCII character as   
 if it were whitespace. This means that headers such as   
  
 Contact\x01: 
  
 will be seen as a valid Contact header.  
  
 This mostly does not pose a problem until Asterisk is
 placed in tandem with an authenticating SIP proxy. In such   
 a case, a crafty combination of valid and invalid To 
 headers can cause a proxy to allow an INVITE request into
 Asterisk without authentication since it believes the
 request is an in-dialog request. However, because of the 
 bug described above, the request will look like an   
 out-of-dialog request to Asterisk. Asterisk will then
 process the request as a new call. The result is that
 Asterisk can process calls from unvetted sources without 
 any authentication.  
  
 If you do not use a proxy for authentication, then this  
 issue does not affect you.   
  
 If your proxy is dialog-aware (meaning that the proxy keeps  
 track of what dialogs are currently valid), then this issue  
 does not affect you. 
  
 If you use chan_pjsip instead of chan_sip, then this issue   
 does not affect you. 

Resolution  chan_sip has been patched to only treat spaces and
horizontal tabs as whitespace following a header name. This   
allows for Asterisk and authenticating proxies to view
requests the same way 

   Affected Versions   
 Product   Release  
   Series   
  Asterisk Open Source  11.xAll Releases  
  Asterisk Open Source  13.xAll Releases  
  Asterisk Open Source  14.xAll Releases  
   Certified Asterisk   13.8All Releases  

  Corrected In
  Product  Release
Asterisk Open Source   11.25.1, 13.13.1, 14.2.1   
 Certified Asterisk11.6-cert16, 13.8-cert4

Patches
 SVN URL  Revision

   Links 

Asterisk Project Security Advisories are posted at
http://www.asterisk.org/security  
  
This document may be superseded by later versions; if so, the latest  
version will be posted at 

[asterisk-users] AST-2016-008: Crash on SDP offer or answer from endpoint using Opus

2016-12-08 Thread Asterisk Security Team
   Asterisk Project Security Advisory - AST-2016-008

 ProductAsterisk  
 SummaryCrash on SDP offer or answer from endpoint using  
Opus  
Nature of Advisory  Remote Crash  
  SusceptibilityRemote unauthenticated sessions   
 Severity   Critical  
  Exploits KnownNo
   Reported On  November 11, 2016 
   Reported By  jorgen
Posted On   
 Last Updated OnNovember 15, 2016 
 Advisory Contact   jcolp AT digium DOT com   
 CVE Name   

Description  If an SDP offer or answer is received with the Opus codec
 and with the format parameters separated using a space the   
 code responsible for parsing will recursively call itself
 until it crashes. This occurs as the code does not properly  
 handle spaces separating the parameters. This does NOT   
 require the endpoint to have Opus configured in Asterisk.
 This also does not require the endpoint to be
 authenticated. If guest is enabled for chan_sip or   
 anonymous in chan_pjsip an SDP offer or answer is still  
 processed and the crash occurs.  

Resolution  The code has been updated to properly handle spaces   
separating parameters in the fmtp line. Upgrade to a  
released version with the fix incorporated or apply patch.

   Affected Versions 
  ProductRelease  
 Series   
   Asterisk Open Source   13.x13.12.0 and higher  
   Asterisk Open Source   14.xAll Versions

  Corrected In   
Product  Release  
 Asterisk Open Source13.13.1, 14.2.1  

Patches  
SVN URL  Revision 
   http://downloads.asterisk.org/pub/security/AST-2016-008-13.diff   Asterisk 
 13   
   http://downloads.asterisk.org/pub/security/AST-2016-008-14.diff   Asterisk 
 14   

Links  https://issues.asterisk.org/jira/browse/ASTERISK-26579 

Asterisk Project Security Advisories are posted at
http://www.asterisk.org/security  
  
This document may be superseded by later versions; if so, the latest  
version will be posted at 
http://downloads.digium.com/pub/security/AST-2016-008.pdf and 
http://downloads.digium.com/pub/security/AST-2016-008.html

Revision History
  Date   Editor  Revisions Made   
November 15, 2016  Joshua Colp  Initial draft of Advisory 

   Asterisk Project Security Advisory - AST-2016-008
   Copyright © 2016 Digium, Inc. All Rights Reserved.
  Permission is hereby granted to distribute and publish this advisory in its
   original, unaltered form.


-- 
_
-- 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 11.25.1, 13.13.1, 14.2.1, 11.6-cert16, and 13.8-cert4 Now Available (Security Release)

2016-12-08 Thread Asterisk Development Team
The Asterisk Development Team has announced security releases for Asterisk
11, 13, 14, and Certified Asterisk 11.6 and 13.8. The available
security releases are released as versions 11.25.1, 13.13.1, 14.2.1,
11.6-cert16, and 13.8-cert4.

These releases are available for immediate download at:

http://downloads.asterisk.org/pub/telephony/asterisk/releases
http://downloads.asterisk.org/pub/telephony/certified-asterisk/releases/

The release of versions 13.13.1 and 14.2.1 resolve the following security
vulnerability:

* AST-2016-008: Crash on SDP offer or answer from endpoint using Opus

  If an SDP offer or answer is received with the Opus codec and with the
format
  parameters separated using a space the code responsible for parsing will
  recursively call itself until it crashes. This occurs as the code does not
  properly handle spaces separating the parameters.

  This does NOT require the endpoint to have Opus configured in Asterisk.
This
  also does not require the endpoint to be authenticated. If guest is
enabled
  for chan_sip or anonymous in chan_pjsip an SDP offer or answer is still
  processed and the crash occurs.

The release of versions 11.25.1, 13.13.1, 14.2.1, 11.6-cert16 and 13.8-cert4
resolve the following security vulnerability:

* AST-2016-009: Remote unauthenticated sessions in chan_sip

  The chan_sip channel driver has a liberal definition for whitespace when
  attempting to strip the content between a SIP header name and a colon
  character. Rather than following RFC 3261 and stripping only spaces and
  horizontal tabs, Asterisk treats any non-printable ASCII character as if
it
  were whitespace. This means that headers such as

 Contact\x01:

  will be seen as a valid Contact header.

  This mostly does not pose a problem until Asterisk is placed in tandem
with
  an authenticating SIP proxy. In such a case, a crafty combination of valid
  and invalid To headers can cause a proxy to allow an INVITE request into
  Asterisk without authentication since it believes the request is an
in-dialog
  request. However, because of the bug described above, the request will
look
  like an out-of-dialog request to Asterisk. Asterisk will then process the
  request as a new call. The result is that Asterisk can process calls from
  unvetted sources without any authentication.

  If you do not use a proxy for authentication, then this issue does not
affect
  you. If your proxy is dialog-aware (meaning that the proxy keeps track of
what
  dialogs are currently valid), then this issue does not affect you. If you
use
  chan_pjsip instead of chan_sip, then this issue does not affect you.

For a full list of changes in the current releases, please see the
ChangeLogs:

http://downloads.asterisk.org/pub/telephony/asterisk/release
s/ChangeLog-11.25.1
http://downloads.asterisk.org/pub/telephony/asterisk/release
s/ChangeLog-13.13.1
http://downloads.asterisk.org/pub/telephony/asterisk/release
s/ChangeLog-14.2.1
http://downloads.asterisk.org/pub/telephony/certified-asteri
sk/releases/ChangeLog-certified-11.6-cert16
http://downloads.asterisk.org/pub/telephony/certified-asteri
sk/releases/ChangeLog-certified-13.8-cert4

The security advisories are available at:

 * http://downloads.asterisk.org/pub/security/AST-2016-008.pdf
 * http://downloads.asterisk.org/pub/security/AST-2016-009.pdf

Thank you for your continued support of 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

[asterisk-users] Asterisk 11.25.1, 13.13.1, 14.2.1, 11.6-cert16, and 13.8-cert4 Now Available (Security Release)

2016-12-08 Thread Asterisk Development Team

-- 
_
-- 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] What to do when changing from one asterisk version to another ?

2016-12-08 Thread Olivier
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.


>
> Before diving deeper, are my expectations correct ?
>
> Best regards
>
> [1] https://wiki.asterisk.org/wiki/display/AST/Building+and+
> Installing+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

[asterisk-users] What to do when changing from one asterisk version to another ?

2016-12-08 Thread 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.

Before diving deeper, are my expectations correct ?

Best regards

[1]
https://wiki.asterisk.org/wiki/display/AST/Building+and+Installing+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

[asterisk-users] how are channels numbers assigned

2016-12-08 Thread Ethy H. Brito

Hi All

I have this system here where:

# dahdi_hardware 
pci::07:04.0 wctdm24xxp+  d161:8005 Wildcard TDM410P
pci::07:09.0 wcte11xp+e159:0001 Digium Wildcard TE110P T1/E1 Board

channels are 
0-31 for TE110P
and
32-35 for TDM410P

I want to insert a new TE110P. 
How will these new channels be assigned? 
What is the dahdi_genconf logic for these assignments?

Is there a way to force these assignments to prevent they to change if I
insert/remove any card from the system?

chan_dahdi.conf is a bit confusing to me.
What makes the configuration for one channel be finished and start the
configuration for the next channel?

Would you point me any docs on this matter?

Asterisk is 11.7.0
Dahdi is 2.7.0
Ubuntu 14.04.5 LTS

Cheers

Ethy

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