Summary: | ASTERISK-17819: error on SIP INVITE when host's external IP changes | ||
Reporter: | newborn (newborn) | Labels: | |
Date Opened: | 2011-05-09 08:58:25 | Date Closed: | 2011-05-10 17:14:13 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_sip/General |
Versions: | 1.6.2.18 | Frequency of Occurrence | |
Related Issues: | |||
Environment: | Attachments: | ||
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@91.77.113.139>;tag=as1c3b8a40 To: <sip:0100@***.***.***.***> Contact: <sip:6001@91.77.113.139> Call-ID: 7a50c20b4e7b47416716ba90032a1ba2@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@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. | ||
Comments: | By: newborn (newborn) 2011-05-09 08:59:24 client C connecing to B directly, inside NAT By: Leif Madsen (lmadsen) 2011-05-09 09:20:36 I think you'll need to provide some additional information, such as the configuration of your peers so this can be reproduced. By: newborn (newborn) 2011-05-09 10:31:37 host A: <pre> 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 </pre> Host B: <pre> 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 </pre> Host C is a Linksys SPA-901 Phone. it registers on Host B locally (sip_conf provided from PostgreSQL) <pre> 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@192.168.10.220:5060 | | 5060 | yes | no | 3 | | 6001 | 15 | Linksys/SPA901-5.1.5 </pre> By: newborn (newborn) 2011-05-09 10:54:18 so i googled the internets and did not found any solution. this issue describes something like a DNS internal cache. asterisk resolves hostnames written in [peer] tab only on reboot or reloading sip module, i think By: newborn (newborn) 2011-05-09 13:52:43 sorry, duplicating issue https://issues.asterisk.org/view.php?id=18662 need to add fromuser= at host B. By: newborn (newborn) 2011-05-09 13:53:03 problem resolved |