Call sip:user@domain.com?

Home » Asterisk Users » Call sip:user@domain.com?
Asterisk Users 17 Comments

Hello

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 “sip:user@domain.com”, such as those:

www.voip-info.org/wiki/view/Phone+Numbers

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
extension?

Any example appreciated, thank you.

17 thoughts on - Call sip:user@domain.com?

  • Just add something like this to your dialplan:

    exten=>1234,1,Dial(SIP/user@domain.com)

    Then, when you dial 1234 on your XLite, it will connect you to
    href=”mailto:user@domain.com”>user@domain.com.

  • On Thu, 16 Dec 2010 17:05:35 -0500, “Jamie A. Stapleton”
    wrote:
    href=”mailto:user@domain.com”>user@domain.com.

    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 :
    href=”mailto:user@domain.com”>user@domain.com.
    Then create a prefix for SIP calls

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

    and you dial
    href=”mailto:9user@domain.com”>9user@domain.com 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
    wrote:
    href=”mailto:9user@domain.com”>9user@domain.com from XLite

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

    9*031600@ekiga.net

    This is to perform an echo test
    http://wiki.ekiga.org/index.php/Fun_Numbers

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

    ==========
    CLI>

  • Le 17/12/2010 12:48, Gilles a écrit :
    href=”mailto:9user@domain.com”>9user@domain.com from XLite
    […]

    Domain part disappear.

    exten=>_9*.,1,Dial(SIP/${EXTEN:1}@ekiga.net)

    In Xlite call 9*031600

    You should read info on voip.org to learn basis of Asterisk.

  • href=”mailto:9user@domain.com”>9user@domain.com 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
    SIP/*031600@

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

    http://www.freenum.org

    We discuss it in this chapter here:
    http://ofps.oreilly.com/titles/9780596517342/ch12.html

    Leif.

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

    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
    wrote:

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

    ===============
    [macro-dialsipuri]
    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()

    [internal]

    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
    frequent.

    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
    wrote:

    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”
    wrote:

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

    http://www.voip-info.org/wiki/view/Asterisk+SIP+not-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,
    etc.)
    http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Dstripbooks&field-keywords=voip

    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
    tools.