The s extention


#1

In the oreily book “Asterisk the future of telecommunication”, I read that the s extention match every dialed number, but this dont work whith my SIP channel. Does this extention work only with the FXO channels?
here is my ‘extension.conf’ file:

exten => s,1,Answer( )
exten => s,2,Playback(/var/lib/asterisk/sounds/hello-world)
exten => s,3,Hangup( )

it works very well when I replace the ‘s’ with a number and I dial this number.
Please help.


#2

Yeah this part I also dont understand. This has something to do with callerdID 's I think.


#3

I dont think so because my sip phone displays me ‘not found’, that means the dialed number, it is the same message when the ‘s’ extention doesn’t exist and I dial an inexisting number. Moreover if I keep the ‘s’ and dial the ‘s’ from my soft phone it works well.
If you have suceeded to use this ‘s’ extention with SIP channel, I would be very eager if you send me the ‘sip.conf’ and ‘extention.conf at amine.kechaou@int-evry.fr


#4

what’s the context setting for the SIP UA you’re using ? the code you’ve posted means little without seeing the context you’re using it in.

post more details and you’ll get an explanation that means something to your example. you’ll need proper extracts (with [context] headers) from sip.conf and extensions.conf.


#5

My conf files are the simplest possible:

;sip.conf
[general]
context=default	;  Default context for incoming calls
port=5060;  UDP Port to bind to (SIP standard port is 5060)
bindaddr=0.0.0.0;  IP address to bind to (0.0.0.0 binds to all)
srvlookup=yes	; Enable DNS SRV lookups on outbound calls

[elkchaou]
type=friend
secret=a
qualify=yes ; Qualify peer is no more than 2000 ms away
nat=no ; This phone is not natted
host=dynamic ; This device registers with us
canreinvite=no ; Asterisk by default tries to redirect
context=incoming ; the internal context controls what we can do
;extention.conf
[incoming]
exten => s,1,Answer( )
exten => s,2,Playback(/var/lib/asterisk/sounds/hello-world)
exten => s,3,Hangup( )

In the documentation I read, the fact that the ‘s’ extention intercept every entering action in the context is mentionned for the FXS and FXO channels.
More precisely my questions are:
Is there an extention that match every dialed number for the SIP channels?
If yes is it the ‘s’ extetion or what?
Is there someone who succeeded in doing this task: intercepting any dialed number from a sip channel?
Thanks.


#6

the easiest way to do what you want to do is add

exten => _.,1,Goto(s,1) to your [incoming] context.