[Asterisk-Users] Setting Caller ID after Dial

Mark Johnson asterisk at astroshapes.com
Wed Jun 29 10:29:01 MST 2005


Chee Foong Chiew wrote:

>Hello,
>
>I have the following situation:
>
>I have a PRI with 200 DID numbers and I have set up
>200 sip extensions that matches the last 4 digit of
>the corresponding DID numbers so that when any of the
>200 DID number is called, asterisk can pass the call
>to the respective sip extension. Incomming has been
>fine.
>
>But when making out going calls I want the called
>party to always see the same number (which is one of
>the number selected from the 200 DID numbers). This I
>can be achieved in asterisk by calling SetCallerID
>before Dial command. 
>However in the CDR, the caller id number of the number
>that i set using SetCallerID is always logged and
>there is no trace of which sip extension is making the
>call since the caller is always the same. This has
>become a serious trouble for billing.
>
>I have been searching around and could not seems to
>get a solution. I have tried DIAL_STATUS variable
>(only work if call is not answered), using 'g' option
>in Dial command (does not work if calling party hangup
>first), etc.
>
>Is there a solution or work around for this?
>
>Thanks in advance
>
>CCF
>
>  
>
I forgot in my last post to mention that I use Postgres for my CDR, and 
the SIP extension can be pulled from the channel column.  That way, the 
callerid is still the way it appeared when the calls were placed.  I 
just strip everything from the '-' to the right and it's worked great 
for me!

Mark



More information about the asterisk-users mailing list