Dial() problem (with trixbox)

I need to fix a Trixbox server ( with Asterisk 1.4.18 ) that I did not install or configure and where it is possible to call out and receive external calls from a VoIP provider but it is not possible to make calls between extensions (strange as this may seem). As far as I could see, the setup shown by FreePBX looks ok, so I made a SIP debug on the calling IP. I also did this on another Asterisk server I have (1.2.x) and compared lines to see any obvious differences. I thinks I found it in the Dial() application.

a) Working in Asterisk:

Executing Dial(“SIP/miguelk-b7906398”, “SIP/ritan|30|rtT”) in new stack

This is where “miguelk” is calling “ritan”. Here “ritan” is a peer (type=friend) in sip.conf.

b) NOT working in Trixbox

Executing [5001@from-internal:1] Dial(“SIP/5022-090fc7b0”, “SIP/5001@501”) in new stack

After this line I see the “everyone is busy/congested at this time…” message and the dial plan goes into a Trixbox macro called “hangupcall”.

Here 5022 is calling 5001 and 5001 is defined as a generic SIP extension in Trixbox.

So it looks like the SIP/5022 is missing the options and instead has “@501” tacked on.

Can anybody tell me if this line is ok with Asterisk 1.4.x and/or if it has an obvious setup problem in Trixbox? I can’t figure out where it is getting the @501 from. That may be the cause of the problem.

Also if anybody can tell me excatly what the latter line means I would really appreciate it.