[Home]

Summary:ASTERISK-22579: peer is not matched to an IP address
Reporter:Private Name (falves11)Labels:
Date Opened:2013-09-23 21:38:09Date Closed:2013-09-28 17:25:23
Priority:MajorRegression?
Status:Closed/CompleteComponents:Channels/chan_sip/Interoperability
Versions:11.5.1 Frequency of
Occurrence
Related
Issues:
Environment:debian 64Attachments:( 0) mypeer.txt
( 1) trace.txt
Description:My peer is behind a NAT.
The peer definition is

{noformat}
[XXXX.YYY.ZZ.PPP]
type=peer
host=XXXX.YYY.ZZ.PPP
insecure=port,invite
directrtpsetup=no
directmedia=no
nat=comedia,force_rport
{noformat}

In spite if that, when I place a call, the bridging always shows "remotely bridging". This is wrong, so I started to investigate and found that when I have the call connected, and type
{noformat}
Using SIP RTP CoS mark 5
   -- Called SIP/19544447408@67.xx.237.xx
   -- SIP/67.xx.237.xx-00009fc6 is making progress passing it to SIP/8.xx.245.xx-00009fc5
   -- SIP/67.xx.237.xx-00009fc6 answered SIP/8.xx.245.xx-00009fc5
   -- Remotely bridging SIP/8.xx.245.xx-00009fc5 and SIP/67.xx.237.xx-00009fc6
{noformat}

{noformat}
sys254*CLI> sip show channels
Peer             User/ANR         Call ID          Format           Hold     Last Message    Expiry     Peer
67.xx.237.xx    19544447408      507f0a921c46ce6  (ulaw)           No       Tx: ACK                    <guest>
8.xx.245.xx      Asterisk         NGY0NzE5ZjBlNDI  (ulaw)           No       Rx: ACK                    <guest>
2 active SIP dialogs
{noformat}

The call drops after a few seconds because my peer never gets a packet.
If you look closely, "8.xx.245.xx      Asterisk         NGY0NzE5ZjBlNDI " this is the issue. The IP is that of my Asterisk server, not of my peer. It is not matching my peer to the IP address, thus, the NAT and media configuration are not being used.

If I set the server as a whole, in the [general] section to my nat and media restrictions, then it works fine.
This means that something is broken with Asterisk 11, something that worked fine before.

I can give a developer access 24x7 to my server. He/she may send a call from behind a NAT. I will create a peer with the IP address, and the issue will be evident.





Comments:By: Rusty Newton (rnewton) 2013-09-25 20:37:16.072-0500

There is not enough information here to verify the issue that you describe.


https://wiki.asterisk.org/wiki/display/AST/Collecting+Debug+Information

* Please follow the instructions above and provide a full DEBUG and VERBOSE log, with verbose and debug turned up to 5 (see asterisk.conf to set this where they will affect log output from logger.conf)

* Be sure to use "sip set debug on" so that we have SIP packets in the debug log.

* We need to see the log with the complete call path from beginning to end.

* Please attach your sanitized sip.conf.

By: Private Name (falves11) 2013-09-27 18:43:07.620-0500

Please close the case.
I cannot reproduce it with current svn

By: Private Name (falves11) 2013-09-28 18:49:10.480-0500

I need to reopen the case, I have the traces.

By: Private Name (falves11) 2013-09-28 18:51:40.073-0500

My peer definition, please note the ip address and context, plus insecure=port,invite. This peer should be matched by IP only

By: Private Name (falves11) 2013-09-28 18:53:59.003-0500

This is the trace when I call from the IP address of the peer. It does match it and it sends the call to the generic SIP context, which does not exist.
I need this peer to be matched by IP only, regardless of port. This works fine in PJSIP and Asterisk12

By: Walter Doekes (wdoekes) 2013-09-29 13:51:44.868-0500

{quote}
{noformat}
 ToHost       : 9.19.245.8
{noformat}
...
{noformat}
[Sep 28 19:46:37] NOTICE[11895][C-00000004]: chan_sip.c:25413 handle_request_invite: Call from '' (8.19.245.8:15740) to extension '17274907253' rejected because extension not found in context 'default'.
{noformat}
{quote}

Did you try writing the right IP?

By: Private Name (falves11) 2013-09-29 16:30:55.494-0500

You are right. Please close the case.