<span class="postbody">Hi
<br>
<br>
I am a newbie to * and I am having a problem which appears strange as I did not find any mention of it anywhere in my search.
<br>
<br>
Simply speaking, I have an external SIP proxy server which I am trying
to configure for incoming and outgoing calls from my asterisk
installation. So here is my configuration in sip.conf
<br>
<br>
[general]
<br>
register => <a href="http://user:secret:user@sipserver.com:8080">user:secret:user@sipserver.com:8080</a>
<br>
<br>as long as I have just the above entry, I am able to receive
incoming calls. Now I would like to setup outgoing calls too. So I
create a new section in sip.conf
<br>
<br>
[sipserverout]
<br>
type=peer
<br>
secret=secret
<br>
username=user
<br>
fromuser=user
<br>
fromdomain=<a href="http://sipserver.com">sipserver.com</a>
<br>
host=<a href="http://sipserver.com">sipserver.com</a>
<br>
port=8080
<br>
context=default
<br>
<br>
with the above configuration I can successfully dial out using dial(SIP/{$EXTEN}@sipserverout)
<br>
<br>but now when I call my incoming number, I get a busy or invalid
number signal. If I coment out sipserverout section, I could receive
incoming calls again.
<br>
<br>So I turned on sip debug on CLI. and it appears to me that the
following is happening. astreisk takes the incoming call and tries to
match it with a section with the same hostname. Now the reverse IP
lookup on <a href="http://109.147.41.48">109.147.41.48</a> return <a href="http://sipserver.com">sipserver.com</a> (which is correct), so it
is trying to send the call to sipserverout which is essentially back to
the same server where it came from (Notice the statement "Found peer
'sipserverout'" in the sip debug logs below). This creates an endless
loop and the equipment at the other end terminates the call.
<br>
<br>According to all the examples I have seen, my setup is the correct
setup and everyone seems to be using it. but it does not work for me. I
am deperately looking for a solution. Please help.
<br>
<br>
I am using asterisk 1.2.0 beta 1 on FC1.
<br>
<br>
Here is the sip debug dump when a call is coming.
<br>
<br>
<-- SIP read from <a href="http://109.147.41.48:8080">109.147.41.48:8080</a>:
<br>
INVITE sip:s@66.197.70.80:5050 SIP/2.0
<br>
Record-Route: <sip:<a href="http://209.47.41.48:80">209.47.41.48:80</a>;ftag=2C996308-10F9;lr=on>
<br>
Via: SIP/2.0/UDP <a href="http://209.47.41.48:80">209.47.41.48:80</a>;branch=z9hG4bK03a4.da6a926.0
<br>
Via: SIP/2.0/UDP <a href="http://209.47.41.61:5060">209.47.41.61:5060</a>;rport=53084;x-route-tag="tgrp:sroutetor1";branch=z9hG4bK4BB6EA6
<br>
From: <<a href="mailto:sip:0000123456@209.47.41.61">sip:0000123456@209.47.41.61</a>>;tag=2C996308-10F9
<br>
To: <<a href="mailto:sip:16166739282@209.47.41.48">sip:16166739282@209.47.41.48</a>>
<br>
Date: Thu, 06 Oct 2005 08:13:58 GMT
<br>
Call-ID: <a href="mailto:FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61">FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61</a>
<br>
Supported: timer
<br>
Min-SE: 1800
<br>
Cisco-Guid: 4208765565-896995802-2793406481-2459445924
<br>
User-Agent: Cisco-SIPGateway/IOS-12.x
<br>
Allow: INVITE, OPTIONS, BYE, CANCEL, ACK, PRACK, COMET, REFER, SUBSCRIBE, NOTIFY, INFO, UPDATE, REGISTER
<br>
CSeq: 101 INVITE
<br>
Max-Forwards: 4
<br>
Remote-Party-ID: <<a href="mailto:sip:0000123456@109.147.41.48">sip:0000123456@109.147.41.48</a>>;party=calling;screen=yes;privacy=off
<br>
Timestamp: 1128586438
<br>
Contact: <sip:0000123456@109.147.41.48:53084>
<br>
Expires: 180
<br>
Allow-Events: telephone-event
<br>
Content-Type: application/sdp
<br>
Content-Length: 369
<br>
hint: NAThelper
<br>
hint: SDP rewritten
<br>
hint: usrloc applied
<br>
hint: NAT...
<br>
<br>
v=0
<br>
o=CiscoSystemsSIP-GW-UserAgent 5168 3221 IN IP4 <a href="http://209.47.41.61">209.47.41.61</a>
<br>
s=SIP Call
<br>
c=IN IP4 <a href="http://109.147.41.48">109.147.41.48</a>
<br>
t=0 0
<br>
m=audio 53870 RTP/AVP 0 8 18 3 101
<br>
c=IN IP4 <a href="http://109.147.41.48">109.147.41.48</a>
<br>
a=rtpmap:0 PCMU/8000
<br>
a=rtpmap:8 PCMA/8000
<br>
a=rtpmap:18 G729/8000
<br>
a=fmtp:18 annexb=yes
<br>
a=rtpmap:3 GSM/8000
<br>
a=rtpmap:101 telephone-event/8000
<br>
a=fmtp:101 0-16
<br>
a=direction:passive
<br>
a=nortpproxy:yes
<br>
<br>
--- (26 headers 16 lines)---
<br>
Using INVITE request as basis request - <a href="mailto:FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61">FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61</a>
<br>
Sending to <a href="http://109.147.41.48">109.147.41.48</a> : 80 (non-NAT)
<br>
Found peer 'sipserverout'
<br>
Reliably Transmitting (no NAT) to <a href="http://209.47.41.48:80">209.47.41.48:80</a>:
<br>
SIP/2.0 407 Proxy Authentication Required
<br>
Via: SIP/2.0/UDP <a href="http://209.47.41.48:80">209.47.41.48:80</a>;branch=z9hG4bK03a4.da6a926.0
<br>
Via: SIP/2.0/UDP <a href="http://209.47.41.61:5060">209.47.41.61:5060</a>;x-route-tag="tgrp:sroutetor1";branch=z9hG4bK4BB6EA6
<br>
From: <<a href="mailto:sip:0000123456@109.147.41.48">sip:0000123456@109.147.41.48</a> >;tag=2C996308-10F9
<br>
To: <<a href="mailto:sip:16166739282@109.147.41.48">sip:16166739282@109.147.41.48</a> >;tag=as1b7fff99
<br>
Call-ID: <a href="mailto:FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61">FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61</a>
<br>
CSeq: 101 INVITE
<br>
User-Agent: Asterisk PBX
<br>
Allow: INVITE, ACK, CANCEL, OPTIONS, BYE, REFER, NOTIFY
<br>
Contact: <sip:s@66.197.70.80:5050>
<br>
Proxy-Authenticate: Digest realm="asterisk", nonce="6d00a83d"
<br>
Content-Length: 0
<br>
<br>
<br>
---
<br>
Scheduling destruction of call '<a href="mailto:FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61">FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61</a>' in 15000 ms
<br>
<br>
<-- SIP read from <a href="http://109.147.41.48:8080">109.147.41.48:8080</a>:
<br>
ACK sip:s@66.197.70.80:5050 SIP/2.0
<br>
Via: SIP/2.0/UDP <a href="http://109.147.41.48:8080">109.147.41.48:8080</a>;branch=z9hG4bK03a4.da6a926.0
<br>
From: <<a href="mailto:sip:0000123456@109.147.41.48">sip:0000123456@109.147.41.48</a>>;tag=2C996308-10F9
<br>
Call-ID: <a href="mailto:FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61">FADDE365-357711DA-80F5C727-E0F535F0@209.47.41.61</a>
<br>
To: <<a href="mailto:sip:16166739282@109.147.41.48">sip:16166739282@109.147.41.48</a>>;tag=as1b7fff99
<br>
CSeq: 101 ACK
<br>
User-Agent: Phone Server 1
<br>
Content-Length: 0<br>
<br>
</span>