Asterisk do not recognize that the called party picked up


#1

Hi!

My Asterisk works fine so far exept one case.
Out- and incomming calls from CAPI (chan_capi) and incomming
calls from sipgate.de are working fine.
But if i want to make an outgoing call via sipgate.de it takes about 5-10 sec. at the beginning of the call until Asterisk prompts

even though the called party already picked up. Within this time the called party and i can´t hear anything.

Because my Asterisk is behind a NAT i put the Machine into DMZ and disabled all Firewall option of my Linksys WRT54G (2.2). This did not help (nothing changed). Because of this it seems not to be a NAT problem!?

Do someone know what the reason for this can be?

Thanks, Mike.


#2

Like you said, looks like a NAT problem. The RTP traffic is probably not getting to your box. tcpdump and/or ethereal can give you an idea of what is going on.


#3

I´ve set RTP ports in rtp.conf (10000-10005) and activeted port-forwarding (5060 UDP/TCP and 10000-10005 UDP/TCP), but i can’t find RTP port-porwarding on my router!?
Sorry, but im not that firm with routing. But if i put the machine into DMZ is there still port forwarding active?


#4

Do you give it a unique IP when you put it in the DMZ?


#5

What do you mean with unique IP?

The IP of the * Machine is 192.168.0.50. With this IP NAT ist still active because of the non offical IP, shure?

I´ve downloaded etherreal now, but i cant see the Traffic of the * Machine. My Router seems not to bring the packages to the port my WIN-Notebook is attached to. I only can see traffic to and from the Notebook.
I will try to setup etherreal directly on the * machine.


#6

Now i´ve put a hub into my network to hear all the traffic. here are the results.

Start Calling

192.168.0.50(5060) -> sipgate.de(5060) - SIP/SDP - INVITE sip:xyz@sipgate.de ... m=audio 10000

sipgate.de(5060) -> 192.168.0.50(5060) - SIP - 407 Proxy Authentication Required

192.168.0.50(5060) -> sipgate.de(5060) - SIP/SDP - ACK sip:xyz@sipgate.de

192.168.0.50(5060) -> sipgate.de(5060) - SIP/SDP - INVITE sip:xyz@sipgate.de ... m=audio 10000

sipgate.de(5060) -> 192.168.0.50(5060) - SIP - 100 trying -- your call is important to us ...

sipgate.de(5060) -> 192.168.0.50(5060) - SIP - 183 Session Progress

then i recive a few packages like

pitr02.farm02.netzquadrat.de(56968) -> 192.168.0.50(10000) - RTP - Payload type =ITU-T G.729 ....

in between are some packets like

192.168.0.50(10000) -> pitr02.farm02.netzquadrat.de(56968) - RTP - Payload type =ITU-T G.729 ....

But neither me nore the called party can hear anything.

at about that time the called party pick up there are three packes

sipgate.de(5060) -> 192.168.0.50(5060) - SIP/SDP - 200 OK ...Record Route: <sip:xyz@217.10.79.8...>Record Route: <sip:xyz@217.10.79.9...>
192.168.0.50(5060) -> sipgate.de - SIP - ACK sip:xyz@217.10.67.7
192.168.0.50(32776) -> 224.0.0.251 - MDNS - Standrad Query A sipgate.local

Seem that the problems is here, but i don’t know why the * Machine is looking for sipgate.local.
After that a few hundred RTP packages are received from pitr02.farm02.netzquadrat.de(56968) to 192.168.0.50(10000) and the again

192.168.0.50(32776) -> 224.0.0.251 - MDNS - Standrad Query A sipgate.local

later on there is a package

192.168.0.50(5060) -> 217.10.79.9(5060) - SIP - Request: OPTIONS sip:sipgate.de

and about 50 packages later

217.10.79.9(5060) -> 192.168.0.50(5060) - SIP - Status: 482 Loop Detected ... received=80.135.39.140From "asterisk" <sip: asterisk@192.168.0.50> ...

What is this?
About 170 Packages later the called party can hear me an vice versa and asterisk shows

SIP/... answered SIP/...
Attempting native bridge of SIP/... and SIP/...

Any idea?
Mike


#7

What does your extensions.conf look like for calls going out through sipgate?


#8

Here is my sip.conf

[general]
port=5060
bindaddr=0.0.0.0
erternip=xxx.dyndns.org
localnet=192.168.0.0/255.255.255.0
srvlookup=yes
context=sipgate-in
disallow=all
allow=g729
canreinvite=no
insecure=very
nat=no
dtmfmode=info
language=de
register => [SIPID]:[PASSWORD]@sipgate.de/2762720

[2762720]
context=mike
type=friend
secret=[PASSWORD]
auth=md5
host=dynamic
qualify=3000
dtmfmode=rfc2833
callerid="Mike Gahn" <2762720>
mailbox=2762720

[sipgate-mike]
type=peer
username=[SIPID]
secret=[PASSWORD]
host=sipgate.de
fromuser=[SIPID]
fromdomain=sipgate.de
qualify=yes

and here my extensions.conf

[globals]
MIKE => SIP/2762720

[capi-in]
exten => 2762720,1,SetLanguage(de)
exten => 2762720,2,Dial(${MIKE},20)
exten => 2762720,3,VoiceMail,u2762720
exten => 2702720,4,Congestion
exten => 2762720,102,VoiceMail,b2762720

[sipgate-in]
include => capi-in

[mike]
include => mike-capi-out
include => mike-voicemail
include => mike-sipgate-out

[mike-voicemail]
exten => 1000,1,Ringing
exten => 1000,2,Wait(2)
exten => 1000,3,VoicemailMain,s2762720

[mike-capi-out]
exten => _9.,1,SetLanguage(de)
exten => _9.,2,Ringing
exten => _9.,3,Dial(CAPI/2762720:${EXTEN:1})
exten => _9.,4,Congestion
exten => _9.,5,Wait(5)
exten => _9.,6,Hangup

[mike-sipgate-out]
exten => _8.,1,Dial(SIP/${EXTEN:1}@sipgate-mike,60,tT)
exten => _8.,2,Congestion
exten => _8.,3,Busy
exten => _8.,4,Hangup

#9

Hi!

In between i was thinking about

192.168.0.50(32776) -> 224.0.0.251 - MDNS - Standrad Query A sipgate.local 

My Machine-Name is linuxhome.local and in “DNS and Hostname”-Settings
i´ve put my routers-ip as nameserver and as domain-search value “local”.
Now i´ve changes domain-search value to “de” and everything works fine. i have´nt checked with etherreal now, but be shure that the package is now

192.168.0.50(32776) -> 224.0.0.251 - MDNS - Standrad Query A sipgate.de

But this must be a hack only, or? what if i would like to make phonecalles with sipgate.com. to put the tld into domain-search value cant be the right thing.

what do i have to put into domain-search value?


#10

I can solve the problem too, if i change sip.conf

[sipgate-mike] -> [sipgate.de]

i thought the value HOST will specify the target!?