I have just upgraded an Asterisk 1.6.2-9 to Asterisk 1.8.13-1 (Debian distribution) and started to notice a problem with Avaya IP 500, configured as Asterisk’s peer and Avaya’s IP trunk : all the outbound calls (Avaya -> Asterisk) are refused since they are routed to the default context instead of the peer specific one.
This is the INVITE trace :
<INVITE sip:firstname.lastname@example.org SIP/2.0 Via: SIP/2.0/UDP 10.1.1.179:5061;rport;branch=z9hG4bK36501385531d82ea01f6b96a100b85b3 From: "sipaccount" <sip:email@example.com>;tag=c9236b471d56b0a0 To: <sip:firstname.lastname@example.org> Call-ID: email@example.com CSeq: 1888206299 INVITE Contact: "sipaccount" <sip:firstname.lastname@example.org:5061;transport=udp> Max-Forwards: 70 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY, INFO, UPDATE ontent-Type: application/sdp Supported: timer P-Asserted-Identity: "sipaccount" <sip:email@example.com:5061> Content-Length: 223 v=0 o=UserA 2058485307 1461382690 IN IP4 10.1.1.179 s=Session SDP c=IN IP4 10.1.1.179 t=0 0 m=audio 49156 RTP/AVP 18 101 a=rtpmap:18 G729/8000 a=fmtp:18 annexb=no a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 <-------------> --- (13 headers 10 lines) --- Sending to y.y.y.y:5061 (NAT) Using INVITE request as basis request - firstname.lastname@example.org No matching peer for 'callerid' from 'y.y.y.y:5061' Found RTP audio format 18 Found RTP audio format 101 Found audio description format G729 for ID 18 Found audio description format telephone-event for ID 101 Capabilities: us - 0x10e (gsm|ulaw|alaw|g729), peer - audio=0x100 (g729)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x100 (g729) Non-codec capabilities (dtmf): us - 0x1 (telephone-event|), peer - 0x1 (telephone-event|), combined - 0x1 (telephone-event|) Peer audio RTP is at port 10.1.1.179:49156 Looking for callednumber in incoming-sip (domain x.x.x.x) [Oct 23 14:33:10] NOTICE: chan_sip.c:22753 handle_request_invite: Call from '' (y.y.y.y:5061) to extension 'callednum' rejected because extension not found in context 'incoming-sip'.
incoming-sip is the default context set in sip.conf, while the peer should use external-default as default context.
x.x.x.x is the public Asterisk IP address while y.y.y.y is the Avaya IP address.
The peer configuration is :
[sipaccount] accountcode=54042 callerid=calleridnumber secret=xxxxxxxxxxxxxx type=peer host=dynamic dtmf=rfc2833 context=external-default nat=yes qualify=yes
This problem seems to only happen when the peer is not registered to Asterisk. When the peer is registered the calls gets thru. Unfortunately the peer (Avaya) keeps to register and de-register continuosly (every 60 seconds) due to network topology and I can’t do anything about it since I have no way to access Avaya firewall.
As far as I can see the problem is that Asterisk 1.6 was not caring too much about Invite FROM while Asterisk 1.8 doesn’t likes the fact the Avaya uses the Asterisk’s IP address in the uri part of the Invite FROM, but I’m not sure.
Do you have any ideas on how can I solve this problem ?
I have already tried to change Avaya configuration to make it send From: “sipaccount” sip:email@example.com in the INVITE but I wasn’t able to do so.
Thanks a lot!