PROBLEM IN MAKING OUTGOING CALLS using SIp

HElLLO

     i have problem in making outgoing call using my asterisk

i have register my asterisk in the sip server…

i have been using net4india account.

i hav configure my asterisk

in extension.conf

exten => _XXXXXXXXXX,1,dial({$EXTEN)})

can u give me the configuration setup for outgiong calls

your dialstring is wrong. look at the documetation for Dial() … Dial(/<provider/trunk>/||) would be a better way to do it.

if your trunk is setup incorrectly, why not ask the ITSP for help ? if you want help here, post the relevant sections from sip.conf and extensions.conf and a log file fragment for a failed call.

You need to add a outgoing peer to the dial statement.
The peer would be configured in the sip.conf.

From my extensions.conf:
exten => _00Zxxxx.,1,DIAL(SIP/${EXTEN}@sip_out) ; intl. calls

From my sip.conf:
[sip_out]
type=peer
context=incoming
etc

Rgds

Patrick Arkley
www.say-no.se

THANKS FOR YOUR RESPONSES

I HAVE DONE IT

i have made outgoing call …

this outgoing call is made in asterisk server itself…

i have another doubt … if i want to make a outgoing through the extension

wat are the configuration hav to be done in asterisk???

I don’t follow you.

The outgoing rules apply on all subcribers.

BTW: make sure you don’t include other contexts making your outgoing context available for incoming calls.

Let me explain:
Prev. my outgoing context included “homeusers”. My default context was “homeusers”.
So when I made a url call (public no@domain) to my asterisk from a phone outside this system it would search for the number/ext in “homeusers”. When it could not find a match it tried the outgoing context and found a mtaching rule. Off the call went to my voip provider and I was charged the PSTN call.

Be aware!

Rgds

Patrick Arkley
www.say-no.se

dinesh, you need to be a bit more clear about what you’re trying to do. and supply configs if you want us to debug where you have problems.

Sorry. Please ignore my previous mail.

Given below are the configurations done in the sip and extension config files
sip.conf
[general]
bindport=5060 ; UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0 ; IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes ; Enable DNS SRV lookups on outbound calls

[fwd.pulver.com-out]
type=peer
username=xxxxxx
secret=FWD
host=fwd.pulver.com
fromdomain=fwd.pulver.com
context=tutorial

[835412]
type=peer
host=dynamic
username=xxxxxx
secret=FWD
context=tutorial

extensions.conf
[general]
static=yes
writeprotect=no
autofallthrough=yes
priorityjumping=no
clearglobalvars=no

[tutorial]
exten => _8.,1,Dial(SIP/${EXTEN:1}@fwd.pulver.com-out,60,r)

I made a call from asterisk console using the dial string
dial 8*XXXXXXXXXX@tutorial

From which i was able to hear the ringing tones only.
And it replied with the response " 500 " and thereafter channel oss/dsp congestion

And also when i dialed the same number using the string 8*XXXXXXXXXX from my extension is replied as service unavailable

Please correct me where i am going wrong. Is that i need to add any codecs?

I tried to with other provider also, but in vain, i heared the same ringing sound.

Regards
Dinesh

firstly, if those usernames/passwords are the actual ones you use, edit your post and “x” them out, or change your password with FWD.

does Asterisk register the call attempt from your phone ? does the phone have access to the [tutorial] context ? can you show a log file fragment for this call ?

you should set codecs for the peer/user/friend according to what you know they support for best performance and clarity of config. and if your Asterisk box is behind a NAT you should set a bit more in the [general] section of sip.conf … look for NAT on the wiki for more info.

are you using a register statement in sip.conf too ?

yes, it asterisk displays
Dial(“OSS/dsp”,“SIP/destinationnumber@fwd-pulver.com-out|60|r”)

How should i ensure i have phone has access to the context tutorial?
I have the context statement in the asterisk peer[835412] and in the fwd-pulver-out also

No i did not have any logs,

No, I didnot add any codecs

No, I am working with public ip

No i do not have register statement in it

Regards
Dinesh

[835412] - is that sip phone /subscriber?

Shouldn’t the type be friend?

Rgds

Patrick Arkley
www-say-no.se

[835412] - it is an extension (SIP Phone)

I want it to be calling outside thats y i put as peer ,is there anything wrong by putting type as peer???

Regards
Dinesh.K

hello can any one help me out

In sip.conf you use register to register with your sip provider.
You add a “sip_out” channel with type peer.

Your phones should be type friend to allow incoming calls and outbound calls.

It is in the extensions .conf you define how calls are treated. You must have outbound dial statements that matches patterns and also uses a channel you defined in sip.conf.

Rgds

Patrick Arkley
www.say-no.se

What is your context for incoming calls?

/Patrick Arkley

I’m using Linux for almost 10 years now… Been administrating Linux servers running almost everything, from Apache to databases, have good know-how on programming languages, etc, etc, etc… BUT the first thing I did BEFORE installing an Asterisk Server was downloading the great book “Asterisk The Future of Telephony”. Almost every answer for almost every post I read here is there…

Hi

I have gone through the chapters of FOT.

I have made all the changes but i still could not

My sip.conf file

[sipprovider-out]
type =friend
username = my username
secret= mypassword
host= sip provider.com
from domain = sip provider.com
qualify = yes
insecure= very
nat=no
disallow = all
allow = ulaw
allow = alaw
allow = ilbc
allow = g729
context = mycontext

[1234]
type =friend
username = karthik
secret = passdaword
host = dynamic
disallow = all
allow = ulaw
allow = alaw
allow = ilbc
allow = g729
context = mycontext

My extensions.conf

[mycontext]
exten => _0.,1,Dial(SIP/${EXTEN:1}@sipprovider-out,20,r)
exten => _0.,2,Hangup()

My dial string from my asterisk console

dial 01234654789@mycontext
where 123456789 is my destination
the output which i got in asterisk console

Executing -----------> Dial(123456789@sipprovider-out)
Called -------------> 123456789

Afterwhich i could hear the ringing sound for about 20 seconds

Then it replied as “no bodypicked up in 20 seconds”

Please help me

Thanks in advance

Regards
Karthik

isn’t it doing as you asked it ? dialling with a 20 second timeout ?

what is it you think is not working ?

Hi Sorry to hijack this thread I have a similar problem been struggling for 2 days now, cannot get any outgoing calls to work.

EXTENSIONS.CONF

[sip]
exten => 2001,1,Dial(SIP/2001,20,tr)
exten => 2002,1,Dial(SIP/2002,20,tr)
exten => 1777102506,1,Dial(SIP/2001&SIP/2002,20,tr)

; Create an extension, 600, for evaluating echo latency.
;
exten => 600,1,Playback(demo-echotest) ; Let them know what’s going on
exten => 600,n,Echo ; Do the echo test
exten => 600,n,Playback(demo-echodone) ; Let them know it’s over
exten => 600,n,Goto(s,6) ; Start over

[myvsp-out]
exten => _X.,1,Dial(SIP/${EXTEN:1}@sip.myvsp.com.au,30,r)
; I have change the above to>
;[exten => _X.,1,Dial(SIP/${EXTEN}@sip.myvsp.com.au-out,30,r)]
;[exten => _X.,1,Dial(SIP/${EXTEN}@myvsp-out,30,r)]
still same results

SIP.CONF

[general]

port = 5060 ; Port to bind to (SIP is 5060)
bindaddr = 0.0.0.0 ; Address to bind to (all addresses on machine)

disallow=all

allow=ulaw
allow=alaw

context = sip ;Default for incoming calls

register =>177710XXXX:PASSWORD@myvsp.com.au/177710XXXX

[myvsp-out]
type=peer
secret=PASSWORD
username=177710XXXX
host=myvsp.com.au
fromuser=177710XXXX
canrenvite=no
insecure=very
qualify=yes
context=sip ; this section will be defined in extensions.conf

[2001]
type=friend
host=dynamic
defaultip=192.168.1.116
username=2001
secret=PASSWORD
dtmfmode=rfc2833
;mailbox=2001@device
context=sip
callerid=SPA3000

[2002]
type=friend
host=dynamic
defaultip=192.168.1.134
username=2002
secret=PASSWORD
dtmfmode=rfc2833
;mailbox=2002@device
context=sip
callerid=Laptop <2002>

I can call from extension 2001 to 2002 and the other way around, I can also
call into my server from another VSP number set-up on a PAP2 into my box and
it rings ok with audio as well. What I have been struggling is trying to
dial out I cannot call my PAP2 VSP number from any of the extensions from my
server i.e 2001 and 2002 I get a reorder tone, when I use my softphone on my
Laptop which is extension 2002 a message pops up [no route to destination
for a second or so] What am I doing wrong here. Please help me if possible
as I am really stuck.


EDIT:


I have now fixed this problem all working good.

Thanks

Hi

But i could hear the other party voice to whom i am dialling?

Regards
Karthik

do you mean that you got connected to the destination, but the dial timeout kicked in … if so, you probably want to take it up with the provider, it sounds as if they aren’t detecting the remote answer correctly.