[asterisk-users] OUTBOUND CALLER ID

A J Stiles asterisk_list at earthshod.co.uk
Tue May 10 07:45:56 CDT 2011


(Reformatted *again*.  The proper place to post your reply is *below* the 
message or section to which you are replying, so it reads like:  question, 
answer, question, answer.  This makes things much easier for anyone with a 
similar problem in future, trying to make sense of old messages in the 
archives.)

On Tuesday 10 May 2011, mahesh katta wrote:
> On Tue, May 10, 2011 at 4:49 PM, A J Stiles
>
> <asterisk_list at earthshod.co.uk>wrote:
> > "Not working" can mean a lot of things.
> >
> > So, let's start at the beginning.  Have you ever actually managed to get
> > an outgoing call to work *at all* -- i.e., successfully placed a call
> > onto a trunk, made an external phone ring and been able to speak to the
> > other party,
> > even if the caller ID that shew up was incorrect ?
> >
> > Assuming so, please show the dialplan section that worked for that.
> >
> >
> > Otherwise, you need to go back to first principles and work out exactly
> > what
> > you are doing wrong.  We need to start from a point where you are able to
> > place external calls *before* we can discuss how to set the desired
> > caller ID
> > to appear on the receiving end.
> >
> > Obligatory car analogy:  There's no point arguing over whether motorways
> > are
> > quicker than A-roads, if you can't even get the engine to start.
> >
> >
> > Next, please describe how to determine, based on the internal extension,
> > what
> > caller ID number should be presented to the outside world.
> >
> A.j Sir,
>
> I am using vicidial server asterisk box. it has asterisk 1.27v ,
>
> In sip configuration is extensiosn like below
>
> [5001]
> username=5001
> secret=1234
> mailbox=5001
> type=friend^M
> host=dynamic^M
> canreinvite=no^M
> qualify=yes^M
> nat=yes^M
> context=default
>
> 5001 to 5099
>
> and PRI pilot no. is 4457900 in dubai , telcom give a DID's 4457900 to
> 4457999,
>
> when i am dialing from pstn on DID's(inbound) that will connecting (i was
> configured with sip means when i dial the 4457901 from outside i will get a
> call on 5001 extension)

O.K.  So what are you seeing in the console when you place an outgoing call?  
There should be two NoOp() lines per call; one with the original extension 
number, and another with what we are trying to set the caller ID to.

If it helps, change the lines for steps 1 and 3 as follows:

exten => _90XXXXXXXXX,1,NoOp(Int exten:${CALLERID(num)})
exten => _90XXXXXXXXX,3,NoOp(Ext ident:${outgoing_ident})

so it is more obvious what they are supposed to represent.  Run 
asterisk -vvvvvvvvvr in a console, reload the dialplan, capture some output 
as you make calls from various extensions, and paste it here.  The important 
question is:  Do the "Ext ident" numbers look like what they are supposed to?  
And if not, then how do they differ from what they are supposed to look like?



> here Problem when i dial (out bound) out of box from 5001 extensions the
> caller id showing pilot no. (4457900) .
> I need to display that DID's each extension.

The usual cause of the caller ID not being set to what you want, is that you 
tried to set it to some number that is not allocated to you, and your telco 
changed it to some default.  (Otherwise, you could fake your outgoing caller 
ID, which nobody wants.)


> exten => _90XXXXXXXXX,1,NoOp(${CALLERID(num)})
> exten => _90XXXXXXXXX,2,Set(outgoing_ident=0445789${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}-${CALLERI
>DNUM}-${EXTEN}-${UNIQUEID}.gsm|av(0)V(0)) exten =>
> _90XXXXXXXXX,8,Dial(${TRUNK}/${EXTEN:1},,tTo)
> exten => _90XXXXXXXXX,9,Hangup

Right, I'm confused now.  This dialplan segment is expecting for you to dial 
90, followed by nine digits.  But the numbers as which you want to 
identify -- 4457901 to 4457999 -- are only seven digits long.

I'm guessing there probably is an STD code consisting of 0 followed by two 
digits to indicate the town, and then a 7-digit local number within the town.  
In which case, I seem to have made a mistake at step 2, somehow letting an 
extraneous figure 8 get in.  Try:

exten => _90XXXXXXXXX,2,Set(outgoing_ident=44579${CALLERID(num):-2})

If that does not seem to work, try prefixing the "44579" with the STD code for 
your town, with and without the leading zero.  And don't forget to reload the 
dialplan between edits  :)


-- 
AJS

Answers come *after* questions.



More information about the asterisk-users mailing list