Home » Asterisk Users » Call
Asterisk Users 17 Comments


At this point, I have an Asterisk 1.4 + PC running XLite behind a NAT
set up with a VOSP trunk that I can use to make/receive calls to/from
the PSTN.

Now, I’d like to be able to call any number on the Net that is
advertised as “”, such as those:

Do I need to register a second trunk (FWD, etc.) through which those
calls will be made? Can’t my VOSP perform both tasks (landline +
Internet calls)? Can I just let my Asterisk server connect to the
remote SIP server through the SRV DNS record and have it dial the

Any example appreciated, thank you.

17 thoughts on - Call

  • Just add something like this to your dialplan:


    Then, when you dial 1234 on your XLite, it will connect you to

  • On Thu, 16 Dec 2010 17:05:35 -0500, “Jamie A. Stapleton”

    Thanks Jamie, but isn’t there a universal way to solve this, so that
    users can dial any SIP number without first having to create an
    extension for that specific number?

  • Le 17/12/2010 07:45, Gilles a écrit :
    Then create a prefix for SIP calls


    and you dial
    href=””> from XLite

    Remember that calling sip URL is not as easy with a phone. Imagine you have an ATA with DECT or POTS
    phone connected on it: how to send alpha characters or @ ?

  • On Fri, 17 Dec 2010 10:16:00 +0100, Administrator TOOTAI
    href=””> from XLite

    Thanks Daniel. I added that line above, told Asterisk to reload the
    dialplan, and typed the following in XLite:


    This is to perform an echo test

    I guess something else must be done to Asterisk for this to work:


  • Le 17/12/2010 12:48, Gilles a écrit :
    href=””> from XLite

    Domain part disappear.


    In Xlite call 9*031600

    You should read info on to learn basis of Asterisk.

  • href=””> from XLite

    You have to tell it the host to request the extension from. All you’re doing is
    dialing SIP/*031600, which with that format, is going to try and call [*031600]
    as defined in sip.conf.

    You’re missing the host that you want to call. The format needs to be

    What you’re trying to do is essentially what FreeNum was designed for:

    We discuss it in this chapter here:


  • On Fri, 17 Dec 2010 14:36:58 +0100, Administrator TOOTAI

    Thanks for the tip but I wanted to be able to call _any_ SIP number,
    not just Ekiga, so needed a destination-agnostic solution.

  • On Fri, 17 Dec 2010 09:00:39 -0500, Leif Madsen

    Thanks for the tip. Elsewhere, someone suggested adding this code in
    extensions.conf, which solved the problem:

    exten => s,1,Set(dialuri=${CUT(ARG1,;,1)})
    exten => s,n,Verbose(Calling SIP URI ${dailuri})
    exten => s,n,Verbose(— From: ${CALLERID(all)})
    exten => s,n,Dial(SIP/${dialuri},60,tr)
    exten => s,n,Congestion()


    exten => _[a-z].,1,Macro(dialsipuri,${EXTEN}@${SIPDOMAIN})
    exten => _[A-Z].,1,Macro(dialsipuri,${EXTEN}@${SIPDOMAIN})

    I’ll read up on Freenum, but I was just trying to do something that I
    thought was very simple, namely make a phone call over the Net, ie.
    have XLite send an INVITE to Asterisk, which would then forward the
    INVITE to the remote server, which would ring the phone. I expected
    Asterisk users to make direct calls routinely, but maybe it’s not that

    Thanks Leif. I was going through the 2nd edition, which doesn’t seem
    to deal with direct, Internet dialing. I’ll go through that Chapter 12
    in the 3rd edition.

    Thank you.

  • On Fri, 17 Dec 2010 17:54:00 +0000, Roger Burton West

    Thanks guys for the infos. My goal was to learn how to configure
    Asterisk so it could call SIP URI (user@domain) using XLite, but
    didn’t consider the issue of regular phones, which only have a keypad.

    I’ll read up about Freenum, ENUM/E164, SIPBroker etc. to learn how to
    map a SIP URI to a digit-only number.

    Thank you.

  • You’ve missed a very important point here: you are using a *SIP*
    endpoint to call a *SIP* URI. The endpoint can do that directly, and
    doesn’t need any help from Asterisk to do it. If you wanted to be able
    to restrict/control such calls, you’d need to use a SIP proxy… but
    Asterisk is not a proxy. Asterisk is a Back-to-Back User Agent, which
    means whatever URI the endpoint sends to Asterisk terminates there, and
    Asterisk constructs an outbound URI of some form, connecting the two
    channels together.

    You should probably take a step back and ask yourself what value
    Asterisk would bring being in the middle between your SIP softphones and
    some random SIP endpoint out on the Internet. Once you determine that,
    you’ll know whether it’s worth trying to construct a solution for this
    or not.

  • On Mon, 20 Dec 2010 12:39:44 -0600, “Kevin P. Fleming”

    Thanks much Kevin. I found this article helpful to have a better
    understanding of what a B2BUA is compared to an SIP proxy:

    One advantage I see in using Asterisk even when the two end-points are
    SIP, is that I end up with a single application to handle calls
    between end-points (SIP, VOSP, and FXO) and provide additional
    features like voice-mail, etc.

    But I could use a good article/book to better understand my options,
    how Asterisk is different from the alternatives (Freeswitch, openSIPS,

    Thank you.

  • The same way Ubuntu, Slackware, CentOS &c. differ from each other. They are
    all using the Linux kernel and the X Window System “under the bonnet”. Well,
    every Free and Open Source telephony system is using Asterisk (and
    Linux) “under the bonnet”. The differences are in the user configuration