Distinctive ring for each line on the phone

How do I make each phone line have it’s own ringtone.

I saw a post about dialparties.agi, but i am afraid that wasn’t a vanilla asterisk but trickbox implementation ?

if i recall with the Alert-Info header

If You are using FreePBX there is a field called Alert info too.

for further users stumbling on this post

for digium phones:

first define a ringtone and deploy it to the phone
(DPMA method is preferred of course) - or you can use existing ringtones

second - define alert and set it to use that ringtone
the name of the alert is that you want to know

then in the sip header add the alert info

here is my code for the popular CTU - aka Jack Bauer Ringtone

Convert the soudn fiel to raw format , 16bit, 16khz, mono
Publish the sound file on webserver (same server where your phone firmware resides)

res_digium_phone.conf

[general]
file_url_prefix=http://localhost/digium_phones_files/ ; put file here or in subdirectory

[ctu_ringtone]
type=ringtone
alias=CTU_Ringtone
filename=ringtones/ctu_ringtone.sln


[alert-ctu_ringtone]
type=alert
alert_info=ctu_info
ring_type=normal
ringtone=ctu_ringtone

extensions.conf

exten => [Your Extension],n,SIPAddHeader("Alert-Info: <ctu_info>")