Hi,
On Tue, May 18, 2010 at 09:46:09AM +0200, Klaus Darilion wrote:
As your config and the log messages seems to be correct, you should
debug on the network and verify which SIP messages are sent to which
location. You can use tcpdump/wireshark or the simple (my preferred
choice) ngrep tool.
I've followed your instructions and I've used ngrep on the openser box.
sip.example.com <=> 10.125.0.1
pabx-alcatel.example.com <=> 10.125.0.2
my linux box with ekiga <=> 10.10.10.100
my real analog phone's number, connected to the pabx : 290081
my ekiga soft phone's number : 9888
Below is a trace of what happens :
sip:~# openserctl ul show
database engine 'PGSQL' loaded
Control engine 'FIFO' loaded
entering fifo_cmd ul_dump
Domain:: location table=512 records=2 max_slot=1
AOR:: 9888
Contact:: sip:9888@10.10.10.100 Q=1
Expires:: 56
Callid:: 6667a393-ef61-df11-897f-002197011099@lafrime
Cseq:: 25
User-agent:: Ekiga/3.2.6
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: udp:10.125.0.1:5060
Methods:: 22335
AOR:: alize
Contact:: sip:alize@10.125.0.2;transport=UDP Q=
Expires:: 1051
Callid:: 4b192ee9d1173056f4fbc3c317fb94ff(a)10.125.0.2
Cseq:: 1626385337
User-agent:: OxO_GW_710/115.006
State:: CS_SYNC
Flags:: 0
Cflag:: 0
Socket:: udp:10.125.0.1:5060
Methods:: 0
Now I place a call from ekiga on my GNU/Linux box to my analog phone, by
dialing 290081 :
sip:~# ngrep -d any -W byline -t -q -P "" port 5060
U 2010/05/20 07:11:08.471776 10.10.10.100:5060 -> 10.125.0.1:5060
INVITE sip:290081@sip.example.com SIP/2.0
Date: Wed, 19 May 2010 20:11:11 GMT
CSeq: 1 INVITE
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport
User-Agent: Ekiga/3.2.6
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
To: <sip:290081@sip.example.com>
Contact: <sip:9888@10.10.10.100>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING
Content-Type: application/sdp
Content-Length: 549
Max-Forwards: 70
v=0
o=- 1274299871 1 IN IP4 10.10.10.100
s=Opal SIP Session
c=IN IP4 10.10.10.100
t=0 0
m=audio 5062 RTP/AVP 116 0 8 9 101 120
a=sendrecv
a=rtpmap:116 Speex/16000/1
a=fmtp:116 sr=16000,mode=any
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:9 G722/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
a=rtpmap:120 NSE/8000
a=fmtp:120 192-193
m=video 5064 RTP/AVP 99 31
b=AS:4096
b=TIAS:4096000
a=sendrecv
a=rtpmap:99 theora/90000
a=fmtp:99 height=576;width=704
a=rtpmap:31 h261/90000
a=fmtp:31 CIF=1;QCIF=1
Here it seeems openser tells me it is trying :
U 2010/05/20 07:11:08.474968 10.125.0.1:5060 -> 10.10.10.100:5060
SIP/2.0 100 Giving a try
CSeq: 1 INVITE
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
To: <sip:290081@sip.example.com>
Server: OpenSER (1.3.2-notls (i386/linux))
Content-Length: 0
Now the host and port rewriting has taken place, so openser transmits
the invite to the pabx :
U 2010/05/20 07:11:08.479225 10.125.0.1:5060 -> 10.125.0.2:5060
INVITE sip:290081@pabx-alcatel.example.com:5060 SIP/2.0
Record-Route: <sip:10.125.0.1;lr=on>
Date: Wed, 19 May 2010 20:11:11 GMT
CSeq: 1 INVITE
Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060
User-Agent: Ekiga/3.2.6
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
To: <sip:290081@sip.example.com>
Contact: <sip:9888@10.10.10.100>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING
Content-Type: application/sdp
Content-Length: 549
Max-Forwards: 69
v=0
o=- 1274299871 1 IN IP4 10.10.10.100
s=Opal SIP Session
c=IN IP4 10.10.10.100
t=0 0
m=audio 5062 RTP/AVP 116 0 8 9 101 120
a=sendrecv
a=rtpmap:116 Speex/16000/1
a=fmtp:116 sr=16000,mode=any
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:9 G722/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
a=rtpmap:120 NSE/8000
a=fmtp:120 192-193
m=video 5064 RTP/AVP 99 31
b=AS:4096
b=TIAS:4096000
a=sendrecv
a=rtpmap:99 theora/90000
a=fmtp:99 height=576;width=704
a=rtpmap:31 h261/90000
a=fmtp:31 CIF=1;QCIF=1
The pabx answers it is trying :
U 2010/05/20 07:11:08.509995 10.125.0.2:5060 -> 10.125.0.1:5060
SIP/2.0 100 Trying
To: <sip:290081@sip.example.com>
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
CSeq: 1 INVITE
Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060
Content-Length: 0
But then it says it can't find the recipient (or at least that's what I
understand) :
U 2010/05/20 07:11:08.529453 10.125.0.2:5060 -> 10.125.0.1:5060
SIP/2.0 404 Not Found
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE
User-Agent: OxO_GW_710/115.006
To: <sip:290081@sip.example.com>;tag=3c9a6f069a4e18993408270150d6e3e6
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
CSeq: 1 INVITE
Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060
Content-Length: 0
Then openser aknowledges :
U 2010/05/20 07:11:08.530454 10.125.0.1:5060 -> 10.125.0.2:5060
ACK sip:290081@pabx-alcatel.example.com:5060 SIP/2.0
Via: SIP/2.0/UDP 10.125.0.1;branch=z9hG4bK3be6.1a17aeb2.0
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
To: <sip:290081@sip.example.com>;tag=3c9a6f069a4e18993408270150d6e3e6
CSeq: 1 ACK
Max-Forwards: 70
User-Agent: OpenSER (1.3.2-notls (i386/linux))
Content-Length: 0
And then openser sends the Not Found answer back to my Ekiga :
U 2010/05/20 07:11:08.530934 10.125.0.1:5060 -> 10.10.10.100:5060
SIP/2.0 404 Not Found
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE
User-Agent: OxO_GW_710/115.006
To: <sip:290081@sip.example.com>;tag=3c9a6f069a4e18993408270150d6e3e6
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
CSeq: 1 INVITE
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport=5060
Content-Length: 0
And my Ekiga aknowledges :
U 2010/05/20 07:11:08.533180 10.10.10.100:5060 -> 10.125.0.1:5060
ACK sip:290081@sip.example.com SIP/2.0
CSeq: 1 ACK
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK66148856-f061-df11-897f-002197011099;rport
From: "Jerome Alet"
<sip:9888@sip.example.com>;tag=8c3a8756-f061-df11-897f-002197011099
Call-ID: 5a3f8756-f061-df11-897f-002197011099@lafrime
To: <sip:290081@sip.example.com>;tag=3c9a6f069a4e18993408270150d6e3e6
Content-Length: 0
Max-Forwards: 70
What looks bizarre to me is that if from Ekiga I dial
290081(a)pabx-alcatel.example.com, so not passing through openser not the
openser box, it works perfectly, as can be seen below (using ngrep on my
GNU/Linux box) :
root@lafrime:~# ngrep -d any -W byline -t -q -P "" port 5060
interface: any
filter: (ip or ip6) and ( port 5060 )
U 2010/05/20 07:34:49.070434 10.10.10.100:5060 -> 10.125.0.2:5060
INVITE sip:290081@pabx-alcatel.example.com SIP/2.0
Date: Wed, 19 May 2010 20:34:49 GMT
CSeq: 1 INVITE
Via: SIP/2.0/UDP
10.10.10.100:5060;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport
User-Agent: Ekiga/3.2.6
From: "Jerome Alet"
<sip:jerome@10.10.10.100>;tag=be0f62a3-f361-df11-897f-002197011099
Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime
To: <sip:290081@pabx-alcatel.example.com>
Contact: <sip:jerome@10.10.10.100>
Allow: INVITE,ACK,OPTIONS,BYE,CANCEL,SUBSCRIBE,NOTIFY,REFER,MESSAGE,INFO,PING
Content-Type: application/sdp
Content-Length: 549
Max-Forwards: 70
v=0
o=- 1274301289 1 IN IP4 10.10.10.100
s=Opal SIP Session
c=IN IP4 10.10.10.100
t=0 0
m=audio 5072 RTP/AVP 116 0 8 9 101 120
a=sendrecv
a=rtpmap:116 Speex/16000/1
a=fmtp:116 sr=16000,mode=any
a=rtpmap:0 PCMU/8000/1
a=rtpmap:8 PCMA/8000/1
a=rtpmap:9 G722/8000/1
a=rtpmap:101 telephone-event/8000
a=fmtp:101 0-16,32,36
a=rtpmap:120 NSE/8000
a=fmtp:120 192-193
m=video 5074 RTP/AVP 99 31
b=AS:4096
b=TIAS:4096000
a=sendrecv
a=rtpmap:99 theora/90000
a=fmtp:99 height=576;width=704
a=rtpmap:31 h261/90000
a=fmtp:31 CIF=1;QCIF=1
So here the INVITE was sent to the pabx, and the pabx says it is trying
:
U 2010/05/20 07:34:49.099009 10.125.0.2:5060 -> 10.10.10.100:5060
SIP/2.0 100 Trying
To: <sip:290081@pabx-alcatel.example.com>
From: "Jerome Alet"
<sip:jerome@10.10.10.100>;tag=be0f62a3-f361-df11-897f-002197011099
Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime
CSeq: 1 INVITE
Via: SIP/2.0/UDP
10.10.10.100:5060;received=10.10.10.100;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport=5060
Content-Length: 0
And now, it seems it has found the 290081(a)pabx-alcatel.example.com :
U 2010/05/20 07:34:49.201710 10.125.0.2:5060 -> 10.10.10.100:5060
SIP/2.0 180 Ringing
Allow: INVITE, ACK, CANCEL, BYE, OPTIONS, PRACK, REFER, NOTIFY, UPDATE
Contact: "ALET J 290081" <sip:290081@10.125.0.2;user=phone>
Supported: from-change
User-Agent: OxO_GW_710/115.006
P-Asserted-Identity: "ALET J 290081" <sip:290081@example.com;user=phone>
To: <sip:290081@pabx-alcatel.example.com>;tag=51a1558a4e6ac3bf5c1819f278ae2ecc
From: "Jerome Alet"
<sip:jerome@10.10.10.100>;tag=be0f62a3-f361-df11-897f-002197011099
Call-ID: 421362a3-f361-df11-897f-002197011099@lafrime
CSeq: 1 INVITE
Via: SIP/2.0/UDP
10.10.10.100:5060;received=10.10.10.100;branch=z9hG4bK044163a3-f361-df11-897f-002197011099;rport=5060
Content-Length: 0
And from now on, the remaining of the "direct" call processes correctly.
The major difference I see is the "To:" header : in both cases it is
equal to what was dialed, but in the former case (through openser) the
INVITE and To differ. Another difference is that in the latter case it
uses my name instead of the number configured in my ekiga account for
the openser registrar (which seems to be normal)
Any idea what happens and what I should do to solve this problem ?
Thanks in advance
Jerome Alet