Im Lost - cant setup outgoing calls!

Hello guys, It’s been 4 days and I still cant setup my outgoing calls! I posted once, read some docs and still cant figure it out, so you are my only hope…

I do not have my phone line (I use cell) so I got my number online from sipnumber.com/ -they offer free phone and free incoming calls so it’s a great piece to test all the stuff. I setup my incoming dial plan and it works just fine, but I cant call using my VOIP line (I added money and I can call STRAIGHT from softphone) but when I dial from asterisk, I’m getting welcome message sipnumber.com and nothing happens…
Can u please tell me what is my mistake?

PS and one more thing - when I type type=friend OR peer for this connection, it does not allow incoming calls and I can place that weird outgoing call I described above, when I change type to user, Asterisk gets the call and route the calls, but when I use exten => _01 I get No Such Host warning…

-----------
SIP.CONF
[general]
context=default
port=5060
bindaddr=0.0.0.0
srvlookup=yes
insecure=very
register => 31939*****:********@sipnumber.net


[sipnumber]
type=peer
fromuser=31939*****
secret=********
host=sipnumber.net
dtmfmode=rfc2833
username=31939*****

-----------
extensions.conf

exten => _01.,1,Dial(SIP/sipnumber/${EXTEN:2})

Please help. thank you.

turn on sip debugging by typing

“sip debug” on the asterisk CLI.

then post the SIP messages that are generated during registration.

either create 2 sections in sip.conf, 1 as a user (for incoming calls) and the other as a peer for the outgoing calls, or construct your dialstring so that username and password get passed as part of the dial.

vinod.vijayan
It’s here: mod.pc-zone.net/debug_sip.zip

baconbuttie
Thanks for answer, can u guide me in right direction (not door :smiley: ) and explain what do u mean?

[code]; in sip.conf
[general]
context=default
port=5060
bindaddr=0.0.0.0
srvlookup=yes
insecure=very
externip = 123.123.123.123 ; your public ip address
nat = yes
disallow = all
allow = gsm
allow = ulaw
allow = alaw
context = from-sip-unknown ; where unknown callers go to.
dtmfmode = auto
callerid = Unknown
checkmwi = 1
notifyringing = yes
register => 31939*****:********@sipnumber.net

[sipnumber]
disallow=all
allow=gsm
allow=ulaw
allow=alaw
type=peer
nat=yes
insecure=very
qualify=yes
fromuser=31939*****
fromdomain=sipnumber.net
fromuser=31939*****
secret=********
host=sipnumber.net
username=31939*****

[31939*****]
disallow=all
allow=gsm
allow=ulaw
allow=alaw
username=31939*****
type=user
secret=********
qualify=no
nat=yes
insecure=very
host=80.249.108.21
fromdomain=proxy.voip.co.uk
context=incoming-sipnumber

; extensions.conf
[from-sip-unknown]
exten => _X.,1,NoOp(Incoming SIP call from unknown caller)
exten => _X.,2,Congestion()
exten => _X.,3,Hangup()

[incoming-sipnumber]
exten => _X.,1,NoOp(Incoming SIP call from SIPNUMBER)
exten => _X.,2,Dial(SIP/200|30|tw)
exten => _X.,3,VoiceMail(200|ug(5))
exten => _X.,4,Hangup()

[outbound] ; this is a context your phones have access to
exten =>_01.,1,Dial(SIP/sipnumber/${EXTEN:2}|60|TW)
[/code]

that should work, i don’t have access to a sip.conf right now to check it again. you might want to check it against the wiki (search for sip.conf)

Question:
what is it?
host=80.249.108.21
fromdomain=proxy.voip.co.uk

And another one: why asterisk does not register same SIP server for incoming and outgoing calls?

Is it me, or it’s more complicated than I think?

well it’s obviously part of my config that i missed out removing !! surely you can work out from that what you need to do.

is your second question related to the first ?

Thank you.

Your config works, but I still have same problems:

  1. I can’t use same sip provider to call AND receive calls at the same time.
    It works for incoming when I don’t register outbound setting (when I set type=user). When I set type=friend then I can call out, but cant receive calls.

  2. When I call out I get “Thank you for using us” message from sipnumber.com instead of connection. (When I dial straight from X-Lite with sipnumber.com setting, I can call and receive calls)

:frowning:

post your sip.conf here

Confings pretty much empty…

[code]
SIP

[general]
context=default
port=5060
bindaddr=0.0.0.0
srvlookup=yes
insecure=very
externip = 67.167..; your public ip address
nat = yes
disallow = all
allow = gsm
allow = ulaw
allow = alaw
context = from-sip-unknown ; where unknown callers go to.
dtmfmode = auto
callerid = Unknown
checkmwi = 1
notifyringing = yes
register => 319*******:********@sipnumber.net

[sipnumber]
type=friend
context=default
host=sipnumber.net
username=319*******
secret=qwerty
fromuser=********
disallow=all
allow=gsm
allow=ulaw
allow=alaw

[3000]
type = friend
context=default
username = 3000
host = dynamic
mailbox = 3000
dtmfmode=rfc2833

[3001]
type = friend
context=default
username = 3001
host = dynamic
mailbox = 3001
dtmfmode=rfc2833

extensions

[general]
static=yes
writeprotect=no

[globals]
[from-sip-unknown]
exten => s,1,Wait,1 ; Wait a second, just for fun
exten => s,2,Answer ; Answer the line
exten => s,3,DigitTimeout,5 ; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10 ; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats) ; Play a congratulatory message
exten => s,6,BackGround(demo-instruct) ; Play some instructions
include => internal

[sipnumber]
exten => s,1,Wait,1 ; Wait a second, just for fun
exten => s,2,Answer ; Answer the line
exten => s,3,DigitTimeout,5 ; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10 ; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats) ; Play a congratulatory message
exten => s,6,BackGround(demo-instruct) ; Play some instructions
include => internal

[outbound] ; this is a context your phones have access to
exten => _01.,1,Dial(SIP/sipnumber/${EXTEN:2}|60|TW)

[internal]
exten => 3000,1,Dial(SIP/3000,30,Ttm)
exten => 3000,2,Playback(invalid)
exten => 3000,3,Hangup
exten => 3000,102,Voicemail(u3000)
exten => 3000,103,Hangup
exten => 3001,1,Dial(SIP/3001,30,Ttm)
exten => 3001,2,Playback(invalid)
exten => 3001,3,Hangup
exten => 3001,102,Voicemail(u3001)
exten => 3001,103,Hangup

[default]
include => from-sip-unknown
include => sipnumber
include => outbound
include => internal
[/code][/b]

as i suggested earlier in the thread, who not create 2 entries in sip.conf, 1 for outgoing, 1 for incoming ?

sip:

[general] 
context=default 
port=5060 
bindaddr=0.0.0.0 
srvlookup=yes 
insecure=very 
externip = ************
nat = yes 
disallow = all 
allow = gsm 
allow = ulaw 
allow = alaw 
context = from-sip-unknown ; where unknown callers go to. 
dtmfmode = auto 
callerid = Unknown 
checkmwi = 1 
notifyringing = yes 
register => 31939*****:********@sipnumber.net 

[sipnumber]
type=peer 
context=default
host=sipnumber.net 
username=31939****
secret=********
fromuser=********
disallow=all 
allow=gsm 
allow=ulaw 
allow=alaw 

[31939*****] 
type=user 
host=sipnumber.net 
username=31939**** 
secret=******** 
host=sipnumber.net 
context=incoming-sipnumber 

[3000]   
type = friend
context=default
username = 3000
host = dynamic
mailbox = 3000
dtmfmode=rfc2833

[3001]   
type = friend
context=default
username = 3001
host = dynamic
mailbox = 3001
dtmfmode=rfc2833

ext:

[general]
static=yes
writeprotect=no

[globals]

[from-sip-unknown] 
exten => s,1,Wait,1			; Wait a second, just for fun
exten => s,2,Answer			; Answer the line
exten => s,3,DigitTimeout,5		; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10		; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats)	; Play a congratulatory message
exten => s,6,BackGround(demo-instruct)	; Play some instructions
include => internal

[incoming-sipnumber] 
exten => s,1,Wait,1			; Wait a second, just for fun
exten => s,2,Answer			; Answer the line
exten => s,3,DigitTimeout,5		; Set Digit Timeout to 5 seconds
exten => s,4,ResponseTimeout,10		; Set Response Timeout to 10 seconds
exten => s,5,BackGround(demo-congrats)	; Play a congratulatory message
exten => s,6,BackGround(demo-instruct)	; Play some instructions
include => internal

[outbound] ; this is a context your phones have access to 
exten => _01.,1,Dial(SIP/sipnumber/${EXTEN:2}|60|TW) 

[internal]
exten => 3000,1,Dial(SIP/3000,30,Ttm)
exten => 3000,2,Playback(invalid)
exten => 3000,3,Hangup
exten => 3000,102,Voicemail(u3000)
exten => 3000,103,Hangup
exten => 3001,1,Dial(SIP/3001,30,Ttm)
exten => 3001,2,Playback(invalid)
exten => 3001,3,Hangup
exten => 3001,102,Voicemail(u3001)
exten => 3001,103,Hangup

[default]

include => from-sip-unknown
include => incoming-sipnumber
include => sipnumber
include => outbound
include => internal

With this confing same story :frowning:

post a log file fragment for a failed call.

Situation: can’t call in, can partially call out (call out type=peer)
When I call from my cell to voip number I get message “contact not available”. When I call trough Asterisk, it connect me right away to server (it will not connect me with wrong user) and I’m getting “Welcome Message” instead of connection with recipient…

Situation: CAN call in, can’t call out (call out type=user )
I can dial number from my cell age get to Asterisk.
and get:
create_addr: No such host: sipnumber // because type is user

I posted dedug fragment before mod.pc-zone.net/debug_sip.zip

Could it be sipnumber.com error? If I give you my acc# there, can u check it?

The link has file with 0 bytes.

Upload the file again or just paste the messages in this forum.

The link has file with 0 bytes.

Upload the file again or just paste the messages in this forum.

OMG!
I digged out sipnumber.net and figured out that they are freedigits.com sub devision!

Used freedigits.net as host and everything worked!

THX guy for your time and PATIENCE.

especially baconbuttie