[asterisk-users] DID for outbound PSTN call

A J Stiles asterisk_list at earthshod.co.uk
Fri May 27 10:59:32 CDT 2011


On Friday 27 May 2011, satish patel wrote:
> Hi There,
>
> We have single PRI with multiple DID numbers and its working fine in
> receiving call. And if you make outbound call it will send main-line
> CallerID (company name). Now we want individual caller id for per
> extensions on outbound calls. like if i call someone he will get my
> extension as callerid  ( 617-838-XXXX) XXXX is my sip extension something
> like this so next time i direct get call from users. How to do this ?

Hey, I already explained this to someone else today  :)

In your dialplan, you need something like this in the context through which 
your outgoing calls go:  (assuming TRUNK is already set)

exten => _XXXXXXXXXX,1,set(ident=617838${CALLERID(num)})
exten => _XXXXXXXXXX,2,Set(CALLERPRES()=allowed)
exten => _XXXXXXXXXX,3,set(CALLERID(num)=${ident})
exten => _XXXXXXXXXX,4,Dial(${TRUNK}/${EXTEN})
exten => _XXXXXXXXXX,5,Hangup()


If you want certain phones to give special idents  (in our company setup, we 
have one person who could be at either of two desks; either of them ident as 
the same external number on outgoing calls, which then rings both phones on 
incoming calls.  The DDI number that nothing actually idents as, is used 
instead for a voice menu)  then just give them their own context.  Asterisk's 
matching rules are evaluated in order most specific (hardest to match) to 
least specific (easiest to match); so in the incoming context, something like

exten => 6178382001,1,...

will always be tried *before* something like

exten => _617838XXXX,1,...

-- 
AJS

Answers come *after* questions.



More information about the asterisk-users mailing list