Problem with redirecting a phone call

Hi,

I am trying to set an asterisk box to play with… The first try is to get a call from a sip DID account I have, and redirect it to my mobile phone, through sip account (the same or different were tried, none worked). On the way I’m trying the way to unmask phone calls…
In the system’s logs I can see that the call is being caught by the asterisk, but it’s not successfully dialing it out to my mobile phone.
I’m using the following line as the dial out in the extensions_custom.conf

exten => 0579464888,6,Dial(SIP/054493333@d1.spikko.com)

I’m using Spikko as my provider of the DID number.
I’ve tried to write instead of d1.spikko.com the name of the trunk (simply “spikko”) but it’s giving me an error saying it’s busy.
I see both DID numbers are registered successfully, but yet, can’t take out calls.

When using the way mentioned above, with the number@domainname, it writes that it dials out to the number, but never reaches my mobile phone.
(I have tested the same account on a softphone software and it succeeded dialing out through it, so it’s not a problem with the provider).

Also, the computer is behind NAT, but when I tried configuring it to work with nat settings it just didn’t work. how to configure that as well?

Below are my full settings from the sip_custom.conf and extensions_custom.conf

Thanks,
Ido

extensions_custom.conf:

[inbound-spikko]
;workaround to prevent rtp deadlock
exten => 057946xxxx,1,Playtones(425/50,0/50) ;Playback(silence/1|noanswer)
;save the callerid to a variable
exten => 057946xxxx,2,Set(passertedid=${SIP_HEADER(P-Asserted-Identity)})
;save the privacy bit to a variable (if it is set)
exten => 057946xxxx,3,Set(privheader=${SIP_HEADER(Privacy)})
;check if callerid is private
exten => 057946xxxx,4,GotoIf($[${LEN(${privheader})} > 1]?8)
;send out regular callerids without modification
exten => 057946xxxx,5,Set(CALLERID(all)=${CUT(passertedid,@,1):5})
exten => 057946xxxx,6,Dial(SIP/054493xxxx@d1.spikko.com)
;prepend 900 to blocked callerids before unmasking
exten => 057946xxxx,7,Set(CALLERID(all)=+900${CUT(passertedid,@,1):5})
exten => 057946xxxx,8,Dial(SIP/054493xxxx@d1.spikko.com)

sip_custom.conf:

register => user:pass@sip.spikko.com:5090/057946xxxx
register => user2:pass2@d1.spikko.com:5090/057946yyyy
[spikko]
type=friend
secret=pass
username=user
host=sip.spikko.com
port=5090
context=inbound-spikko
fromuser=user
disallow=all
allow=g729&gsm&ulaw&alaw

[spikko2]
type=friend
secret=pass2
username=user2
host=d1.spikko.com
port=5090
fromuser=user2
disallow=all
allow=g729&gsm&ulaw&alaw

You haven’t specified the port number when you used the domain directly. 5090 is not the default.

The limitation when using sip.conf device entries may well be the result of a commercial restriction imposed by Spikko. One would need to see the sip debug trace to be more certain.

isn’t there a way to use the trunk’s name instead of using the domain?
what is the correct syntax of the Dial method?

Thanks,
Ido

Dial(/[&/]*, )

The syntax of depends on and is not specific to the Dial application.

For SIP, the form you used (@) is usually OK, but you could also try /.

A sip set debug on trace would make it clear what was being sent and might give additional information on why it was being rejected. You should still consider the possibility that the service provider only allows one simultaneous call.

Note that trunk is not an Asterisk term.

Also you are not actually redirecting the call. Some providers will not accept true redirections, which are done using Transfer(). Transfer is most reliable if used before answering the call.