Hi all members.
I have strange situation.
I have absolutly same configuration for 2 incoming trunks, only differnce is IP address for these 2 trunks
deny=all
disallow=all
type=peer
qualify=yes
nat=no
insecure=invite
host=First.IP.ADD.RESS
context=from-trunk
canreinvite=yes
allow=ulaw&alaw
deny=all
disallow=all
type=peer
qualify=yes
nat=no
insecure=invite
host=Second.IP.ADD.RESS
context=from-trunk
canreinvite=yes
allow=ulaw&alaw
during call from First IP address is reaching needful peer , the call from second IP address is not reaching.
FIRST CALL TRACE
<— SIP read from UDP:First.Ip.Add.Ress:5060 —>
INVITE sip:Callee_Number@Asterisk.External.IP.ADDRESS;user=phone SIP/2.0
Via: SIP/2.0/UDP First.Ip.Add.Ress:5060****************;rport;branch=z9hG4bK-**********************************************************************************************************************************************************************************************
sending to First.Ip.Add.Ress:5060 (NAT)
Using INVITE request as basis request - 779477725ec111e8a4e60050568822ed@VIA.IP.ADD.RESS
May 23 15:42:48
VERBOSE
[3490] chan_sip.c:
Found peer ‘FIRST PEER’ for ‘Caller_ID’ from First.Ip.Add.Ress:5060
Second Call Log
SIP read from UDP:Asterisk.Local.IP.Address:5404 —>
INVITE sip:Callee_Number@Asterisk.External.IP.Address;user=phone SIP/2.0
Via: SIP/2.0/UDP Second.IP.ADD.RESS:5061;rport;branch=z9hG4bK-1047902642-3893459294-3170422966-318326802
From: sip:Caller_ID@Second.IP.ADD.RESS:5061;user=phone;tag=2624043442-3893459294-3170422966-318326802
To: sip:Callee_Number@Asterisk.External.IP.Address;user=phone
— (14 headers 12 lines) —
May 23 07:09:01
VERBOSE
[3490] chan_sip.c:
Sending to Asterisk.Local.IP.Address:5404 (NAT)
May 23 07:09:01
VERBOSE
[3490] chan_sip.c:
Using INVITE request as basis request - b2b967a65e7911e8b6d0f8bc1248f912@Second.IP.ADD.RESS
May 23 07:09:01
VERBOSE
[3490] chan_sip.c:
No matching peer for ‘Caller_ID’ from ‘Asterisk.Local.IP.Address:5404’
May 23 07:09:01
For some reason second call is getting invite from 192.168.1.1 (Router Local IP address)
but not from Second.Ip.ADDRESS / i’m not sure but here is possible issue
@armfranc,
You have not provided network configuration which is necessary for this kind of issues.
- As I understood from this section:
- your Asterisk server has a private IP address, and NAT is performed by a router. Is this correct?
- Could you please provide [general] section of sip.conf (omittimg any public IP addresses)?
- It would be hard to determine root cause without real packet traces (tcpdump).
[general]
nat=yes
externip=Asterisk.External.IP.Address
localnet=192.168.1.0/255.255.255.0
Yes asterisk local address is 192.168.1.3
Pfsense router Local Address is 192.168.1.1
Pfsense wan interface IP address is Asterisk.External.IP.Address (sip ports are forwarede correctly to 192…168.1.3)
In regard tcpdump how can i enable , and where ?
Type “man tcpdump” at the Linux shell prompt.
Hi all
now i have tcpdump
what info you need to advise.
The, minimally redacted, complete INVITE dialogue.
Frame 403: 962 bytes on wire (7696 bits), 962 bytes captured (7696 bits)
Encapsulation type: Ethernet (1)
Arrival Time: Jun 5, 2018 10:09:29.541751000 Кавказское время (зима)
[Time shift for this packet: 0.000000000 seconds]
Epoch Time: 1528178969.541751000 seconds
[Time delta from previous captured frame: 34.003742000 seconds]
[Time delta from previous displayed frame: 0.000000000 seconds]
[Time since reference or first frame: 5798.591756000 seconds]
Frame Number: 403
Frame Length: 962 bytes (7696 bits)
Capture Length: 962 bytes (7696 bits)
[Frame is marked: False]
[Frame is ignored: False]
[Protocols in frame: eth:ethertype:ip:udp:sip:sdp]
[Coloring Rule Name: UDP]
[Coloring Rule String: udp]
Ethernet II, Src: Vmware_90:21:62 (00:0c:29:90:21:62), Dst: Vmware_50:fb:d3 (00:0c:29:50:fb:d3)
Destination: Vmware_50:fb:d3 (00:0c:29:50:fb:d3)
Address: Vmware_50:fb:d3 (00:0c:29:50:fb:d3)
… …0. … … … … = LG bit: Globally unique address (factory default)
… …0 … … … … = IG bit: Individual address (unicast)
Source: Vmware_90:21:62 (00:0c:29:90:21:62)
Address: Vmware_90:21:62 (00:0c:29:90:21:62)
… …0. … … … … = LG bit: Globally unique address (factory default)
… …0 … … … … = IG bit: Individual address (unicast)
Type: IPv4 (0x0800)
Internet Protocol Version 4, Src: 192.168.1.1, Dst: 192.168.1.3
0100 … = Version: 4
… 0101 = Header Length: 20 bytes (5)
Differentiated Services Field: 0x00 (DSCP: CS0, ECN: Not-ECT)
0000 00… = Differentiated Services Codepoint: Default (0)
… …00 = Explicit Congestion Notification: Not ECN-Capable Transport (0)
Total Length: 948
Identification: 0xb217 (45591)
Flags: 0x4000, Don’t fragment
0… … … … = Reserved bit: Not set
.1… … … … = Don’t fragment: Set
…0. … … … = More fragments: Not set
…0 0000 0000 0000 = Fragment offset: 0
Time to live: 56
Protocol: UDP (17)
Header checksum: 0x09cd [validation disabled]
[Header checksum status: Unverified]
Source: 192.168.1.1
Destination: 192.168.1.3
User Datagram Protocol, Src Port: 35172, Dst Port: 5060
Source Port: 35172
Destination Port: 5060
Length: 928
Checksum: 0x3629 [unverified]
[Checksum Status: Unverified]
[Stream index: 1]
Session Initiation Protocol (INVITE)
Request-Line: INVITE sip:375298737823@Asterisk.EXTERNAL.IP.ADDRESS SIP/2.0
Method: INVITE
Request-URI: sip:375298737823@Asterisk.EXTERNAL.IP.ADDRESS
Request-URI User Part: 375298737823
Request-URI Host Part: Asterisk.EXTERNAL.IP.ADDRESS
[Resent Packet: False]
Message Header
Via: SIP/2.0/UDP Client.IP.ADD.RESS:5061;rport;branch=z9hG4bK-2459620353-3893462888-352351399-850684183
Transport: UDP
Sent-by Address: Client.IP.ADD.RESS
Sent-by port: 5061
RPort: rport
Branch: z9hG4bK-2459620353-3893462888-352351399-850684183
From: sip:34105113444@Client.IP.ADD.RESS:5061;tag=4035105793-3893462888-352351399-850684183
SIP from address: sip:34105113444@Client.IP.ADD.RESS:5061
SIP from tag: 4035105793-3893462888-352351399-850684183
To: sip:375298737823@Asterisk.EXTERNAL.IP.ADDRESS
SIP to address: sip:375298737823@Asterisk.EXTERNAL.IP.ADDRESS
Call-ID: 01d4830e688711e8a77400151769b432@Client.IP.ADD.RESS
CSeq: 1 INVITE
Sequence Number: 1
Method: INVITE
Contact: sip:34105113444@Client.IP.ADD.RESS:5061
Contact URI: sip:34105113444@Client.IP.ADD.RESS:5061
Max-Forwards: 70
User-Agent: MERA MVTS3G v.4.0.1-51
Cisco-Guid: 22989308-1753682408-2809397269-392803378
[Expert Info (Note/Undecoded): Unrecognised SIP header (cisco-guid)]
[Unrecognised SIP header (cisco-guid)]
[Severity level: Note]
[Group: Undecoded]
please help to find where is the trouble
Still waiting for the complete INVITE transaction. We only need the application layer and the IP addresses and ports from the network and transport layers.
You have given all the layers, in detail, but you have only given the initial request.
Generally the format created by Asterisk’s own protocol debugging is the form that easiest for people to use.
all requred infromation is in text, however i can find by myself the info you need, also i can send you tcpdump in pcap format