[asterisk-bugs] [Asterisk 0019252]: error on SIP INVITE when host's external IP changes

Asterisk Bug Tracker noreply at bugs.digium.com
Mon May 9 10:31:37 CDT 2011


A NOTE has been added to this issue. 
====================================================================== 
https://issues.asterisk.org/view.php?id=19252 
====================================================================== 
Reported By:                Newborn
Assigned To:                
====================================================================== 
Project:                    Asterisk
Issue ID:                   19252
Category:                   Channels/chan_sip/General
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     feedback
Asterisk Version:           1.6.2.18 
JIRA:                        
Regression:                 No 
Reviewboard Link:            
SVN Branch (only for SVN checkouts, not tarball releases): N/A 
SVN Revision (number only!):  
Request Review:              
====================================================================== 
Date Submitted:             2011-05-09 08:58 CDT
Last Modified:              2011-05-09 10:31 CDT
====================================================================== 
Summary:                    error on SIP INVITE when host's external IP changes
Description: 
I have got 2 Asterisk boxes connected to each other via Internet (both are
behind NAT). One have static IP (A), other is dynamic (B). Dynamic
registers to static respectively. Other client C is connected to B and
placing a call via B to A.  So when public IP of host B changes, I cannot
place calls using client C, from B to A, until Asterisk A is being
rebooted. dnsmgr is enabled. when i tracert to host B, i see the correct IP
address, as above in SIP headers.

some logs...

<--- SIP read from UDP:91.77.113.139:5060 --->
INVITE sip:0100@***.***.***.*** SIP/2.0
Via: SIP/2.0/UDP 91.77.113.139:5060;branch=z9hG4bK3b9d829a;rport
Max-Forwards: 70
From: "6001" <sip:6001 at 91.77.113.139>;tag=as1c3b8a40
To: <sip:0100@***.***.***.***>
Contact: <sip:6001 at 91.77.113.139>
Call-ID: 7a50c20b4e7b47416716ba90032a1ba2 at 91.77.113.139
CSeq: 102 INVITE
User-Agent: Asterisk PBX 1.6.2.18
Date: Mon, 09 May 2011 13:55:17 GMT
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO
Supported: replaces, timer
Content-Type: application/sdp
Content-Length: 239

v=0
o=root 1783255373 1783255373 IN IP4 91.77.113.139
s=Asterisk PBX 1.6.2.18
c=IN IP4 91.77.113.139
t=0 0
m=audio 23832 RTP/AVP 8 101
a=rtpmap:8 PCMA/8000
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16
a=ptime:20
a=sendrecv

<------------->

[May  9 17:40:45] Using INVITE request as basis request -
6f1763b03df75d2909c749c53f7939fe at 91.77.155.19
[May  9 17:40:45] No matching peer for '6001' from '91.77.155.19:5060'
[May  9 17:40:45] Found RTP audio format 8
[May  9 17:40:45] Found RTP audio format 101
[May  9 17:40:45] Found audio description format PCMA for ID 8
[May  9 17:40:45] Found audio description format telephone-event for ID
101
[May  9 17:40:45] Capabilities: us - 0x8000e (gsm|ulaw|alaw|h263), peer -
audio=0x8 (alaw)/video=0x0 (nothing)/text=0x0 (nothing), combined - 0x8
(alaw)
[May  9 17:40:45] Non-codec capabilities (dtmf): us - 0x1
(telephone-event), peer - 0x1 (telephone-event), combined - 0x1
(telephone-event)
[May  9 17:40:45] Peer audio RTP is at port 91.77.155.19:22076
[May  9 17:40:45] Looking for 0100 in default (domain ***.***.***.***)
[May  9 17:40:45]
<--- Reliably Transmitting (NAT) to 91.77.155.19:5060 --->
SIP/2.0 404 Not Found


6001 is client C peer.
====================================================================== 

---------------------------------------------------------------------- 
 (0134668) Newborn (reporter) - 2011-05-09 10:31
 https://issues.asterisk.org/view.php?id=19252#c134668 
---------------------------------------------------------------------- 
host A:

register => siptrunk_hostA:----@**.zapto.org
...

[siptrunk_hostB]
defaultuser=siptrunk_hostB
type=peer
host=**.zapto.org
context=internal-siptrunk
secret=-----
qualify=yes
qualifyfreq=25
disallow=all
allow=alaw
canreinvite=yes
nat=yes


Host B:

externhost=***.zapto.org

[siptrunk_HostA]
defaultuser=siptrunk_HostA
type=friend
host=dynamic
context=internal-siptrunk
secret=-----
qualify=yes
qualifyfreq=30
disallow=all
allow=alaw
canreinvite=yes

Host C is a Linksys SPA-901 Phone.
it registers on Host B locally (sip_conf provided from PostgreSQL)


 id | name | accountcode | amaflags | callgroup | callerid | canreinvite |
conte
xt  | defaultip | dtmfmode | fromuser | fromdomain |  host   | insecure |
langua
ge | mailbox | md5secret | nat |      permit       | deny | mask |
pickupgroup |
 restrictcid | rtptimeout | rtpholdtimeout |   secret    |  type  |
disallow |
 allow   | musiconhold | regseconds |     ipaddr     | regexten |
cancallforward
 |         fullcontact          | setvar | port | qualify | disable_mwi |
call-l
imit | regserver | defaultuser | lastms |      useragent
----+------+-------------+----------+-----------+----------+-------------+------
----+-----------+----------+----------+------------+---------+----------+-------
---+---------+-----------+-----+-------------------+------+------+-------------+
-------------+------------+----------------+-------------+--------+----------+--
---------+-------------+------------+----------------+----------+---------------
-+------------------------------+--------+------+---------+-------------+-------
-----+-----------+-------------+--------+----------------------
  1 | 6001 |             |          |           |          | no          |
inter
nal |           |          |          |            | dynamic |          |
   |         |           | no  | 192.168.10.220/32 |      |      |        
    |
             |            |                | 6001***** | friend | all     
| a
law;ulaw |             | 1304955073 | 192.168.10.220 |          | yes
 | sip:6001 at 192.168.10.220:5060 |        | 5060 | yes     | no          |
   3 |           | 6001        | 15     | Linksys/SPA901-5.1.5 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-05-09 10:31 Newborn        Note Added: 0134668                          
======================================================================




More information about the asterisk-bugs mailing list