[asterisk-users] can't get pap2 to register from outside the LAN.

Landy Landy landysaccount at yahoo.com
Mon Nov 23 21:16:45 CST 2009


How about adding:

insecure=invite,port




--- On Mon, 11/23/09, Tim Uckun <timuckun at gmail.com> wrote:

> From: Tim Uckun <timuckun at gmail.com>
> Subject: [asterisk-users] can't get pap2 to register from outside the LAN.
> To: asterisk-users at lists.digium.com
> Date: Monday, November 23, 2009, 8:25 PM
> I am having a hell of a problem
> trying to get a linksys pap2t to
> register with my asterisk from outside the LAN.
> 
> I have tried every combination of NAT, outbound proxy,
> stun, specify
> external IP address etc and it just won't work.  Here
> are the relevant
> details.
> 
> In asterisk I have set the following.
> 
> externip=my.ip.address
> localnet=192.168.0.0/255.255.0.0
> nat=yes
> bindport=5060
> 
> 
> here is the sip user
> 
> deny=0.0.0.0/0.0.0.0
> type=friend
> secret=blah
> qualify=yes
> port=5060
> pickupgroup=
> permit=0.0.0.0/0.0.0.0
> nat=yes
> mailbox=372 at device
> host=dynamic
> dtmfmode=rfc2833
> dial=SIP/372
> context=from-internal
> canreinvite=no
> callgroup=
> callerid=device <372>
> accountcode=
> call-limit=50
> 
> 
> I have tried nat = no, nat=never, nat=route, and leaving
> out the nat
> no difference.
> 
> On the linksys end I have tried everything I can think of.
> Nat, no
> nat, stun, hard coded external IP address etc. I have read
> dozens of
> web sites and have tried every suggestion given but no
> joy.
> 
> I know other people have had the same problem but none of
> the links I
> ran into had a solution that worked for me.
> 
> This device connects perfectly when inside the lan, take it
> out and it
> won't connect no matter what I do.
> 
> 
> Here is the sip debug trace. What truly puzzles me is the
> 401 not
> authorized packets. The password is correct, it connects
> fine inside
> the lan but the same username and password fails outside
> the LAN.
> 
> 
>  <------------>
> [Nov 24 14:18:41]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>;tag=as1f31845b
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
> nonce="0dc307da"
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:41] Scheduling destruction of SIP dialog
> 'f4e6d9bc-59a7c482 at 192.168.50.183' in 32000 ms (Method:
> REGISTER)
> [Nov 24 14:18:42]  ip
> <--- SIP read from 218.101.6.157:5060 --->
> REGISTER sip:203.109.148.108 SIP/2.0
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> Max-Forwards: 70
> Contact: 372
> <sip:372 at 192.168.50.183:5060>;expires=3600
> User-Agent: Linksys/PAP2T-5.1.6(LS)
> Content-Length: 0
> Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS,
> REFER
> Supported: x-sipura, replaces
> 
> 
> <------------->
> [Nov 24 14:18:42] --- (12 headers 0 lines) ---
> [Nov 24 14:18:42] Using latest REGISTER request as basis
> request
> [Nov 24 14:18:42] Sending to 218.101.6.157 : 5060 (NAT)
> [Nov 24 14:18:42]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> Contact: <sip:372 at 203.109.148.108>
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:42]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>;tag=as1f31845b
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
> nonce="0dc307da"
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:42] Scheduling destruction of SIP dialog
> 'f4e6d9bc-59a7c482 at 192.168.50.183' in 32000 ms (Method:
> REGISTER)
> [Nov 24 14:18:44]  ip
> <--- SIP read from 218.101.6.157:5060 --->
> REGISTER sip:203.109.148.108 SIP/2.0
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> Max-Forwards: 70
> Contact: 372
> <sip:372 at 192.168.50.183:5060>;expires=3600
> User-Agent: Linksys/PAP2T-5.1.6(LS)
> Content-Length: 0
> Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS,
> REFER
> Supported: x-sipura, replaces
> 
> 
> <------------->
> [Nov 24 14:18:44] --- (12 headers 0 lines) ---
> [Nov 24 14:18:44] Using latest REGISTER request as basis
> request
> [Nov 24 14:18:44] Sending to 218.101.6.157 : 5060 (NAT)
> [Nov 24 14:18:44]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> Contact: <sip:372 at 203.109.148.108>
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:44]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>;tag=as1f31845b
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
> nonce="0dc307da"
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:44] Scheduling destruction of SIP dialog
> 'f4e6d9bc-59a7c482 at 192.168.50.183' in 32000 ms (Method:
> REGISTER)
> [Nov 24 14:18:48]  ip
> <--- SIP read from 218.101.6.157:5060 --->
> REGISTER sip:203.109.148.108 SIP/2.0
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> Max-Forwards: 70
> Contact: 372
> <sip:372 at 192.168.50.183:5060>;expires=3600
> User-Agent: Linksys/PAP2T-5.1.6(LS)
> Content-Length: 0
> Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS,
> REFER
> Supported: x-sipura, replaces
> 
> 
> <------------->
> [Nov 24 14:18:48] --- (12 headers 0 lines) ---
> [Nov 24 14:18:48] Using latest REGISTER request as basis
> request
> [Nov 24 14:18:48] Sending to 218.101.6.157 : 5060 (NAT)
> [Nov 24 14:18:48]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> Contact: <sip:372 at 203.109.148.108>
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:48]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>;tag=as1f31845b
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
> nonce="0dc307da"
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:48] Scheduling destruction of SIP dialog
> 'f4e6d9bc-59a7c482 at 192.168.50.183' in 32000 ms (Method:
> REGISTER)
> [Nov 24 14:18:52]  ip
> <--- SIP read from 218.101.6.157:5060 --->
> REGISTER sip:203.109.148.108 SIP/2.0
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> Max-Forwards: 70
> Contact: 372
> <sip:372 at 192.168.50.183:5060>;expires=3600
> User-Agent: Linksys/PAP2T-5.1.6(LS)
> Content-Length: 0
> Allow: ACK, BYE, CANCEL, INFO, INVITE, NOTIFY, OPTIONS,
> REFER
> Supported: x-sipura, replaces
> 
> 
> <------------->
> [Nov 24 14:18:52] --- (12 headers 0 lines) ---
> [Nov 24 14:18:52] Using latest REGISTER request as basis
> request
> [Nov 24 14:18:52] Sending to 218.101.6.157 : 5060 (NAT)
> [Nov 24 14:18:52]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 100 Trying
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> Contact: <sip:372 at 203.109.148.108>
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:52]
> <--- Transmitting (NAT) to 218.101.6.157:5060 --->
> SIP/2.0 401 Unauthorized
> Via: SIP/2.0/UDP
> 192.168.50.183:5060;branch=z9hG4bK-26ca393d;received=218.101.6.157
> From: 372
> <sip:372 at 203.109.148.108>;tag=e25fccc07a79cd65o0
> To: 372 <sip:372 at 203.109.148.108>;tag=as1f31845b
> Call-ID: f4e6d9bc-59a7c482 at 192.168.50.183
> CSeq: 26779 REGISTER
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, SUBSCRIBE,
> NOTIFY
> Supported: replaces
> WWW-Authenticate: Digest algorithm=MD5, realm="asterisk",
> nonce="0dc307da"
> Content-Length: 0
> 
> 
> <------------>
> [Nov 24 14:18:52] Scheduling destruction of SIP dialog
> 'f4e6d9bc-59a7c482 at 192.168.50.183' in 32000 ms (Method:
> REGISTER)
> sip*CLI> sip debug ip
> 
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
> 
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-users
> 


      



More information about the asterisk-users mailing list