Sip phones can't comminucate

Hello people,

I’m new to Asterisk but after reading about it for some time now, I decided to take a change and try it myself.

As far as i know the installation is completed successfully.
I entered to sip phones in sip.conf (and some others to test):
[ul]
[general]
context=default
port=5060
bindaddr=0.0.0.0
srvlookup=yes
disallaw=all
allow=ulaw
allow=alaw
nat=yes
domain=192.168.1.100

[1003]
type=friend
callerid=“mark”<1003>
port=5060
username=mark
secret=XXX
host=dynamic
mailbox=1003
nat=route

[1004]
type=friend
callerid=“Elias”<1004>
port=5060
username=elias
secret=XXX
host=dynamic
mailbox=1004
nat=route
canreinvite=no
[/ul]

That I edited the extensions.conf like this:
[ul]
[general]
static=yes
writeprotect=yes

[default]
exten => 1003,1,Ringing
exten => 1003,2,wait,2
exten => 1003,3,Dial(SIP/1003,20,t,r)

exten => 1004,1,Ringing
exten => 1004,2,wait,2
exten => 1004,1,Dial(SIP/1004,20,t,r)

exten => 1000,1,Answer
exten => 1000,2,playback(tt-monkeys)
exten => 1000,3,Hangup

exten => 1001,1,Answer
exten => 1001,2,playback(welcome)
exten => 1001,3,playback(demo-echotest)
exten => 1001,4,echo
exten => 1001,5,Hangup
[/ul]

I can dial 1000 and 1001 from both phones (1003 and 1004) and the applications like playback and echo do function. But when I try to call 1004 from 1003 (or visa versa) I see on the asterisk CLI that a connection is made but I can’t hear anything on both phones.

Can somebody point me in the right direction please?

BTW: It’s Asterisk 1.2.2 compiled on Debian Stable.

post the log file for a failed call.

and perhaps look at the format of your exten => lines … too many ‘,’ delimiters , e.g. exten => 1003,3,Dial(SIP/1003,20,t,r) should probably be exten => 1003,3,Dial(SIP/1003|20|tr) or exten => 1003,3,Dial(SIP/1003,20,tr)

also, i’m not sure why you want to start Ringing, then wait for 2 seconds, then Dial and present ringing again.

try setting canreinvite=no? also make sure all your RTP ports aren’t firewalled (set them in rtp.conf)

as has been said you group the flags together, ie dial(SIP/1234,20,tr) not SIP/1234,20,t,r) (the t and r dont get a comma between them). However IMHO you should not use the r flag, shouldn’t be needed.

Also on exten 1234 your priorities are wrong, the dial and the ringing are both priority 1…

first of all. Thank you guys for your replies.

I changed the 1003,3,Dial(SIP/1003,20,t,r) to 1003,3,Dial(SIP/1003,20,tr), the prioreties in the extensions.conf to:
[ul]
exten => 1003,1,Ringing
exten => 1003,2,Dial(SIP/1003,20,tr)

exten => 1004,1,Ringing
exten => 1004,2,Dial(SIP/1004,20,tr)

exten => 1000,1,Answer
exten => 1000,2,playback(tt-monkeys)
exten => 1000,3,Hangup

exten => 1001,1,Answer
exten => 1001,2,playback(welcome)
exten => 1001,3,playback(demo-echotest)
exten => 1001,4,echo
exten => 1001,5,Hangup
[/ul]

But I still have the same problem.

The /var/log/asterisk/messages tells me:
[ul]
Oct 17 13:17:34 WARNING[18922] pbx.c: Timeout, but no rule ‘t’ in context 'default’
Oct 17 13:18:29 WARNING[18925] pbx.c: Timeout, but no rule ‘t’ in context 'default’
Oct 17 13:20:14 NOTICE[18910] cdr.c: CDR simple logging enabled.
Oct 17 13:20:14 NOTICE[18910] indications.c: Removed default indication country 'us’
Oct 17 13:20:14 WARNING[14786] chan_sip.c: Empty context specified at line 10 for domain '192.168.1.100’
Oct 17 13:20:14 WARNING[18910] chan_zap.c: Ignoring switchtype
Oct 17 13:20:14 WARNING[18910] chan_zap.c: Ignoring signalling
Oct 17 13:20:14 WARNING[18910] chan_zap.c: Ignoring rxwink
Oct 17 13:26:36 WARNING[18963] pbx.c: Timeout, but no rule ‘t’ in context 'default’
Oct 17 13:26:56 WARNING[18966] pbx.c: Timeout, but no rule ‘t’ in context ‘default’
[/ul]

Does anybody know what it means and if it is related to my previous mentioned problem?
BTW: the ports 10000 to 20000 are forwarded to the asterisk box.

paste the CLI output that you get when you attempt to call one phone to another

Here it is
[ul]

unimatrix00:/home/mark# asterisk -r
Asterisk 1.2.2, Copyright © 1999 - 2006 Digium, Inc. and others.
Created by Mark Spencer markster@digium.com
Asterisk comes with ABSOLUTELY NO WARRANTY; type ‘show warranty’ for details.
This is free software, with components licensed under the GNU General Public
License version 2 and other licenses; you are welcome to redistribute it under
certain conditions. Type ‘show license’ for details.

Connected to Asterisk 1.2.2 currently running on unimatrix00 (pid = 14765)
Verbosity is at least 3
– Executing Ringing(“SIP/1003-2c34”, “”) in new stack
– Executing Dial(“SIP/1003-2c34”, “SIP/1004|20|tr”) in new stack
– Called 1004
– SIP/1004-2df3 is ringing
– SIP/1004-2df3 answered SIP/1003-2c34
– Attempting native bridge of SIP/1003-2c34 and SIP/1004-2df3
== Spawn extension (default, 1004, 2) exited non-zero on ‘SIP/1003-2c34’
[/ul]

When I call “back”:
[ul]
– Executing Ringing(“SIP/1004-534e”, “”) in new stack
Oct 17 13:53:56 WARNING[19019]: pbx.c:2405 __ast_pbx_run: Timeout, but no rule ‘t’ in context 'default’
unimatrix00*CLI>
[/ul]

hmmm… according to the first one it should be working.

First try remove the Ringing() as it is not needed at all (same as ‘r’ flag). Then when you call do RTP debug, this will generate a ton of output paste about 10 or 20 lines of it?