regarding asterisk port map and cdr issue.

Hi all,

I have successfully set up a asterisk server. i have a small issue Im connecting to the internet via adsl router with a dynamic Ip address. So now i need to map port on the router to asterisk server for sip trunk and normal sip phones.

I have a three problems.

1 / What are the ports i have to map on the adsl router to asterisk server
2 / I have a dynamic IP. so it change overtime i restart my router. Is thr any solution to overcome that. Can we use DDNS for this purpose. Because static ip addresses are verry expensive my country.
3 / whr i can find the cdrs for answered calls. I tried on /var/log/asterisk/cdr-cvs/ but its empty.

Thx.
LVL 12
acl-puzzAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

grbladesCommented:
Sip uses tcp port 5060
rdp (udp protocol) is used for voice. Check rdp.conf for the ports but it is normally 10000-20000

yes you can use ddns and then use externhost= in sip.conf

also define nat=yes for your provider connection and canreinvite=nonat as a global setting
0
grbladesCommented:
I'll elaborate a bit more now that I have a proper keyboard to use.
SIP does not work well through a NAT firewall. Defining externhost and localnet allows it to notify the other end of the correct IP address to connect to which avoids most of the problems.
The other thing to be carefull of that asterisk does not attempt to switch the audio path directly between the telephone on your local network and the service provider. Defining nat and canreinvite as I memtioned earlier will stop asterisk switching itself out of the audio path for calls involving the connection to the service provider.

With regard to cdr information this is something you need to configure. Have a look at the config files starting with cdr. I would advise that you configure logging to a postgres or mysql database as that generally makes reading the data much easier and when its in one of those databases you can get free software to query it via a web interface.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
feptiasCommented:
One small correction: protocol is RTP and file is rtp.conf (not rdp and rdp.conf).
0
Powerful Yet Easy-to-Use Network Monitoring

Identify excessive bandwidth utilization or unexpected application traffic with SolarWinds Bandwidth Analyzer Pack.

acl-puzzAuthor Commented:
Thanks grblades iam at office right now will look inoto inputs provided by you and get back to you soon
0
acl-puzzAuthor Commented:
I did as u said.
I forward the 5060 port.

My rtp config file show like this

[root@localhost ~]# cat /etc/asterisk/rtp.conf
;
; RTP Configuration
;
[general]
;
; RTP start and RTP end configure start and end addresses
;
rtpstart=10000
rtpend=20000
[root@localhost ~]#


But how can we forward 10000 to 20000 to a single port  ?
please advice.

cant we forward all port to the server ip. then will this issue resolve ?

Astrisk debug

  -- Registered SIP '100' at 93.96.53.250 port 54860
    -- Unregistered SIP '100'
    -- Registered SIP '100' at 93.96.53.250 port 54860
    -- Unregistered SIP '100'

it get unregister when trying to take a call from internet side.

please advice.
0
grbladesCommented:
You need to forward the port range 10000-20000 on the router to the same range of ports on asterisk.

What is the item registering as 100. It looks like you have a phone connecting over the internet to your system.
0
acl-puzzAuthor Commented:
but how to forward that much of range
we can enter start port
end port
and map port

cant enter range of destination ports...


Yes its sip phone extension with 100 successfully logged to asterisk. But when it trying to dial a number  asterisk shows -- Unregistered SIP '100' mesage and call get failed.
0
grbladesCommented:
Map port should be set to 10000. It will map the range correctly but doesn't need to be told the end port to map to as it can work it out

looks like the phone is also behind a nat firewall as the port is not 5060
0
acl-puzzAuthor Commented:
here is my whole stroy of astrick so far

 have successfully installed asterisk server and connected to normal pstn line. But thr is a small problem, because when the asterisk going to pick the pstn line it will get some time to give the dialtone. It various from 5sec to 10 due to exchange congestion. But asterisk dont detect the dial tone before get the channel and dial the number. It just pick the channel and dial the number. But after few second dial tone get feed and it can hear to the other party.

So i need to asterisk to detect the dialtone before dial. Is thr any option that i can do ?


Thanks
0
grbladesCommented:
Normally you edit the zaptel (or dahdi if its a newer asterisk version) configuration file which contains country information and it uses that so it can detect the correct type of dialtone.

What pstn interface are you using?
0
acl-puzzAuthor Commented:
Thanks man
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
IP Telephony

From novice to tech pro — start learning today.