Hi, I'm trying to connect to my asterisk server via a OpenVPN. I have the following ips: "eth0" -> 192.168.1.10 "tun0" -> 10.8.0.18
The OpenVPN server has the adress 10.8.0.1. When I try to connect asterisk logs this: ######################################### <--- SIP read from UDP://10.8.0.18:5060 ---> REGISTER sip:10.8.0.1 SIP/2.0 Via: SIP/2.0/UDP 192.168.1.10:5060;rport;branch=z9hG4bKPjafdb9f53-fbf5-4294-aa2d-e9614a45480b Max-Forwards: 70 From: <sip:[email protected]>;tag=785e03b4-0c58-444f-b89b-ae41cb0e072b To: <sip:[email protected]> Call-ID: 3d999067-54fa-4dbe-8f23-458212ce93bd CSeq: 50460 REGISTER User-Agent: sflphoned/0.9.6 Contact: "wielejan" <sip:[email protected]:5060> Expires: 600 Content-Length: 0 <-------------> --- (11 headers 0 lines) --- Sending to 192.168.1.10 : 5060 (no NAT) <--- Transmitting (no NAT) to 192.168.1.10:5060 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 192.168.1.10:5060;branch=z9hG4bKPjafdb9f53-fbf5-4294-aa2d-e9614a45480b;received=10.8.0.18;rport=5060 From: <sip:[email protected]>;tag=785e03b4-0c58-444f-b89b-ae41cb0e072b To: <sip:[email protected]>;tag=as0c960378 Call-ID: 3d999067-54fa-4dbe-8f23-458212ce93bd CSeq: 50460 REGISTER Server: Asterisk PBX 1.6.1.9 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="69154389" Content-Length: 0 ######################################### With Twinkle it is working: ######################################### <--- SIP read from UDP://10.8.0.18:5060 ---> REGISTER sip:10.8.0.1 SIP/2.0 Via: SIP/2.0/UDP 10.8.0.18;rport;branch=z9hG4bKfcchtzqc Max-Forwards: 70 To: "Jan <sip:[email protected]> From: "Jan <sip:[email protected]>;tag=uzhfj Call-ID: bgtvsywndvmq...@joplaptop CSeq: 983 REGISTER Contact: <sip:[email protected]>;expires=3600 Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE User-Agent: Twinkle/1.4.2 Content-Length: 0 <-------------> --- (11 headers 0 lines) --- Sending to 10.8.0.18 : 5060 (no NAT) <--- Transmitting (no NAT) to 10.8.0.18:5060 ---> SIP/2.0 401 Unauthorized Via: SIP/2.0/UDP 10.8.0.18;branch=z9hG4bKfcchtzqc;received=10.8.0.18;rport=5060 From: "Jan <sip:[email protected]>;tag=uzhfj To: "Jan <sip:[email protected]>;tag=as1daaf748 Call-ID: bgtvsywndvmq...@joplaptop CSeq: 983 REGISTER Server: Asterisk PBX 1.6.1.9 Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer WWW-Authenticate: Digest algorithm=MD5, realm="asterisk", nonce="510cbd7b" Content-Length: 0 <------------> Scheduling destruction of SIP dialog 'bgtvsywndvmq...@joplaptop' in 32000 ms (Method: REGISTER) freeman*CLI> <--- SIP read from UDP://10.8.0.18:5060 ---> REGISTER sip:10.8.0.1 SIP/2.0 Via: SIP/2.0/UDP 10.8.0.18;rport;branch=z9hG4bKfumtltvv Max-Forwards: 70 To: "Jan" <sip:[email protected]> From: "Jan" <sip:[email protected]>;tag=uzhfj Call-ID: bgtvsywndvmq...@joplaptop CSeq: 984 REGISTER Contact: <sip:[email protected]>;expires=3600 Authorization: Digest username="janextern",realm="asterisk",nonce="510cbd7b",uri="sip:10.8.0.1",response="6f011aa54d6aada0324ff92481f0bd8b",algorithm=MD5 Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE User-Agent: Twinkle/1.4.2 Content-Length: 0 <-------------> --- (12 headers 0 lines) --- Sending to 10.8.0.18 : 5060 (no NAT) -- Registered SIP 'janextern' at 10.8.0.18 port 5060 Reliably Transmitting (no NAT) to 10.8.0.18:5060: OPTIONS sip:[email protected] SIP/2.0 Via: SIP/2.0/UDP 10.8.0.1:5060;branch=z9hG4bK54785a89;rport Max-Forwards: 70 From: "asterisk" <sip:[email protected]>;tag=as3045c12c To: <sip:[email protected]> Contact: <sip:[email protected]> Call-ID: [email protected] CSeq: 102 OPTIONS User-Agent: Asterisk PBX 1.6.1.9 Date: Tue, 19 Jan 2010 23:11:49 GMT Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE, NOTIFY, INFO Supported: replaces, timer Content-Length: 0 ######################################### It looks like slfphone uses the wrong ip-adress ("Via: SIP/2.0/UDP 192.168.1.10:5060").i've set tun0 as the adapter to use. When watching the traffic with wireshark between sflphone and asterisk on the client side, no package appears from the server. sflphone only repeats its register packages. Any ideas? Regards, Jan _______________________________________________ SFLphone mailing list [email protected] http://lists.savoirfairelinux.net/mailman/listinfo/sflphone
