sanchal.singh at alliance-infotech.com
2007-Aug-09 05:37 UTC
[asterisk-users] how to push callerid for each user from sip phone on one side through asterisk (Digium) to E1 card running application on other side
Hi, I am running asterisk PBX ( digium TE120P card configured) on one system. It is connected to E1 card running application on the other system. After establishing sync between two card, I am able to place call from sip phone to E1 card running application. I want to pass the callerid, when calling from sip phone to E1 card running application. Which all configuration files is to be changed in the asterisk. I am doing the following changes in extensions.conf exten=>115,1,SET(set(CALLERID(num)=11112) exten=>115,2,Dial(ZAP/g1/115,20) So, when dialling from sip phone to extension 115 it pushes the callerid hardcoded for that extension to E1 card running application, not for each user in sip.conf. Can anybody tell me how to insert the callerid to each users? Which all are the configuration files, where changes are to be made? So that, when I call from sip phone through asterisk PBX to E1 card running application, callerid for each user from sip phone called should be forwarded to E1 card running application side. thanks and regards sanchal
Robert Lister
2007-Aug-09 17:01 UTC
[asterisk-users] how to push callerid for each user from sip phone on one side through asterisk (Digium) to E1 card running application on other side
On Thu, Aug 09, 2007 at 11:07:50AM +0530, sanchal.singh at alliance-infotech.com wrote:> Hi, > I am running asterisk PBX ( digium TE120P card configured) on one > system. It is connected to E1 card running application on the other system. > After establishing sync between two card, I am able to place call from sip > phone to E1 card running application. I want to pass the callerid, when > calling from sip phone to E1 card running application. Which all > configuration files is to be changed in the asterisk. > I am doing the following changes in extensions.conf > exten=>115,1,SET(set(CALLERID(num)=11112) > exten=>115,2,Dial(ZAP/g1/115,20) > > So, when dialling from sip phone to extension 115 > it pushes the callerid hardcoded for that extension to E1 card running > application, not for each user in sip.conf. > >> Can anybody tell me how to insert the callerid to each users? Which all > are the configuration files, where changes are to be made? So that, when I > call from sip phone through asterisk PBX to E1 card running application, > callerid for each user from sip phone called should be forwarded to E1 > card running application side. thanks and regards sanchalThere are two ways, depending on your setup. Easiest method if you have a straightforward SIP config, set, for each extension in sip.conf, for example: [1234] callerid="Fred User" <11112> ... Then this callerID string should be used. (This sounds like what you have at the moment) If you need to change it to something different depending on the trunk being used etc there are a variety of ways to do it, depending on how many users etc. You could use an asteris db lookup instead before you place the call in extensions.conf to overwrite what is set in sip.conf, to translate SIP extn caller id to something else (in the right place in extensions.conf): exten => 115,1,Set(CALLERID(number)=${DB(${CALLERID(num)}/callerid)}} exten => 115,2,Dial(ZAP/g1/115,20) Then write a db entry for each client from the CLI: asterisk -r asterisk*CLI> database put 1234 callerid 11112 Updated database successfully asterisk*CLI> database show 1234 /1234/callerid : 11112 In this example a call with the callerid of "1234" would get changed to "11112" for that call. This would be a good approach if there was no apparent relationship between 1234 and 11112. There are ways to modify the callerID on the way out based on the extension, say for example you have a callerID of 43703 and you just want to translate that to "703" on the way out, you could extract the digits and replace. In this example if the callerid is in the range I want, translate the callerID to something else (in fact we just take the last three digits) exten => 115,n,ExecIf($[$["${CALLERID(num)}" >= "43000"] & $["${CALLERID(num)}" <= "43999"]],Set,CALLERID(number)=${CALLERID(num):-3}) Hope one of these answers gives you some inspiration... Rob