[asterisk-users] AGI and some informations
Anton Frolov
afng072 at frols.com
Tue Nov 28 10:49:52 MST 2006
why don't you want to manage everything in Ruby?
I would call the script with just the number called
exten => 302,s,agi,script,${EXTEN}
and then make all of the decisions based on the phone number inside of Ruby.
When registering a softphone, you could store its IP in a database. Then
your script will take this IP from the database and use it.
When registering the softphone:
SoftPhonesDB.insert("olivier", $ip);
In extensions.conf:
exten => 302,s,agi,script.rb,${EXTEN}
In script.rb:
$ip = SoftPhonesDB.select("olivier");
Dial(SIP/$ip, $arg);
AF.
Olivier Saulnier wrote:
> Hello,
>
> i would like to use AGI and Ruby for communicate with a softphone. I
> would like send the IP adress of the softphone, directly for the
> extensions.conf file, as:
> exten => 302,1,agi,/ruby/ipphone.rb|ip_adress
>
> I know, with extensions.conf file, that i work on the softphone 302.
> But, how can i read the ip adress (the softphone give me when it
> registered, but after???
>
> best regards,
>
More information about the asterisk-users
mailing list