Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] {s} - extension


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
danikpro at gmail.com
Guest





PostPosted: Wed Mar 05, 2008 5:12 am    Post subject: [asterisk-users] {s} - extension Reply with quote

Dear all, I have small question

in sip.conf I added

[service]
type=friend
;username=
;secret=
qualify=900
host=X.X.X.X
dtmfmode = rfc2833
disallow=all
;allow=g729
allow=gsm
allow=alaw
allow=ulaw

and I can proccess incoming call from soft phone only I calling on
number that is used in extensions.conf(in example below it is 1)

exten => 1,1,Answer;
exten => 1,2,Playback(hello-world,skip);
exten => 1,3,Hangup;

but when I use next construction(As I understand it is used to allow
to process any extension dialed by user)

exten => s,1,Answer;
exten => s,2,Playback(hello-world,skip);
exten => s,3,Hangup;

Asterisk says call rejected due to no extension.

What is wrong? any body can make spot lighter.

Thank in advance.
Back to top
gandresin at gmail.com
Guest





PostPosted: Wed Mar 05, 2008 6:35 am    Post subject: [asterisk-users] {s} - extension Reply with quote

On Wed, Mar 5, 2008 at 10:12 AM, Daniel Suleyman <danikpro at gmail.com> wrote:

Quote:
but when I use next construction(As I understand it is used to allow
to process any extension dialed by user)

exten => s,1,Answer;
exten => s,2,Playback(hello-world,skip);
exten => s,3,Hangup;

AFAIK, "s" extension is used in analogue PSTN incoming calls, as the
call itself doesn't contain the extension (public telephone number) it
tries to reach.

If want to catch "any" extension dialed by the user you should use
something like this:

exten => _.,1,Answer;
exten => _.,2,Playback(hello-world,skip);
exten => _.,3,Hangup;

In any case, I cannot understand why you would like to use it.
You should define your extensions and use the invalid extension (i) to
catch calls sent to any number not detailed in the dialplan.

--
Andres Jimenez

GPG : http://www.andresin.com/gpg/gandresin at gmail.com.asc
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Wed Mar 05, 2008 6:47 am    Post subject: [asterisk-users] {s} - extension Reply with quote

On Wed, Mar 05, 2008 at 02:12:47PM +0400, Daniel Suleyman wrote:
Quote:
Dear all, I have small question

in sip.conf I added

[service]
type=friend
;username=
;secret=
qualify=900
host=X.X.X.X
dtmfmode = rfc2833
disallow=all
;allow=g729
allow=gsm
allow=alaw
allow=ulaw

and I can proccess incoming call from soft phone only I calling on
number that is used in extensions.conf(in example below it is 1)

exten => 1,1,Answer;
exten => 1,2,Playback(hello-world,skip);
exten => 1,3,Hangup;

but when I use next construction(As I understand it is used to allow
to process any extension dialed by user)

exten => s,1,Answer;
exten => s,2,Playback(hello-world,skip);
exten => s,3,Hangup;

Asterisk says call rejected due to no extension.

Chances are you got the wrong context.

Have you set a context in sip.conf? Or do you use the defualt one?

What is the output of:

dialplan show default

--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
danikpro at gmail.com
Guest





PostPosted: Wed Mar 05, 2008 7:04 am    Post subject: [asterisk-users] {s} - extension Reply with quote

The idea is that the person connecting and dial anything he want and
the script is deciding to proceed the call or to terminate it(I think
it will be easy to manage extensions.conf - no need to create
extensions).

You know {i} doesent work

exten => 1,1,Answer;
exten => 1,2,Playback(hello-world,skip);
exten => 1,3,Hangup;

exten => i,1,Answer;
exten => i,2,Playback(welcome,skip);
exten => i,3,Hangup;

as I thought when i will dial wrong number it will play welcome message but
asterisk promt -> Call from 7007 to extension 700786 rejected because
extension not found.

to Tzafrir Cohen

in curent config i didnt set context in sip(unsing default) but it
doesent matter if I set up context the same thing s and i doesn't work

now dial plan show next

Context 'default' created by 'pbx_config' ]
'7007' => 1. Answer()
[pbx_config]
2. Playback(hello-world|skip)
[pbx_config]
3. Hangup()
[pbx_config]
'i' => 1. Answer()
[pbx_config]
2. Playback(welcome|skip)
[pbx_config]
3. Hangup()
[pbx_config]

-= 2 extensions (6 priorities) in 1 context. =-

2008/3/5, Andres Jimenez <gandresin at gmail.com>:
Quote:
On Wed, Mar 5, 2008 at 10:12 AM, Daniel Suleyman <danikpro at gmail.com> wrote:

Quote:
but when I use next construction(As I understand it is used to allow
to process any extension dialed by user)

exten => s,1,Answer;
exten => s,2,Playback(hello-world,skip);
exten => s,3,Hangup;

AFAIK, "s" extension is used in analogue PSTN incoming calls, as the
call itself doesn't contain the extension (public telephone number) it
tries to reach.

If want to catch "any" extension dialed by the user you should use
something like this:

exten => _.,1,Answer;
exten => _.,2,Playback(hello-world,skip);
exten => _.,3,Hangup;

In any case, I cannot understand why you would like to use it.
You should define your extensions and use the invalid extension (i) to
catch calls sent to any number not detailed in the dialplan.

--
Andres Jimenez

GPG : http://www.andresin.com/gpg/gandresin at gmail.com.asc

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Wed Mar 05, 2008 7:39 am    Post subject: [asterisk-users] {s} - extension Reply with quote

On Wed, Mar 05, 2008 at 04:04:00PM +0400, Daniel Suleyman wrote:

Quote:
in curent config i didnt set context in sip(unsing default) but it
doesent matter if I set up context the same thing s and i doesn't work

now dial plan show next

Context 'default' created by 'pbx_config' ]
'7007' => 1. Answer()
[pbx_config]
2. Playback(hello-world|skip)
[pbx_config]
3. Hangup()
[pbx_config]
'i' => 1. Answer()
[pbx_config]
2. Playback(welcome|skip)
[pbx_config]
3. Hangup()
[pbx_config]

-= 2 extensions (6 priorities) in 1 context. =-

So indeed you have no extension 's' in the context 'default'

Can you post your extensions.conf ?

--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
gandresin at gmail.com
Guest





PostPosted: Wed Mar 05, 2008 7:41 am    Post subject: [asterisk-users] {s} - extension Reply with quote

On Wed, Mar 5, 2008 at 12:04 PM, Daniel Suleyman <danikpro at gmail.com> wrote:
Quote:
The idea is that the person connecting and dial anything he want and
the script is deciding to proceed the call or to terminate it(I think
it will be easy to manage extensions.conf - no need to create
extensions).

It is easy. I meant you have to configure "extensions" (what to do
when a number is dialed) and handle "unknown extensions" with the "i"
extensions.

Quote:
You know {i} doesent work
exten => i,1,Answer;
exten => i,2,Playback(welcome,skip);
exten => i,3,Hangup;

as I thought when i will dial wrong number it will play welcome message but
asterisk promt -> Call from 7007 to extension 700786 rejected because
extension not found.

Have you reloaded your extensions.conf file?
in asterisk CLI "extensions reload"
--
Andres Jimenez

GPG : http://www.andresin.com/gpg/gandresin at gmail.com.asc
Back to top
tzafrir.cohen at xorco...
Guest





PostPosted: Wed Mar 05, 2008 8:36 am    Post subject: [asterisk-users] {s} - extension Reply with quote

On Wed, Mar 05, 2008 at 12:41:23PM +0000, Andres Jimenez wrote:
Quote:
On Wed, Mar 5, 2008 at 12:04 PM, Daniel Suleyman <danikpro at gmail.com> wrote:
Quote:
The idea is that the person connecting and dial anything he want and
the script is deciding to proceed the call or to terminate it(I think
it will be easy to manage extensions.conf - no need to create
extensions).

It is easy. I meant you have to configure "extensions" (what to do
when a number is dialed) and handle "unknown extensions" with the "i"
extensions.

This is not needed. If the extension is not found, there is a
fallthrough to 's' (Right? Or is it chan_zap-specific)?

--
Tzafrir Cohen
icq#16849755 jabber:tzafrir.cohen at xorcom.com
+972-50-7952406 mailto:tzafrir.cohen at xorcom.com
http://www.xorcom.com iax:guest at local.xorcom.com/tzafrir
Back to top
gandresin at gmail.com
Guest





PostPosted: Wed Mar 05, 2008 9:00 am    Post subject: [asterisk-users] {s} - extension Reply with quote

On Wed, Mar 5, 2008 at 1:36 PM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:

Quote:
This is not needed. If the extension is not found, there is a
fallthrough to 's' (Right? Or is it chan_zap-specific)?

I would say it's chan_zap-specific.

From http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf

"For some kinds of connections ? such incoming calls from an outside
telephone line ? the user has not dialed an extension. In that case,
Asterisk behaves as if the user had dialed a special extension named
"s" (for Start). Asterisk will look for an extension "number" s in the
definition of the context for that channel for instructions about what
it should do to handle the call. "

The key factor is that "s" is used when NO EXTENSION has been
specified (when the call is not clearly directed to an specific
number). As far as I know, that's the way analog lines behave. The
line just receives the call, but no information says to which number
the call was sent.
--
Andres Jimenez

GPG : http://www.andresin.com/gpg/gandresin at gmail.com.asc
Back to top
danikpro at gmail.com
Guest





PostPosted: Thu Mar 06, 2008 5:14 am    Post subject: [asterisk-users] {s} - extension Reply with quote

Thank you all for answers. As I understand s - i and others is device specific.
I will not need them in my SIP configuration.

2008/3/5, Andres Jimenez <gandresin at gmail.com>:
Quote:
On Wed, Mar 5, 2008 at 1:36 PM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:

Quote:
This is not needed. If the extension is not found, there is a
fallthrough to 's' (Right? Or is it chan_zap-specific)?

I would say it's chan_zap-specific.

From http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf

"For some kinds of connections ? such incoming calls from an outside
telephone line ? the user has not dialed an extension. In that case,
Asterisk behaves as if the user had dialed a special extension named
"s" (for Start). Asterisk will look for an extension "number" s in the
definition of the context for that channel for instructions about what
it should do to handle the call. "

The key factor is that "s" is used when NO EXTENSION has been
specified (when the call is not clearly directed to an specific
number). As far as I know, that's the way analog lines behave. The
line just receives the call, but no information says to which number
the call was sent.


--
Andres Jimenez

GPG : http://www.andresin.com/gpg/gandresin at gmail.com.asc
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
noahisaacmiller at gma...
Guest





PostPosted: Thu Mar 06, 2008 9:49 am    Post subject: [asterisk-users] {s} - extension Reply with quote

Hi -

Quote:
Thank you all for answers. As I understand s - i and others is device specific.
I will not need them in my SIP configuration.

The "s" extension is not zap-specific. You can use it for any type of
device. It's just the generic extension that a call will go to when
no other matching extensions are present. As Tzafrir pointed out, you
had no "s" extension in the default context, and your sip device was
in the default context. Therefore, you were only able to dial
extensions that you had explicitly declared.

To access the "s" extension from your sip device, you'd either need to
add your sip device to the context where your "s" extension is, or
include that context in the default context.

NOTE: Andres' example using "_." will work, too (but you should make
sure you put in at the end of a context if you want to put other
extensions in that context as it will match all calls).
- Noah



Quote:


2008/3/5, Andres Jimenez <gandresin at gmail.com>:


Quote:
On Wed, Mar 5, 2008 at 1:36 PM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:

Quote:
This is not needed. If the extension is not found, there is a
fallthrough to 's' (Right? Or is it chan_zap-specific)?

I would say it's chan_zap-specific.

From http://www.voip-info.org/wiki/index.php?page=Asterisk+config+extensions.conf

"For some kinds of connections ? such incoming calls from an outside
telephone line ? the user has not dialed an extension. In that case,
Asterisk behaves as if the user had dialed a special extension named
"s" (for Start). Asterisk will look for an extension "number" s in the
definition of the context for that channel for instructions about what
it should do to handle the call. "

The key factor is that "s" is used when NO EXTENSION has been
specified (when the call is not clearly directed to an specific
number). As far as I know, that's the way analog lines behave. The
line just receives the call, but no information says to which number
the call was sent.


--
Andres Jimenez

GPG : http://www.andresin.com/gpg/gandresin at gmail.com.asc
_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users

_______________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
http://lists.digium.com/mailman/listinfo/asterisk-users
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services