I have a SIP/PSTN provider with an account username/password. The address of the provider is sip.test.com
I would like to redirect phone calls to the gateway, but how is it possible to log in on the gateway and forward calls? Thank you for your replies
Best Regards,
I've tried:
if (uri=~"0[0-9][0-9]*@*") { rewritehostport("username:password@sip.test.com"); # Rewrite the URI route(1); exit; }
Use uac_auth(). You need modaram() for the credentials and an entry in failure route for auth messages. Check out
http://docs.huihoo.com/openser/tutorials/uac/ar01s06.html
besides the uac module page.
On Jul 30, 2007, at 11:06 AM, Marc LEURENT wrote:
I have a SIP/PSTN provider with an account username/password. The address of the provider is sip.test.com
I would like to redirect phone calls to the gateway, but how is it possible to log in on the gateway and forward calls? Thank you for your replies
Best Regards,
I've tried:
if (uri=~"0[0-9][0-9]*@*") { rewritehostport ("username:password@sip.test.com"); # Rewrite the URI route(1); exit; }
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Thank you very much!!
Taylor Carpenter a écrit :
Use uac_auth(). You need modaram() for the credentials and an entry in failure route for auth messages. Check out
http://docs.huihoo.com/openser/tutorials/uac/ar01s06.html
besides the uac module page.
On Jul 30, 2007, at 11:06 AM, Marc LEURENT wrote:
I have a SIP/PSTN provider with an account username/password. The address of the provider is sip.test.com
I would like to redirect phone calls to the gateway, but how is it possible to log in on the gateway and forward calls? Thank you for your replies
Best Regards,
I've tried:
if (uri=~"0[0-9][0-9]*@*") {
rewritehostport("username:password@sip.test.com"); # Rewrite the URI route(1); exit; }
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Can you help me, I received a SIP/2.0 475 Bad URI (475/SL) message and I don't understand I have fallowed the tutorial you've sent me: http://docs.huihoo.com/openser/tutorials/uac/ar01s06.html correcting few commands like t_relay_to_udp("GW_IP","GW_PORT"); --> t_relay("udp:GW_IP:GW_PORT");
You'll find below my conf and a ngrep command
Thanks
NB: I have changed id/password values
# -- uac params -- modparam("uac", "credential", "5674685998:saturne.alsion.com:JG6dzgyfd89F") modparam("uac","from_restore_mode","auto") # sequential requests and replies will be automatically updated based on stored original URI
...
if (method==INVITE && uri=~"0[0-9]*") { #uac_replace_from("sip:104@sip.test.fr"); # set failure route for authentication t_on_failure("3"); # reset flag to mark no authentication yet performed resetflag(7); # forward to PSTN t_relay("udp:saturne.alsion.com:5060"); exit; }; ...
failure_route[3] { # authentication reply received? if ( t_check_status("401|407") ) { # have we already tried to authenticate? if (isflagset(7)) { t_reply("503","Authentication failed"); exit; } if (uac_auth()) { # mark that auth was performed setflag(7); # trigger again the failure route t_on_failure("3"); # repeat the request with auth response this time append_branch(); t_relay(); } } }
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@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.. # 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-3331e4..Via: SIP/2.0/UDP 192.168.95.248;bran ch=z9hG4bKe28.c363a7e.0..Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK4696815358658109209..From: "Bob Wifirst"<sip:102@sip.wifirst.fr:5060;user=p hone>;tag=c0a80101-3331e4..To: sip:0677832974@sip.wifirst.fr:5060;user=phone..Call-ID: 5d714ab-c0a80101-0-38@192.168.95.70..CSeq: 1 INVITE..Max-Forw ards: 10..Supported: timer, replaces..Session-Expires: 1800..Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,SUBSCRIBE,NOTIFY,UPDATE,REFER,REGISTER,INFO..C ontact: 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-Lengt h: 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=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=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@192.168.95.70..CSeq: 1 INVITE..Server: OpenSER (1.2.1-tls (i386/linux))..Content-Length: 0.... # 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=z9hG4bKe28.c363a7e.0;received=192.168.95.248..Via: SIP/2.0/UDP 192.168.95.70:5060;bran ch=z9hG4bK4696815358658109209..From: "Bob Wifirst"sip:102@sip.wifirst.fr:5060;user=phone;tag=c0a80101-3331e4..To: <sip:0677832974@sip.wifirst.fr:506 0;user=phone>..Call-ID: 5d714ab-c0a80101-0-38@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=z9hG4bKe28.c363a7e.0;received=192.168.95.248..Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z 9hG4bK4696815358658109209..Record-Route: sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3331e4..From: "Bob Wifirst"<sip:102@sip.wifirst.fr:5060;user=ph one>;tag=c0a80101-3331e4..To: sip:0677832974@sip.wifirst.fr:5060;user=phone;tag=as62a15743..Call-ID: 5d714ab-c0a80101-0-38@192.168.95.70..CSeq: 1 IN VITE..User-Agent: Asterisk PBX..Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY..Contact: sip:0677832974@87.98.201.114..Content-T ype: 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 12322 RTP/A VP 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=z9hG4bK4696815358658109209..Record-Route: <sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3331 e4>..From: "Bob Wifirst"sip:102@sip.wifirst.fr:5060;user=phone;tag=c0a80101-3331e4..To: sip:0677832974@sip.wifirst.fr:5060;user=phone;tag=as62a157 43..Call-ID: 5d714ab-c0a80101-0-38@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 12322 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=z9hG4bK4697925369758209219..From: "Bob Wifirst"<sip:102@sip.wifir st.fr:5060;user=phone>;tag=c0a80101-3331e4..To: sip:0677832974@sip.wifirst.fr:5060;user=phone;tag=as62a15743..Call-ID: 5d714ab-c0a80101-0-38@192.168 .95.70..CSeq: 1 ACK..Max-Forwards: 70..Route: sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3331e4..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-3331e4..Via: SIP/2.0/UDP 192.168.95.248;branch=z9hG4b Ke28.c363a7e.2..Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK4697925369758209219..From: "Bob Wifirst"sip:102@sip.wifirst.fr:5060;user=phone;tag =c0a80101-3331e4..To: sip:0677832974@sip.wifirst.fr:5060;user=phone;tag=as62a15743..Call-ID: 5d714ab-c0a80101-0-38@192.168.95.70..CSeq: 1 ACK..Max-F orwards: 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=z9hG4bK7781eedb;rport..Route: <sip:192.168.95.248:5060;lr=on;ftag =c0a80101-3331e4>..From: sip:0677832974@sip.wifirst.fr:5060;user=phone..To: "Bob Wifirst"sip:102@sip.wifirst.fr:5060;user=phone;tag=c0a80101-3331e 4..Contact: sip:0677832974@87.98.201.114..Call-ID: 5d714ab-c0a80101-0-38@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=z9hG4bK7781eedb;rport=5060..From: <sip:0677832974@sip.wifirst.fr:5060;user=ph one>..To: "Bob Wifirst"sip:102@sip.wifirst.fr:5060;user=phone;tag=c0a80101-3331e4..Call-ID: 5d714ab-c0a80101-0-38@192.168.95.70..CSeq: 101 CANCEL..S erver: OpenSER (1.2.1-tls (i386/linux))..Content-Length: 0.... # U 192.168.95.70:5060 -> 192.168.95.248:5060 BYE sip:0677832974@87.98.201.114 SIP/2.0..Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK9842036470869314825..From: "Bob Wifirst"<sip:102@sip.wifir st.fr:5060;user=phone>;tag=c0a80101-3331e4..To: sip:0677832974@sip.wifirst.fr:5060;user=phone;tag=as62a15743..Call-ID: 5d714ab-c0a80101-0-38@192.168 .95.70..CSeq: 2 BYE..Max-Forwards: 70..Route: sip:192.168.95.248:5060;lr=on;ftag=c0a80101-3331e4..User-Agent: THOMSON ST2030 hw0 fw1.50 00-0E-50-4E- AF-C4..Content-Length: 0.... #
Taylor Carpenter a écrit :
Use uac_auth(). You need modaram() for the credentials and an entry in failure route for auth messages. Check out
http://docs.huihoo.com/openser/tutorials/uac/ar01s06.html
besides the uac module page.
On Jul 30, 2007, at 11:06 AM, Marc LEURENT wrote:
I have a SIP/PSTN provider with an account username/password. The address of the provider is sip.test.com
I would like to redirect phone calls to the gateway, but how is it possible to log in on the gateway and forward calls? Thank you for your replies
Best Regards,
I've tried:
if (uri=~"0[0-9][0-9]*@*") {
rewritehostport("username:password@sip.test.com"); # Rewrite the URI route(1); exit; }
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
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@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 -------------------------------------------------------------
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@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@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@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@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@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@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@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@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@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@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@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
El Tuesday 31 July 2007 12:01:55 Marc LEURENT escribió:
U 87.98.201.114:5060 -> 192.168.95.248:5060 CANCEL :0677832974@87.98.201.114 SIP/2.0
Note that wrong URI, "sip" is missing. ¿?¿
So the trouble is with the asterisk PBX that sent wrong URI I have tried with another provider: freephonie.net
In the tutorial, it deals with error 401 and 407, but I receive a 403 not registered message What seems to be normal. But the authentication doesn't work.
Did you succeed in doing this authentication and if yes, could you sahre this part of your configuration Thanks
Iñaki Baz Castillo a écrit :
El Tuesday 31 July 2007 12:01:55 Marc LEURENT escribió:
U 87.98.201.114:5060 -> 192.168.95.248:5060 CANCEL :0677832974@87.98.201.114 SIP/2.0
Note that wrong URI, "sip" is missing. ¿?¿
In the logs, I'm getting:
0(8040) !!!!!!!!!!! JUST BEFORE AUTH 0(8040) DEBUG:uac:uac_auth: picked reply is 0x8148e98, code 403 0(8040) ERROR:uac:get_autenticate_hdr: reply is not an auth request 0(8040) ERROR:uac:uac_auth: failed to extract authenticate hdr 0(8040) DEBUG:tm:relay_reply: branch=0, save=0, relay=0
It's not working at all... Any idea to solve this problem!
I will copy it in the wiki when we will have a solution Best Ragards,
Marc LEURENT
Marc LEURENT a écrit :
So the trouble is with the asterisk PBX that sent wrong URI I have tried with another provider: freephonie.net
In the tutorial, it deals with error 401 and 407, but I receive a 403 not registered message What seems to be normal. But the authentication doesn't work.
Did you succeed in doing this authentication and if yes, could you sahre this part of your configuration Thanks
Iñaki Baz Castillo a écrit :
El Tuesday 31 July 2007 12:01:55 Marc LEURENT escribió:
U 87.98.201.114:5060 -> 192.168.95.248:5060 CANCEL :0677832974@87.98.201.114 SIP/2.0
Note that wrong URI, "sip" is missing. ¿?¿
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
You may want to search for an earlier posting regarding malformed CANCEL coming from Asterisk.
Subject: [OpenSER-Users] Re: [Users] Malformed CANCEL request from Asterisk possibly impacting OpenSER? Date: June 27, 2007 9:00:31 AM EDT
No, because I've tried with another provider: sip.plugandtel.net and I don't have this problem
I receive a 403 Forbiddend message, that's normal because openser hasn't done a REGISTER request before. So my question is how to force openser to register before sending INVITE request
# U 192.168.95.248:5060 -> 193.202.111.239:5060 INVITE sip:0677832974@sip.plugandtel.net SIP/2.0. Record-Route: sip:192.168.95.248;lr=on;ftag=c0a80101-b75340. Via: SIP/2.0/UDP 192.168.95.248;branch=z9hG4bK1281.279ed6b5.0. Via: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK6929147581971425932. From: "Bob Wifirst"sip:102@sip.wifirst.fr:5060;user=phone;tag=c0a80101-b75340. To: sip:0677832974@sip.wifirst.fr:5060;user=phone. Call-ID: 1a0f90e5-c0a80101-0-67@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: 273. . v=0. o=102 12014401 12014401 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 193.202.111.239:5060 -> 192.168.95.248:5060 SIP/2.0 403 Forbidden. v: SIP/2.0/UDP 192.168.95.248:5060;branch=z9hG4bK1281.279ed6b5.0;received=192.168.95.248. v: SIP/2.0/UDP 192.168.95.70:5060;branch=z9hG4bK6929147581971425932. f: "Bob Wifirst"sip:102@sip.wifirst.fr:5060;user=phone;tag=c0a80101-b75340. t: sip:0677832974@sip.wifirst.fr:5060;user=phone;tag=as3ac11853. i: 1a0f90e5-c0a80101-0-67@192.168.95.70. CSeq: 1 INVITE. User-Agent: Asterisk PBX. Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY. l: 0.
Zahid Mehmood a écrit :
You may want to search for an earlier posting regarding malformed CANCEL coming from Asterisk.
*Subject: * *[OpenSER-Users] Re: [Users] Malformed CANCEL request from Asterisk possibly impacting OpenSER?* *Date: * June 27, 2007 9:00:31 AM EDT
-- Zahid
On Jul 31, 2007, at 6:15 AM, Iñaki Baz Castillo wrote:
El Tuesday 31 July 2007 12:01:55 Marc LEURENT escribió:
U 87.98.201.114:5060 -> 192.168.95.248:5060 CANCEL :0677832974@87.98.201.114 mailto:0677832974@87.98.201.114 SIP/2.0
Note that wrong URI, "sip" is missing. ¿?¿
-- ilimit...
*Iñaki Baz Castillo* ibc@in.ilimit.es mailto:ibc@in.ilimit.es
ÀREA SISTEMES 0034 937 333 375 VOLTA 1, PIS 5 08224 TERRASSA.BCN
Aquest enviament és confidencial i està destinat únicament a la persona a qui s'ha enviat. Pot contenir informació privada sotmesa al secret professional, la distribució de la qual està prohibida per la legislació vigent.
Users mailing list Users@openser.org mailto:Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users
Users mailing list Users@openser.org http://openser.org/cgi-bin/mailman/listinfo/users