Project

General

Profile

SIP peer to avaya UNREACHABLE

Added by Martin Reckziegel about 10 years ago

Hi,

got a clean install of 3.0 on asterisk 1.8. Trying to connect to an avaya CM5.2 I am running an asterisk11 server for conferences, sip connection works both to clan directly (tcp) or over SES (UDP). I have mirrored the configuration from the conference server, but i get UNREACHABLE peer when I run sip show peers...calls from avaya side work just find and reach me on the sip phone connected to go autodial system...both see and clan. But the other way around from asterisk to avaya just don't work.

here are the sip configurations: (i have fiddled with all possible combinations but none work)

[general]
;regcontext=dundiextens
;domain=avon.com
nat=no
;type=peer
context=default
allowoverlap=no
;transport=tcp
udpbindaddr=134.65.216.137
;tlsbindaddr=134.65.216.137
allowtransfer=yes
bindport=5060
bindaddr=0.0.0.0
srvlookup=yes
tcpenable=yes
disallow=all
;allow=g729
;allow=g726
allow=ulaw
allow=alaw
allow=gsm
qualify=yes
canreinvite=no
allowguest=no
allowrefer=yes
trustprid=yes
sendprid=yes
fromdomain=avon.com
;tlsenable=yes
#include sip-vicidial.conf

[servera]
domain=avon.com
;tcpenable=yes
fromdomain=avon.com
qualify=yes
type=peer
;callerid =<111>
host=172.20.27.10
context=default
;context=conference-entry
transport=tcp
dtmfmode=auto
port=5060
trustprid=yes
sendprid=yes

and this is what i get:

avaya-out 172.20.27.45 5060 OK (49 ms)
avayaCM 172.20.27.45 5060 OK (46 ms)
servera 172.20.27.10 5060 UNREACHABLE

avaya-out and avayaCM are SES server...connection is okay, but calls dont pass as well with no noticeable error on the cli.

Guys any tip on what could this be?

Thanks a lot

Martin


Replies (13)

RE: SIP peer to avaya UNREACHABLE - Added by Regie Irupang about 10 years ago

Hi Martin,

Have you check if there is a firewall that preventing handshake on several server and to your asterisk server? please post your VOIP diagram for us to check.

Thanks.

RE: SIP peer to avaya UNREACHABLE - Added by Martin Reckziegel about 10 years ago

Hi thanks for your reply!

I am not really aware of the VOIP diagram, dont have access to it as this is a corporate environment. All i know is i have an sitting right next to it, wihin the same ip range (therefore using the same network infrastructure) where the sip peer to avaya clan works flawlessly. I just saw this in the sip debug:

[Feb 13 11:13:19] Retransmitting #3 (no NAT) to 172.21.26.10:5060:
OPTIONS sip:172.21.26.10;cpd=on SIP/2.0
Via: SIP/2.0/UDP 134.65.216.130:5060;branch=z9hG4bK76d2144f;rport
From: "asterisk" <sip:>;tag=as3a7033b7
To: <sip:172.21.26.10;cpd=on>
Contact: <sip:>
Call-ID:
CSeq: 102 OPTIONS
User-Agent: Asterisk PBX
Max-Forwards: 70
Date: Thu, 13 Feb 2014 10:13:16 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces
Content-Length: 0

Is it possible that the transport is set to UDP even when i declared tcpenable=yes, transport=tcp in the sip.conf? Maybe it is some asterisk flaw?

Thanks a lot

Martin

RE: SIP peer to avaya UNREACHABLE - Added by Demian Biscocho about 10 years ago

Asterisk by default runs SIP on UDP. If you need to enable TCP, follow this link: http://rene.bz/using-sip-over-tcp-with-asterisk/. You might need to upgrade to Asterisk 1.8 to have TCP support for SIP. Please check our Wiki on how to upgrade Asterisk to 1.8.

RE: SIP peer to avaya UNREACHABLE - Added by Martin Reckziegel about 10 years ago

Hi

thanks for your reply. If you check the config files i pasted, i have all that is described in the tutorial set. Also I noted that I am already on asterisk 1.8 (followed the tutorial on your wiki). Still the sip peer is unreachable. I also tried passing it over see (therefore UDP). Incoming calls from avaya work fine but outbound from asterisk are still blocked for some reason. Iptables, fail2ban and selinux all disabled. I am really hopeless...thanks

RE: SIP peer to avaya UNREACHABLE - Added by Martin Reckziegel about 10 years ago

Ok one additional thing i found out. I already have an asterisk11 system running on ubuntu 12 connected to avaya over a sip tcp trunk working just fine. When i pass the calls from goautodial server to this asterisk machine and then to avaya i get a connection. However i am facing a one way audio issue once i get a connection with the dialed nimber inside the meetme conference. I believe the rtp stream has to be blocked by something. It is weird since both the machines are on the same network. There is no nat, all avaya, goautodial and asterisk11 are on the same local network. Also when i make a direct call using sip phone connected to goautodial theu asterisk11 to avaya extension, all is good and there is no one way audio.Any help guys?
Thanks a lot

RE: SIP peer to avaya UNREACHABLE - Added by Martin Reckziegel about 10 years ago

Hey guys, I wonder if there has ever been any news about this issue and if anyone else has it. Still cant hook up goautodial 3.3 running on asterisk 1.8 to avaya. Wether to clan directly using tcp, or to sip enablement services server over both tcp / udp. I found this article saying asterisk 1.8 needs to have the chan_sip patched before compiling otherwise it has issue in tcp mode. Is there anyway to recompile or i am just out of luck? Any help in this issue would be much appreciated. I have all the things from the suggested link (http://rene.bz/using-sip-over-tcp-with-asterisk/) placed in and yet again, using a clean asterisk11 as a proxy to route the calls to avaya over, works. So port 5060 is indeed open.

Thank you very much

Martin

RE: SIP peer to avaya UNREACHABLE - Added by Demian Biscocho about 10 years ago

Try going to the Asterisk forums and see if they can help. What needs to get done is to have Asterisk talk to your Avaya system properly. If you need to recompile Asterisk, you can get the SRPM from our repo. Here's the direct link: http://downloads2.goautodial.org/centos/5/current/SRPMS/asterisk-1.8.23.0-1_centos5.go.src.rpm.

RE: SIP peer to avaya UNREACHABLE - Added by Martin Reckziegel about 10 years ago

Demian thanks a lot. You pointed me to a right direction. Anyway guys there is an error in the chan_sip.c source. Once I changed that and recompiled all sip related issues i had connecting to avaya are gone. Sip peer now reports as reachable, calling bot ways works. This is what actually needed to be adjusted in the chan_sip.c file:

orig:

if (!sip_standard_port(p->socket.type, ourport)) {
if (p->socket.type == SIP_TRANSPORT_UDP) {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s:%d\r\n", exten, domain, ourport);
} else {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s:%d;transport=%s\r\n", exten, domain, ourport, sip_get_transport(p->socket.type));
}
} else {
if (p->socket.type == SIP_TRANSPORT_UDP) {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s\r\n", exten, domain);
} else {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s:%d;transport=%s\r\n", exten, domain, ourport, sip_get_transport(p->socket.type));
}
}

new:

if (!sip_standard_port(p->socket.type, ourport)) {
if (p->socket.type SIP_TRANSPORT_UDP) {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s:%d\r\n", exten, domain, ourport);
} else {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s:%d\r\n", exten, domain, ourport);
}
} else {
if (p->socket.type SIP_TRANSPORT_UDP) {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s\r\n", exten, domain);
} else {
ast_str_append(&out, 0, "Message-Account: sip:%s@%s\r\n", exten, domain);
}
}

Would be great if this could be added to the asterisk 1.8 that you guys offer. Btw is there any chance to see if all components are running okay on my go autodial install after the recompile?

Thanks

M.

RE: SIP peer to avaya UNREACHABLE - Added by Demian Biscocho about 10 years ago

Glad to hear you were able to fix it. We'll rebuild the Asterisk SRPM and have this fix available. Can you tell us which line in chan_sip.c we need to change? Can you also post the URL for this particular Asterisk bug?

If you recompiled the Asterisk SRPM from our repo with the fix included then you're good to go.

RE: SIP peer to avaya UNREACHABLE - Added by Martin Reckziegel about 10 years ago

The line in chan_sip.c is 13481, you can find the whole piece of code i pasted in the previous post. Never found any asterisk bug like this. Just some guy writing about it in his post. Pasted the link to the forum in previous posts... I was totally desperate and just tried it out. It fixed all my issues flawlessly. Looks like the whole system is stable up and running. Just had an issue with mysql rights for the root user. Fixed it and all looks good :-)

Thanks a lot for your help

Martin

RE: SIP peer to avaya UNREACHABLE - Added by Demian Biscocho about 10 years ago

Can you double check the changes needed above? We're getting these errors when we apply the channes to chan_sip.c:

   [CC] chan_phone.c -> chan_phone.o
   [LD] chan_phone.o -> chan_phone.so
   [CC] chan_sip-new.c -> chan_sip-new.o
chan_sip-new.c: In function 'transmit_notify_with_mwi':
chan_sip-new.c:13482: error: expected ')' before 'SIP_TRANSPORT_UDP'
chan_sip-new.c:13488: error: expected ')' before 'SIP_TRANSPORT_UDP'
make[1]: *** [chan_sip-new.o] Error 1
make: *** [channels] Error 2

RE: SIP peer to avaya UNREACHABLE - Added by Martin Reckziegel about 10 years ago

I am attaching the chan_sip.c that i used for compilation. The only issues i had was that app_meetme.so was not working as i had to compile dahdi first before the asterisk compilation. Besides that no issues whatsoever. Please check this link http://voipspot.wordpress.com/2012/03/08/avaya-cm-to-asterisk-voicemail-without-sip-enablement-server-ses-or-session-manager/ you have both old and new piece of code over there. Verify that you are replacing the whole piece of code and that it is the correct code. For me the piece of the code that needed adjustment was starting after line 13480 and the whole block needs to be replaced.
Thanks

M.

RE: SIP peer to avaya UNREACHABLE - Added by Demian Biscocho about 10 years ago

That did the trick. We'll be uploading the updated RPMS later in our repo. This should be available via "yum update".

    (1-13/13)
    Go to top