Hosting using Elastix Server and Cisco 2850

snakeapit

Joined
Oct 20, 2009
Messages
19
Likes
0
Points
0
#1
Dear expert,

I want to setup a hosted provider using Elastix server, but i'm having trouble with getting the incoming and outgoing call working correctly. Currently we have 100 numbers range of DID from our provider to use and I we are currently using cisco 2850 which had E1 card and trunking to Elastix server. Both of them are using public ip that connect to the world.

E1-------->Cisco 2850------>internet------>Elastix Server

Two Major issues

1. outbound call sought of working but i can only hear one-way audio, and the calls cut off after 20 seconds.

2. Incoming call not working at all.

I'm wondering if anyone can help me or guide me on fixing up these issues? Appreciated your help, if i can set it up correctly, I'm happy to write a documentation for this ....here is my current settings...and sorry for my poor English


Elastix
Trunk name: Cisco 2850
host=<IP of Cisco 2850>
type=peer
disallow=all
allow=ulaw
qualify=yes
canreinvite=no
bindport=5060
insecure=yes
context=from-trunk
nat=yes


Not sure im doing right as i added some context on sip_general_custom.conf

externip=<IP of Cisco 2850>
localnet=<IP of Cisco 2850>
bindport=5060
bindaddr=0.0.0.0
nat=yes
context=from-internal
externrefresh=10
allowguest=no
language=au
videosupport=yes
maxexpirey=3600
rtptimeout=60
rtpholdtimeout=120
allow=ulaw
allow=alaw
disallow=all
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#2
Please read "Elastix Without Tears" for a more detailed explanation of how VOIP and networks works.

Specifically in your case and if the Elastix Box is behind a router:

externip=<IP of Cisco 2850>
Should be the externally presented IP of the Elastix box if it is behind a PNAT box (i.e. the external interface address)

wget -q -O - checkip.dyndns.org:8245|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'

will display it for you. (that's a "one-liner" )

localnet=<IP of Cisco 2850>
should be a network (not an IP) of the format network/netmask for example 192.168.0.0/255.255.255.0 this network will refer to your "local network"

These settings are better set in sip_nat.conf so that normal precedence of "included files" will take effect and a more understandable granularity.

If you have a static IP you don't need either.
 

snakeapit

Joined
Oct 20, 2009
Messages
19
Likes
0
Points
0
#3
Thanks dicko,

I've tried changing the externip and localnet to IP of the elastix box, and I changed the cisco config on sip-ua to give cisco and elastix an authentication, and it works for incoming call but both party cannot hear each other talking, also outgoing call stil cutting off after 19 seconds. What could cause the issue?? NAT or Codec problems.
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#4
Just to make sure please post exactly your

externip and localnet (obfuscate the last two octets of your externip)

I say that because you say ". . . I've tried changing the externip and localnet to IP of the elastix box . . ." the externip will not be the same as the ip of the local box if you are in PNAT world and either way localnet is a network not an IP. (if there is no NAT involved as I said before you need neither of these, they are used to rewrite the SIP headers appropriately for NATting)

That the audio stream is not passing is often a problem of the too clever PNAT box re-writing the ports on the inbound RTP connection between UDP/10000 and UDP/20000 which of course must also be open on the firewall(use tcpdump to check), if the Cisico is doing that then the result is no audio and calls being cut off on session timeout. (I'm not a cisco fan, but google your particular router for VOIP/SIP settings) or try it with a POS linksys/etc.

I doubt that it's a codec issue as the call would never complete if there was not a matching pair of protocols.
 

snakeapit

Joined
Oct 20, 2009
Messages
19
Likes
0
Points
0
#5
THanks for prompt reply, here is my sip_nat.conf details

externip=203.102.1xx.1xx
localnet=203.102.1xx.0/255.255.255.240

somehow 19 seconds is the CISCO time-out to wait for ACK from SIP server, it seems that the ACK from elastix is not reaching CISCO when the user picks up the phone
 

dicko

Joined
Oct 24, 2008
Messages
4,099
Likes
0
Points
0
#6
Ah, another Aussie

Then you need neither, you are static and the headers don't need rewriting.


From the Asterisk CLI

sip debug ip <of the CISCO> might be diagnostic, each sent SIP packets expects a reply, they come from both the agent (the Cisco in your case) and the server(Elastix), any header with "retry" in it points to a misconfigured router or a misbehaving endpoint. When a session (the S in SIP) is negotiated it will hopefully end with success if it is a call there will be rtp packets (rtp debug) passing both ways (the voice bit of the call, i.e. the session itself in this case)

by default all the signaling should be on port 5060 between the two and tcpdump should show the connections up and symetrical, i.e. that the ports are not being rewritten, all audio is "somewhere else" 10000 - 20000 in Elastix, check your Cisco that it agrees and also that it is not trying to use TCP instead of UDP (unsupported in Asterisk 1.4) .


I note that you have a NAT=yes in your config, yet you don't have any NAT going on, how-so?.
Your rtptimeout is 60 but your calls drop after 19 so direct your attention to the Cisco end for the traffic analysis

I further note that for host IP 203.102.1xx.1xx is not within your stated network (localnet=203.102.1xx.0/255.255.255.240(a /28 (4 bit) network,encompassing a range of 16 address between 203.102.1xx.0 and 15)), I assume you so obfuscated as suggested and this is a red-herring.

The last point is that you have posted:

sip_general_custom.conf
.
.
allow=ulaw
allow=alaw
disallow=all


by the documented rules of included files in sip.conf (sip_general_custom.conf is the last included file) the disallow=all has actually turned off all your codecs, you can place all the necessary stuff (video?, ) in the Elastix trunk page but disallow=all BEFORE you allow. (try reading up on sip.conf and it's includes at http://voip-info.org as to what you need and where it belongs , nationalizations and general rules should be first, trunk specifics like contexts and codecs you should do in Elastix)

regards dicko
 

Members online

No members online now.

Latest posts

Forum statistics

Threads
30,901
Messages
130,885
Members
17,561
Latest member
marouen
Top