Link to home
Start Free TrialLog in
Avatar of acl-puzz
acl-puzzFlag for India

asked on

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.
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

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
ASKER CERTIFIED SOLUTION
Avatar of grblades
grblades
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Member_2_1968385
One small correction: protocol is RTP and file is rtp.conf (not rdp and rdp.conf).
Avatar of acl-puzz

ASKER

Thanks grblades iam at office right now will look inoto inputs provided by you and get back to you soon
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.
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.
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.
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
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
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?
Thanks man