OUTBOUND CALLER ID

Home » Asterisk Users » OUTBOUND CALLER ID
Asterisk Users 10 Comments

On Monday 09 May 2011, mahesh katta wrote:
> Hi,
> THIS IS IN DUBAI.
>
> I am having PRI line with 100 DID’s (00-99) and when we call to any
> landline or mobile number then it shows us our board number or pilot number
> (i.e 4663000 means 00)..

In the context through which outgoing calls are placed, you need a step which
sets the caller ID number. For instance, part of our dialplan maps external
phone numbers with the local part 707060 to 707072 to internal extensions 301
to 312 respectively. Our E1 provider also requires us to include the STD
code, minus the leading zero, for the town we are in — and will silently
anonymise the call if we try to send a caller ID that does not belong to us.

So for outgoing calls, we have something like

[ts-outgoing]
exten => _0., 1, Set(localno=7070$[${CALLERID(num)}-240])
exten => _0., 2, Set(CALLERID(num)=${STD}${localno})

10 thoughts on - OUTBOUND CALLER ID

  • sir,

    Below configuration i wase made in server . but this is not working.

    exten => _90XXXXXXXXX,1,NoOp(${CALLERID(num)})
    exten => _90XXXXXXXXX/5001,2,Set(CALLERID(name)=44578999)
    exten => _90XXXXXXXXX,3,AGI(agi://127.0.0.1:4577/call_log)
    exten => _90XXXXXXXXX/5001,4,Set(CALLERID(num)=44578999)
    exten =>
    _90XXXXXXXXX,5,MixMonitor(/var/spool/asterisk/astrec/${TIMESTAMP}-${CALLERIDNUM}-${EXTEN}-${UNIQUEID}.gsm|av(0)V(0))
    exten => _90XXXXXXXXX,6,Dial(${TRUNK}/${EXTEN:1},,tTo)
    exten => _90XXXXXXXXX,7,Hangup

  • Hi Mahesh,

    I have solutions but its paid, i can provide setting if you are interested
    on counsultancy

    Cheers
    Dhaval

  • Hi Daval,

    how much you require for this .

    On Tue, May 10, 2011 at 12:00 PM, DHAVAL INDRODIYA

  • Why do I get the feeling that this guy wants someone to write it for him
    for free?

    Especially seeing has how he has never posted what anyone who has tried
    to help, have requested.

    Maybe Mr. Katta needs to google for ‘dcap’?

    ________________________________

    [mailto:asterisk-users-bounces@lists.digium.com] On Behalf Of mahesh
    katta
    Sent: 10 May 2011 11:49

    Sir,
    A.J.Stiles

    This dialplan is not working . when I called to out of box .

    On Tue, May 10, 2011 at 2:00 PM, A J Stiles
    wrote:

    working.
    _90XXXXXXXXX,5,MixMonitor(/var/spool/asterisk/astrec/${TIMESTAMP}-${CALL
    ERI

    OK. Here’s what I see going on.

    When you dial 90XXXXXXXXX:
    Stage 1: The NoOp() will just write the CALLERID(num) to the
    console. (This
    initially will be the originating extension number.)
    Stage 2: If the originating extension is 5001, the
    CALLERID(name) will be set
    to 44578999.
    Stage 3: Calls an AGI script, presumably to log the call
    outside of the CDR
    database.
    Stage 4: If the originating extension is 5001, the
    CALLERID(num) will be set
    to 44578999.
    Stage 5: Starts a recording.
    Stage 6: Passes the dialled number, skipping 1 digit from the
    beginning
    (i.e. the initial 9 for the outside line), to a Dial() command.
    Stage 7: Hangs up.

    I’m not at all convinced that this is right, especially as you
    are mixing
    destination extensions with and without originating extensions.
    And, the way
    this bit is written, it will only ever set the outgoing caller
    ID for
    extension 5001.

    I think it needs to be more like this. Here, I’m taking an
    educated guess
    that you want your caller ID to appear on outgoing calls as
    445789 followed
    by the last 2 digits of the extension number. If this is not
    right, you will
    have to change it — or explain exactly how to derive the caller
    ID you want
    to appear on external phones, from the originating internal
    extension, like I
    originally asked.

    exten => _90XXXXXXXXX,1,NoOp(${CALLERID(num)})

    exten =>
    _90XXXXXXXXX,2,Set(outgoing_ident=445789${CALLERID(num):-2})
    exten => _90XXXXXXXXX,3,NoOp(${outgoing_ident})
    exten => _90XXXXXXXXX,4,Set(CALLERID(name)=${outgoing_ident})
    exten => _90XXXXXXXXX,5,AGI(agi://127.0.0.1:4577/call_log)
    exten => _90XXXXXXXXX,6,Set(CALLERID(num)=${outgoing_ident})
    exten =>

    _90XXXXXXXXX,7,MixMonitor(/var/spool/asterisk/astrec/${TIMESTAMP}-${CALL
    ERIDNUM}-${EXTEN}-${UNIQUEID}.gsm|
    av(0)V(0))
    exten =>_90XXXXXXXXX,8,Dial(${TRUNK}/${EXTEN:1},,tTo)
    exten => _90XXXXXXXXX,9,Hangup

    What this will do:

    Stage 1: The NoOp() will just write the CALLERID(num) to the
    console. (This
    initially will be the originating extension number.)
    Stage 2: Creates a variable “outgoing_ident”. This consists of
    the string
    445789 followed by the last 2 digits of the originating
    extension number.
    Stage 3: The NoOp() will write the value of ${outgoing_ident}
    to the console.
    Stage 4: Sets CALLERID(name) to the value we just put into
    ${outgoing_ident}.
    Stage 5: Calls logging AGI script.
    Stage 6: Sets CALLERID(num) to the value we just put into
    ${outgoing_ident}.
    This is most likely to be noticed.
    Stage 7: Starts recording.
    Stage 8: Passes the dialled number, skipping 1 digit from the
    beginning, to a
    Dial() command.
    Stage 9: Hangs up.

    Modify stage 2 if necessary to suit exactly how you want your
    outgoing ident
    to appear. You can take out the NoOp() statements and renumber
    appropriately
    once it’s working as you want it.

    Note that if the console seems to show you created the right
    ident but it
    doesn’t appear on phones when you dial out, then either the
    format is wrong
    or your telco doesn’t think you are authorised to use that
    ident; this is a
    matter you will need to take up with your phone company.

  • may be i think country code is not require because they are doing in local
    and pri no. is landline no..

    Your CARRIER must allow you to set outvbound Caller*ID. Have you verified
    and isdn pri , national is type of switch.

  • What don’t you get about this mailing list being non-commercial?

    Any reply to offer consulting should be directed to the person having the
    problem and not broadcast to the list. If you cannot follow the rules of
    the mailing list, then I have very little trust in you.

    Thanks,
    Steve Totaro

    On Tue, May 10, 2011 at 2:30 AM, DHAVAL INDRODIYA
    wrote:

  • Steve .T sir, All

    It is working sir . Thank you very much sir .
    Thankyou for all support to me .

    sorry for the my language bcz i have my communication problem.

    On Wed, May 11, 2011 at 11:30 AM, Steve Totaro <
    stotaro@totarotechnologies.com> wrote:

  • Glad you got it all sorted — I was going to suggest a few more things you
    could try this morning, but got beaten to it.

    Just one thing, though: You might want to take the NoOp() statements out of
    your dialplan, now you’ve got it working. It makes little sense to clutter
    up your console and log files with unnecessary diagnostic messages.