Incoming callerid manipulation

Hi, Is this possible with asterisk? I wanted to manipulate all incoming calls callerid. When somebody called me from my sip account, I wanted the the ANI of the Incoming will be set to another number when it appears to the called party. What is the application being used here. Can I used Gotoif and SET CALLERID?

Please help me out here.

Thanks.

Best Regards,
newbie_aste

Hi,

yes, GotoIf and Set ${CALLERID} will work, have you tried it?

To set the caller id you can do:
exten => XXX,N,Set(CALLERID(num)=1234567890) - this is for outbound.
Is this what you wanted ?

Yah, partially that what I need. I need the same program in the dialplan, but this time is more sophisticated than that. When an incoming call is ongoing I needed that this ANI will be changed to desired DID.let say 151061xxxxx will call a extension 3456. Before it passes the call to 3456 it will assgined a new ANI. let say the first ANI will be 012345. The catch is here, when a call coming from 151062xxxxx and called party would be 3457 it will assigned another ani (012346) and if another incoming let let say 151063xxxxx it will be assgined another ani. Can I make a random selection on numbers that I’m going to assgined when incoming calls is ongoing? I have some dialplan here but i’m not sure If I’m this is going to work. Below are the simple dialplan of mine.

Please help me with. Thank you very much in advance.
extensions.conf
[londis]
exten=>12345,1,Gotoif($[${CALLERIDNUM} = 17771 ]?10:20)
exten=>12345,10,Goto(longdist1,${EXTEN},1)
exten=>12345,20,Goto(longdist2,${EXTEN},1)

exten=>12346,1,Gotoif($[${CALLERIDNUM} = 17772 ]?10:20)
exten=>12346,10,Goto(longdist1,${EXTEN},1)
exten=>12346,20,Goto(longdist2,${EXTEN},1)

[longdist1]
exten=>12345,1,SetCallerID(012345)
exten=>12345,2,Dial(SIP/12345|60|ro)
exten=>12345,3,Hangup
include=>aspen-out
include=>aspen-host

[longdist2]
exten=>12345,1,SetCallerID(012346)
exten=>12345,2,Dial(SIP/12345|60|ro)
exten=>12345,2,Hangup

Could you give me some examples ? I want to record the conversation into the file like this :
20070531-123059-Agent007

I try like this but not good:

exten => s,1, GotoIf($[${CALLERID(num)}=Agent/007]?6:9)
exten => s,2, GotoIf($[${CALLERID(num)}=Agent/008]?8:9)
exten => s,6,Set(MONITOR_FILENAME=/usr/local/src/${TIMESTAMP}-Agent007
exten => s,8,Set(MONITOR_FILENAME=/usr/local/src/${TIMESTAMP}-Agent008

How to link the CallerID with Agent ID ? Is it possible ?

Hi,

the subject of the topic is my problem, but the topic itself couldn’t help me :frowning:
My situation is that: I’ve got Asterisk 1.2.17 in my central office. And we have a remote office where VoIP router Quintum is used. I mean that there is a SIP-channel between my Asterisk and that Quintum. And persons in the remote office can phone the central office, using internal numbers. But Quintum doesn’t give Asterisk any callerid information. But we know that the call is coming from the SIP-channel. Here is the configuration of the channel

[quintum]
username=quintum
type=friend
secret=secret
qualify=yes
host=ip-address
dtmfmode=rfc2833
disallow=all
context=from-internal
callerid=Kupavna <4700> <4700>
allow=ulaw
allow=alaw
;trunk=no

Well, I want to set callerid for ANY call coming FROM that SIP-channel as callerid=Kupavna <4700> <4700> or something like that just to know that the caller is from the remote office. Configuring the callerid parameter in sip.conf as shown above - doesn’t help :frowning: :frowning: :frowning: Please, help…

hi is it possible to record calls coming from quintum box using asterisk…
my situation is i hav a quintum box 24 - ports and i can i assign a ANI per port how come can i record a call on quintum gateway in this format DATE,ANI
plssss liv comment ^^