[Asterisk-Users] Issue with SIP inter-op
Olle E. Johansson
oej at edvina.net
Mon Jun 6 03:04:33 MST 2005
Nir Simionovich wrote:
> Hi All,
>
> I'm trying to connect to a SIP carrier who never connected with Asterisk.
> I managed to connect with a sipura phone or a grandstream, no problem.
>
> When I configure asterisk, I'm able to send out calls to the carrier
> no problems,
> however, receiving calls doesn't work, and I keep getting the following
> messages:
>
> <-- SIP read from 69.xx.xx.xx:5060:
> INVITE sip:s at 10.0.0.200:5060;maddr=10.0.0.200 SIP/2.0
> Record-Route: <sip:83555501 at 69.xx.xx.xx:5060;maddr=69.xx.xx.xx>,
> <sip:83555501 at 69.xx.xx.xx:5062;maddr=69.xx.xx.xx>
> Via: SIP/2.0/UDP 69.xx.xx.xx:5060, SIP/2.0/UDP 69.xx.xx.xx:5062,
> SIP/2.0/UDP 69.xx.xx.xx:5062, SIP/2.0/UDP
> 69.xx.xx.xx:5081;branch=z9hG4bKB18439727BD34C17BE5095ACF45BE007
> To: <sip:83555501 at 69.xx.xx.xx:5060>
> From: Sason
> <sip:grouphone0 at 69.xx.xx.xx:5081>;tag=KmsqOjY5LjIwLjYxLjIxOTo1MDYyOzY5LjIwLjYxLjIxOTo1MDgx
> CSeq: 1 INVITE
> Call-ID: bc1e6d746b7c0e4df at 192.168.1.3
> <mailto:bc1e6d746b7c0e4df at 192.168.1.3>
> Contact: <sip:grouphone0 at 69.xx.xx.xx:5081>
> Max-Forwards: 70
> Content-Type: application/sdp
> Content-Length: 386
>
> v=0
> o=- 8000 1 IN IP4 69.xx.xx.xx
> s=-
> c=IN IP4 69.xx.xx.xx
> t=0 0
> m=audio 31060 RTP/AVP 4 18 0 8 2 15 99 101
> a=sendrecv
> a=rtpmap:4 G723/8000/3
> a=rtpmap:18 G729/8000/3
> a=rtpmap:0 PCMU/8000/3
> a=rtpmap:8 PCMA/8000/3
> a=rtpmap:2 G726-32/8000/3
> a=rtpmap:15 G728/8000/3
> a=rtpmap:99 iLBC/8000/3
> a=fmtp:99 mode=20
> a=ptime:60
> a=rtpmap:101 telephone-event/8000/3
> a=fmtp:101 0-11
>
> --- (11 headers 18 lines)---
> Using INVITE request as basis request - bc1e6d746b7c0e4df at 192.168.1.3
> <mailto:bc1e6d746b7c0e4df at 192.168.1.3>
> Sending to 69.xx.xx.xx : 5060 (NAT)
> Found peer 'sip-devices'
> Reliably Transmitting (no NAT) to 69.xx.xx.xx:5060:
> SIP/2.0 407 Proxy Authentication Required
> Via: SIP/2.0/UDP 69.xx.xx.xx:5060, SIP/2.0/UDP 69.xx.xx.xx:5062,
> SIP/2.0/UDP 69.xx.xx.xx:5062, SIP/2.0/UDP
> 69.xx.xx.xx:5081;branch=z9hG4bKB18439727BD34C17BE5095ACF45BE007
> From: Sason
> <sip:grouphone0 at 69.xx.xx.xx:5081>;tag=KmsqOjY5LjIwLjYxLjIxOTo1MDYyOzY5LjIwLjYxLjIxOTo1MDgx
> To: <sip:83555501 at 69.xx.xx.xx:5060>;tag=as6343d6ca
> Call-ID: bc1e6d746b7c0e4df at 192.168.1.3
> <mailto:bc1e6d746b7c0e4df at 192.168.1.3>
> CSeq: 1 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
> Contact: <sip:s at 10.0.0.200>
> Proxy-Authenticate: Digest realm="asterisk", nonce="162720d1"
> Content-Length: 0
>
> ---
> Scheduling destruction of call 'bc1e6d746b7c0e4df at 192.168.1.3'
> <mailto:'bc1e6d746b7c0e4df at 192.168.1.3'> in 15000 ms
> Retransmitting #1 (no NAT) to 69.xx.xx.xx:5060:
> SIP/2.0 407 Proxy Authentication Required
> Via: SIP/2.0/UDP 69.xx.xx.xx:5060, SIP/2.0/UDP 69.xx.xx.xx:5062,
> SIP/2.0/UDP 69.xx.xx.xx:5062, SIP/2.0/UDP
> 69.xx.xx.xx:5081;branch=z9hG4bKB18439727BD34C17BE5095ACF45BE007
> From: Sason
> <sip:grouphone0 at 69.xx.xx.xx:5081>;tag=KmsqOjY5LjIwLjYxLjIxOTo1MDYyOzY5LjIwLjYxLjIxOTo1MDgx
> To: <sip:83555501 at 69.xx.xx.xx:5060>;tag=as6343d6ca
> Call-ID: bc1e6d746b7c0e4df at 192.168.1.3
> <mailto:bc1e6d746b7c0e4df at 192.168.1.3>
> CSeq: 1 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
> Contact: <sip:s at 10.0.0.200>
> Proxy-Authenticate: Digest realm="asterisk", nonce="162720d1"
> Content-Length: 0
>
> ---
> Retransmitting #2 (no NAT) to 69.xx.xx.xx:5060:
> SIP/2.0 407 Proxy Authentication Required
> Via: SIP/2.0/UDP 69.xx.xx.xx:5060, SIP/2.0/UDP 69.xx.xx.xx:5062,
> SIP/2.0/UDP 69.xx.xx.xx:5062, SIP/2.0/UDP
> 69.xx.xx.xx:5081;branch=z9hG4bKB18439727BD34C17BE5095ACF45BE007
> From: Sason
> <sip:grouphone0 at 69.xx.xx.xx:5081>;tag=KmsqOjY5LjIwLjYxLjIxOTo1MDYyOzY5LjIwLjYxLjIxOTo1MDgx
> To: <sip:83555501 at 69.xx.xx.xx:5060>;tag=as6343d6ca
> Call-ID: bc1e6d746b7c0e4df at 192.168.1.3
> <mailto:bc1e6d746b7c0e4df at 192.168.1.3>
> CSeq: 1 INVITE
> User-Agent: Asterisk PBX
> Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
> Contact: <sip:s at 10.0.0.200>
> Proxy-Authenticate: Digest realm="asterisk", nonce="162720d1"
> Content-Length: 0
>
> Any idea what may be causing this ?
>
> The configuration is using AMP, and it looks as following:
>
> [root at ipbx root]# cat /etc/asterisk/sip.conf
> ; Note: If your SIP devices are behind a NAT and your Asterisk
> ; server isn't, try adding "nat=1" to each peer definition to
> ; solve translation problems.
>
> [general]
> port = 5060 ; Port to bind to (SIP is 5060)
> bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)
> externip = 62.219.XXX.XXX
> disallow=all
> allow=ulaw
> allow=alaw
> context = from-sip-external ; Send unknown SIP callers to this context
> callerid = Unknown
> nat = yes
>
> #include sip_nat.conf
> #include sip_additional.conf
> [root at crystalclear root]# cat /etc/asterisk/sip_additional.conf
> register=TollIPdemo1:somesecret at sipdevice.FQDN.net
>
> [sip-devices]
> username=TollIPdemo1
> type=friend
> secret=somesecret
> host=sipdevice.FQDN.net
> fromuser=TollIPdemo1
> context=from-pstn
> canreinvite=no
> callerid=TollIPdemo1
> Any information would be highly appreciated.
>
The sip-devices friend has a secret, thus Asterisk requires
authentication. Using type=friend when setting up a connection to a
service provider is not recommended. See all the examples for other
service providers on the Wiki.
I would recommend that you add another peer, with the same host name
after this entry. Asterisk matches the last one in sip.conf. In this
peer, add "insecure=very" to disable authentication.
Regards,
/Olle
----
Astricon - the Asterisk User's conference - Madrid June 15-17
http://www.astricon.net/europe/ - Register today!
More information about the asterisk-users
mailing list