I have a door phone that works on sip and is registered to the asterisk. when some one rings a bell a sip call is made to a specific extension (namely 901). As this is a door bell I would like the rining tone to be something like this https://www.pond5.com/sound-effect/102057824/fairy-bell-ringtone-02.html instead of the normal ringing tone as here http://www.telephonesuk.co.uk/sounds/ringing.wav
How can I achieve it?
Extensions cannot make calls. You mean different devices or caller IDs.
With SIP, ringing tones are also generated by devices. You will need to read the user guides for the device or devices that can be called when extension 901 is rung, and see if there is some custom SIP header that will select the ringing tone in the way you want.
If there is you put the doorbell into a special context, that uses the appropriate means for adding sip headers, dependant on which SIP driver you are using, or you make it conditional on a caller ID associated with the door bell, or even set a channel variable for all calls from the endpoint for the doorbell.
What I mean is if someone press the call button on the doorphone , the device dials 901 and currently he hears the ringing tone similar to this http://www.telephonesuk.co.uk/sounds/ringing.wav until someone picks the call. My goal is to change this to Fairy Bell Ringtone 02 ~ Sound Effect #102057824
I am using pjsip
Do you mean ringback tone? If so, you have to do that as music on hold, rather than ringback. Also, you will need to answer the call, at least use Progress(), so that media goes through. With SIP devices, ringback is normally generated by the phone device itself, so you have to convince it to accept external media before the call is fully answered.
If you really mean ringing tone, my original reply still holds.
Incidentally, if the push uses dedicated calling, there is no need to use numeric extensions. You could call the extension bellpush.