Is there anyone who has a working configuration of openser connected to a SIP/PSTN gateway
with authentification
I don't see where I'm wrong
Thanks
So the ngrep looklikes:
root@poireau:[/home/mleurent]# ngrep -P '' -W byline "$1" udp port 5060
interface: eth1 (192.168.95.0/255.255.255.0)
filter: (ip or ip6) and ( udp port 5060 )
#
U 192.168.95.70:5060 -> 192.168.95.248:5060
INVITE sip:0677832974@sip.wifirst.fr:5060 SIP/2.0
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK2075369103192047157
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 INVITE
Max-Forwards: 70
Supported: timer, replaces
Session-Expires: 1800
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPDATE,REFER,REGISTER,INFO
Contact: <sip:102@192.168.95.70:5060;user=phone>
User-Agent: THOMSON ST2030 hw0 fw1.50 00-0E-50-4E-AF-C4
Content-Type: application/sdp
Content-Length: 271
v=0
o=102 3835266 3835266 IN IP4 192.168.95.70
s=-
c=IN IP4 192.168.95.70
t=0 0
m=audio 41000 RTP/AVP 8 0 18 4 97
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-15
a=sendrecv
#
U 192.168.95.248:5060 -> 192.168.95.70:5060
SIP/2.0 100 Giving a try
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK2075369103192047157
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 INVITE
Server: OpenSER (1.2.1-tls (i386/linux))
Content-Length: 0
#
U 192.168.95.248:5060 -> 87.98.201.114:5060
INVITE sip:0677832974@sip.wifirst.fr:5060 SIP/2.0
Record-Route: <sip:192.168.95.248;lr=on;ftag=c0a80101-3a8581>
Via: SIP/2.0/UDP 192.168.95.248;branch=z9hG4bK5fa8.8142e804.0
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK2075369103192047157
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 INVITE
Max-Forwards: 10
Supported: timer, replaces
Session-Expires: 1800
Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPDATE,REFER,REGISTER,INFO
Contact: <sip:102@192.168.95.70:5060;user=phone>
User-Agent: THOMSON ST2030 hw0 fw1.50 00-0E-50-4E-AF-C4
Content-Type: application/sdp
Content-Length: 271
v=0
o=102 3835266 3835266 IN IP4 192.168.95.70
s=-
c=IN IP4 192.168.95.70
t=0 0
m=audio 41000 RTP/AVP 8 0 18 4 97
a=rtpmap:8 PCMA/8000
a=rtpmap:0 PCMU/8000
a=rtpmap:18 G729/8000
a=rtpmap:4 G723/8000
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-15
a=sendrecv
#
U 87.98.201.114:5060 -> 192.168.95.248:5060
SIP/2.0 100 Trying
Via: SIP/2.0/UDP
192.168.95.248:5060;branch=z9hG4bK5fa8.8142e804.0;received=192.168.95.248
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK2075369103192047157
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:0677832974@87.98.201.114>
Content-Length: 0
#
U 87.98.201.114:5060 -> 192.168.95.248:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP
192.168.95.248:5060;branch=z9hG4bK5fa8.8142e804.0;received=192.168.95.248
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK2075369103192047157
Record-Route: <sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3a8581>
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>;tag=as45d9b0cd
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:0677832974@87.98.201.114>
Content-Type: application/sdp
Content-Length: 284
v=0
o=root 6041 6041 IN IP4 87.98.201.114
s=session
c=IN IP4 87.98.201.114
t=0 0
m=audio 15118 RTP/AVP 0 8 18 97
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-16
a=silenceSupp:off - - - -
#
U 192.168.95.248:5060 -> 192.168.95.70:5060
SIP/2.0 200 OK
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK2075369103192047157
Record-Route: <sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3a8581>
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>;tag=as45d9b0cd
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 INVITE
User-Agent: Asterisk PBX
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY
Contact: <sip:0677832974@87.98.201.114>
Content-Type: application/sdp
Content-Length: 284
v=0
o=root 6041 6041 IN IP4 87.98.201.114
s=session
c=IN IP4 87.98.201.114
t=0 0
m=audio 15118 RTP/AVP 0 8 18 97
a=rtpmap:0 PCMU/8000
a=rtpmap:8 PCMA/8000
a=rtpmap:18 G729/8000
a=fmtp:18 annexb=no
a=rtpmap:97 telephone-event/8000
a=fmtp:97 0-16
a=silenceSupp:off - - - -
#
U 192.168.95.70:5060 -> 192.168.95.248:5060
ACK sip:0677832974@87.98.201.114 SIP/2.0
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK9182470814203758154
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>;tag=as45d9b0cd
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 ACK
Max-Forwards: 70
Route: <sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3a8581>
User-Agent: THOMSON ST2030 hw0 fw1.50 00-0E-50-4E-AF-C4
Content-Length: 0
#
U 192.168.95.248:5060 -> 87.98.201.114:5060
ACK sip:0677832974@87.98.201.114 SIP/2.0
Record-Route: <sip:192.168.95.248;lr=on;ftag=c0a80101-3a8581>
Via: SIP/2.0/UDP 192.168.95.248;branch=z9hG4bK5fa8.8142e804.2
Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK9182470814203758154
From: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
To: <sip:0677832974@sip.wifirst.fr:5060;user=phone>;tag=as45d9b0cd
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 1 ACK
Max-Forwards: 10
User-Agent: THOMSON ST2030 hw0 fw1.50 00-0E-50-4E-AF-C4
Content-Length: 0
P-hint: rr-enforced
#
U 87.98.201.114:5060 -> 192.168.95.248:5060
CANCEL :0677832974@87.98.201.114 SIP/2.0
Via: SIP/2.0/UDP 87.98.201.114:5060;branch=z9hG4bK5aa97436;rport
Route: <sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3a8581>
From: <sip:0677832974@sip.wifirst.fr:5060;user=phone>
To: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
Contact: <sip:0677832974@87.98.201.114>
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 101 CANCEL
User-Agent: Asterisk PBX
Max-Forwards: 70
Content-Length: 0
#
U 192.168.95.248:5060 -> 87.98.201.114:5060
SIP/2.0 475 Bad URI (475/SL)
Via: SIP/2.0/UDP 87.98.201.114:5060;branch=z9hG4bK5aa97436;rport=5060
From: <sip:0677832974@sip.wifirst.fr:5060;user=phone>
To: "Bob
Wifirst"<sip:102@sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3a8581
Call-ID: 6858396-c0a80101-0-3b(a)192.168.95.70
CSeq: 101 CANCEL
Server: OpenSER (1.2.1-tls (i386/linux))
Content-Length: 0
Iñaki Baz Castillo a écrit :
El Tuesday 31 July 2007 11:50:12 Marc LEURENT
escribió:
Here is a ngep of the communication (what is
interesting is the )
interface: eth1 (192.168.95.0/255.255.255.0)
filter: (ip or ip6) and ( port 5060 )
#
U 192.168.95.70:5060 -> 192.168.95.248:5060
INVITE sip:0677832974@sip.wifirst.fr:5060 SIP/2.0..Via: SIP/2.0/UDP
192.168.95.70:5060;branch=z9hG4bK4696815358658109209..From: "Bob
Wifirst"<sip:102@ sip.wifirst.fr:5060;user=phone>;tag=c0a80101-3331e4..To:
<sip:0677832974@sip.wifirst.fr:5060;user=phone>..Call-ID:
5d714ab-c0a80101-0-38(a)192.168.95.70 ..CSeq: 1 INVITE..Max-Forwards:
70..Supported: timer, replaces..Session-Expires: 1800..Allow:
INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPD
ATE,REFER,REGISTER,INFO..Contact:
<sip:102@192.168.95.70:5060;user=phone>..User-Agent: THOMSON ST2030 hw0
fw1.50 00-0E-50-4E-AF-C4..Content-Type: appl ication/sdp..Content-Length:
271....v=0..o=102 3355109 3355109 IN IP4 192.168.95.70..s=-..c=IN IP4
192.168.95.70..t=0 0..m=audio 41000 RTP/AVP 8 0 18 4 97..a=rtpmap:8
PCMA/8000..a=rtpmap:0 PCMU/8000..a=rtpmap:18 G729/8000..a=rtpmap:4
G723/8000..a=rtpmap:97 telephone-event/8000..a=fmtp:97 0-15..a=sen drecv..
Just a suggestion about ngrep:
It's better if you use some parameters for showing line by line the ngrep
capture. I use the folowing script:
/usr/local/bin/ngrep-sip.sh:
-------------------------------------------------------------
#!/bin/bash
# $1 is the filter field.
# 5060 is OpenSer port and 5070 Asterisk port that run in same machine.
ngrep -P '' -W byline "$1" udp port 5060 or udp port 5070
-------------------------------------------------------------