UserName Variable


#1

Hi all,

I am using AGI in perl. I cannot get value of UserName from my IP Phone. i can get the Caller ID. But I made the plan for my Billing Sytem to calculate the max time using UserName not using CallerID. Becuase some devices are not able to send the CallerID and special H.323 devices.

So please advise me how i can get the username which i defined in sip.conf file using agi. i was trying with the following code but it is not returning anything.

$username = $AGI->get_variable(“UserName”);


#2

Hi all,

I got the solutions, may be it can help for someone

just i add in my extentions.conf

exten => _1X.,1,SetVar(UserName=${CALLERIDNUM})

and in AGI per i retrive the value usig get_variale

$username = $AGI->get_variable(“UserName”);