[asterisk-users] Telco with multipe SIP servers

2014-02-02 Thread Markus Reschke

Hi!

My telco is Deutsche Telekom and they got about 30 SIP servers right now. 
Currently I've set up a template for incoming calls in sip.conf and added 
each SIP server by it's IP address like this:


[DTAG-in-1](DTAG-in-template)
host=217.0.16.103

...

[DTAG-in-30](DTAG-in-template)
host=217.0.20.99

I've done that to improve security and to be able to assign all calls 
coming in via Deutsche Telekom to a dedicated dialplan context. 
Unfortunately this approach is not scalable and it's a PITA to maintain a 
list of server IP addresses since Deutsche Telekom will get more SIP 
servers in the future. They've started to migrate the classic POTS/ISDN 
network to VoIP, the goal is get it done by 2016. Customers with DSL get 
VoIP directly, i.e. they need SIP phones or a SIP PBX, and customers with 
a phone line only are converted by the MSAN. And they don't provide an 
official list of the SIP servers :-( By some reverse engineering I found 
out that all SIP servers are within a specific subnet. Is there any way to 
match peers by subnet(s) instead of FQDNs or single IP addresses? If not, 
it would be a feature really needed to be able to cope with telcos running 
multiple or tons of SIP servers.


cu, Markus
--
/ Markus Reschke \ / madi...@theca-tabellaria.de \ / FidoNet 2:240/1661 \
\/ \ / \/

--
_
-- 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] Telco with multipe SIP servers

2014-02-02 Thread Andres

On 2/2/14, 9:42 AM, Markus Reschke wrote:

Hi!

My telco is Deutsche Telekom and they got about 30 SIP servers right 
now. Currently I've set up a template for incoming calls in sip.conf 
and added each SIP server by it's IP address like this:


[DTAG-in-1](DTAG-in-template)
host=217.0.16.103

...

[DTAG-in-30](DTAG-in-template)
host=217.0.20.99

I've done that to improve security and to be able to assign all calls 
coming in via Deutsche Telekom to a dedicated dialplan context. 
Unfortunately this approach is not scalable and it's a PITA to 
maintain a list of server IP addresses since Deutsche Telekom will get 
more SIP servers in the future. They've started to migrate the classic 
POTS/ISDN network to VoIP, the goal is get it done by 2016. Customers 
with DSL get VoIP directly, i.e. they need SIP phones or a SIP PBX, 
and customers with a phone line only are converted by the MSAN. And 
they don't provide an official list of the SIP servers :-( By some 
reverse engineering I found out that all SIP servers are within a 
specific subnet. Is there any way to match peers by subnet(s) instead 
of FQDNs or single IP addresses? If not, it would be a feature really 
needed to be able to cope with telcos running multiple or tons of SIP 
servers.
I agree this would be a great feature to have.  We have Voxbone DIDs, 
and keeping track of 60+ SIP Addresses they have is a PITA.


cu, Markus



--
Technical Support
http://www.cellroute.net


--
_
-- 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] Telco with multipe SIP servers

2014-02-02 Thread Joshua Colp
On 14-02-02 10:42 AM, Markus Reschke wrote:
 Hi!

Greetings,

snip

 I've done that to improve security and to be able to assign all calls
 coming in via Deutsche Telekom to a dedicated dialplan context.
 Unfortunately this approach is not scalable and it's a PITA to maintain
 a list of server IP addresses since Deutsche Telekom will get more SIP
 servers in the future. They've started to migrate the classic POTS/ISDN
 network to VoIP, the goal is get it done by 2016. Customers with DSL get
 VoIP directly, i.e. they need SIP phones or a SIP PBX, and customers
 with a phone line only are converted by the MSAN. And they don't provide
 an official list of the SIP servers :-( By some reverse engineering I
 found out that all SIP servers are within a specific subnet. Is there
 any way to match peers by subnet(s) instead of FQDNs or single IP
 addresses? If not, it would be a feature really needed to be able to
 cope with telcos running multiple or tons of SIP servers.

Mucking in chan_sip to add this functionality is not something I'd
really want to do... matching there is complicated and anything to do
with chan_sip is prone to introducing some sort of regression. If we
were to add that feature it would certainly require tons of tests.

That being said...

When I was doing the new SIP channel driver for 12 (chan_pjsip) I knew
people would want this functionality and due to the way it's architected
there it was very easy to do. You can specify IP addresses and subnets
and they all get mapped back to a single entity (called an endpoint in
chan_pjsip).

I'm sorry this doesn't help you right now with chan_sip but I just
wanted to show that the future is bright and that we do listen. ^_^

Cheers,

-- 
Joshua Colp
Digium, Inc. | Senior Software Developer
445 Jan Davis Drive NW - Huntsville, AL 35806 - USA
Check us out at:  www.digium.com   www.asterisk.org

-- 
_
-- 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] Telco with multipe SIP servers

2014-02-02 Thread Michelle Dupuis
Markus,

We are developing an Asterisk intrusion detection  prevention tool which will 
allow you to limit connections by geographic region 
(continent/country/region/city), and include/exclude IP subnets, etc.

If you are interested let me know off-list (we're looking for beta testers!).  

Michelle


From: asterisk-users-boun...@lists.digium.com 
[asterisk-users-boun...@lists.digium.com] On Behalf Of Markus Reschke 
[madi...@theca-tabellaria.de]
Sent: Sunday, February 02, 2014 9:42 AM
To: Asterisk Users List
Subject: [asterisk-users] Telco with multipe SIP servers

Hi!

My telco is Deutsche Telekom and they got about 30 SIP servers right now.
Currently I've set up a template for incoming calls in sip.conf and added
each SIP server by it's IP address like this:

[DTAG-in-1](DTAG-in-template)
host=217.0.16.103

...

[DTAG-in-30](DTAG-in-template)
host=217.0.20.99

I've done that to improve security and to be able to assign all calls
coming in via Deutsche Telekom to a dedicated dialplan context.
Unfortunately this approach is not scalable and it's a PITA to maintain a
list of server IP addresses since Deutsche Telekom will get more SIP
servers in the future. They've started to migrate the classic POTS/ISDN
network to VoIP, the goal is get it done by 2016. Customers with DSL get
VoIP directly, i.e. they need SIP phones or a SIP PBX, and customers with
a phone line only are converted by the MSAN. And they don't provide an
official list of the SIP servers :-( By some reverse engineering I found
out that all SIP servers are within a specific subnet. Is there any way to
match peers by subnet(s) instead of FQDNs or single IP addresses? If not,
it would be a feature really needed to be able to cope with telcos running
multiple or tons of SIP servers.

cu, Markus
--
/ Markus Reschke \ / madi...@theca-tabellaria.de \ / FidoNet 2:240/1661 \
\/ \ / \/

--
_
-- 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
-- 
_
-- 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] Incoming Fax Issue with Asterisk 11.7 and Digium Fax

2014-02-02 Thread Jakob-Matthias Böttger

Hi, im using a Asterisk Server which is not behind NAT.
First i had problems with the fax detection. But this is now solved 
after adding a wait(2) at the correct place. But i'm still unable to 
receive a fax due to res_rtp_asterisk.c:3548 ast_rtp_read: RTP Read too 
short after the Fax session has started.



My sip.conf includes

[general]
allowguest=no
alwaysauthreject=yes

sendrpid=rpid
trustrpid=yes
language=de
videosupport=yes
callevents=yes
qualify=yes
nat=force_rport,comedia
faxdetect=yes
t38pt_udptl=yes,redundancy,maxdatagram=400
directrtpsetup=yes
disallow=all
allow=ulaw
allow=alaw

and the corresponding Peer

[sipcall.ch]
type=peer
insecure=invite
defaultuser=123456789
fromuser=123456789
fromdomain=voipdomain.com
secret=gueswhat
host=voipdomain.com
qualify=yes
context=from-sip
dtmfmode=rfc2833
callbackextension=123456789

the Dialplan

[inbound]
exten = _X.,1,Answer()
exten = _X.,n,Set(DB(lastcaller/number)=${CALLERID(num)})
exten = _X.,n,GotoIf(${BLACKLIST()}?black,1)
exten = _X.,n,Wait(2)
exten = _X.,n,Dial(SIP/200SIP/201,60,tToxX)
exten = _X.,n,Goto(ausser-zeit,_X.,3)
exten = _X.,n,Hangup()

exten = fax,1,NoOp( FAX DETECTED )
exten = fax,n,Goto(fax-rx,receive,1)

[fax-rx]

exten = receive,1,NoOp( FAX RECEIVE )
exten = receive,n,Set(GLOBAL(FAXCOUNT)=$[${GLOBAL(FAXCOUNT)} + 1])
exten = receive,n,Set(FAXCOUNT=${GLOBAL(FAXCOUNT)})
exten = receive,n,Set(FAXFILE=fax-${FAXCOUNT}-rx.tif)
exten = receive,n,Set(GLOBAL(LASTFAXCALLERoNUM)=${CALLERID(num)})
exten = receive,n,Set(GLOBAL(LASTFAXCALLERNAME)=${CALLERID(name)})
exten = receive,n,NoOp( SETTING FAXOPT )
exten = receive,n,Set(FAXOPT(ecm)=yes)
exten = receive,n,Set(FAXOPT(headerinfo)=MYFAX RX)
exten = receive,n,Set(FAXOPT(localstationid)=1234567890)
exten = receive,n,Set(FAXOPT(maxrate)=14400)
exten = receive,n,Set(FAXOPT(minrate)=2400)
exten = receive,n,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten = receive,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten = receive,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten = receive,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten = receive,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten = receive,n,NoOp( RECEIVING FAX : ${FAXFILE} )
exten = receive,n,ReceiveFAX(/var/spool/asterisk/faxin/${FAXFILE},dfs)
exten = h,1,NoOp(FAXOPT(ecm) : ${FAXOPT(ecm)})
exten = h,n,NoOp(FAXOPT(filename) : ${FAXOPT(filename)})
exten = h,n,NoOp(FAXOPT(headerinfo) : ${FAXOPT(headerinfo)})
exten = h,n,NoOp(FAXOPT(localstationid) : ${FAXOPT(localstationid)})
exten = h,n,NoOp(FAXOPT(maxrate) : ${FAXOPT(maxrate)})
exten = h,n,NoOp(FAXOPT(minrate) : ${FAXOPT(minrate)})
exten = h,n,NoOp(FAXOPT(pages) : ${FAXOPT(pages)})
exten = h,n,NoOp(FAXOPT(rate) : ${FAXOPT(rate)})
exten = h,n,NoOp(FAXOPT(remotestationid) : ${FAXOPT(remotestationid)})
exten = h,n,NoOp(FAXOPT(resolution) : ${FAXOPT(resolution)})
exten = h,n,NoOp(FAXOPT(status) : ${FAXOPT(status)})
exten = h,n,NoOp(FAXOPT(statusstr) : ${FAXOPT(statusstr)})
exten = h,n,NoOp(FAXOPT(error) : ${FAXOPT(error)})

udptl.conf
[general]
udptlstart=4000
udptlend=4999
udptlfecentries = 3
udptlfecspan = 3
use_even_ports = no

rtp.conf
[general]
rtpstart=1
rtpend=2

res_fax.conf
[general]
maxrate=14400
minrate=2400
statusevents=yes
modems=v17,v27,v29
ecm=yes


mail*CLI core set verbose 6
Set remote console verbosity to 6
  == Using SIP RTP CoS mark 5
-- Executing [41325122774@from-sip:1] 
Answer(SIP/sipcall.ch-008d, ) in new stack
0x7f3964080f30 -- Probation passed - setting RTP source 
address to 123.456.789.123:20600
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042281, ts 
1387619622, len 000160)
-- Executing [41325122774@from-sip:2] 
Set(SIP/sipcall.ch-008d, DB(lastcaller/number)=987654321) in new 
stack
-- Executing [41325122774@from-sip:3] 
GotoIf(SIP/sipcall.ch-008d, 0?black,1) in new stack
-- Executing [41325122774@from-sip:4] 
Wait(SIP/sipcall.ch-008d, 2) in new stack
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042282, ts 
1387619782, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042283, ts 
1387619942, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042284, ts 
1387620102, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042285, ts 
1387620262, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042286, ts 
1387620422, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042287, ts 
1387620582, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042288, ts 
1387620742, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042289, ts 
1387620902, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042290, ts 
1387621062, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq 042291, ts 
1387621222, len 000160)
Got  RTP packet from123.456.789.123:20600 (type 00, seq