[asterisk-users] Strange behaviour with Dial cmd

2007-02-14 Thread Il Neofita

I have this simple context

I am register to an external provider and when I am not home I would like to
transfer the phone outside
The problem that the call goes in loop

I cannot understand why.

Can you figure out my error?

Thank you


sip.conf
register => user:[EMAIL PROTECTED]/400

[inside]
exten => _4X.,1,dial(SIP/ext_400_124/555123,5,tT)
exten => _4X.,2,hangup

-- Executing Dial("SIP/555123-081b8eb0",
"SIP/ext_400_124/555123|5|tT") in new stack
   -- Called ext_400_124/555123
   -- SIP/ext_400_124-081bf848 is ringing
   -- Nobody picked up in 5000 ms
   -- Executing Hangup("SIP/555123-081b8eb0", "") in new stack
 == Spawn extension (inside, 5123, 2) exited non-zero on
'SIP/555123-081b8eb0'
   -- Executing Dial("SIP/555123-081c79a8",
"SIP/ext_400_124/555123|5|tT") in new stack
   -- Called ext_400_124/555123
   -- SIP/ext_400_124-081ccee8 is ringing
 == Spawn extension (inside, 5123, 1) exited non-zero on
'SIP/555123-081c79a8'
___
--Bandwidth and Colocation provided by Easynews.com --

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


RE: [asterisk-users] Strange behaviour with Dial cmd

2007-02-14 Thread Yuan LIU

From: "Il Neofita" <[EMAIL PROTECTED]>
Date: Wed, 14 Feb 2007 19:30:51 -0500

I have this simple context

I am register to an external provider and when I am not home I would like 
to transfer the phone outside

The problem that the call goes in loop


I don't see any loop in records below?  What your dial plan does is what you 
told it to: ring for 5 sec, then hang up.  Because the calling party hasn't 
given up, your dial plan rings again.  Where's the error?


Yuan Liu


I cannot understand why.

Can you figure out my error?

Thank you

sip.conf
register => user:[EMAIL PROTECTED]/400

[inside]
exten => _4X.,1,dial(SIP/ext_400_124/555123,5,tT)
exten => _4X.,2,hangup

-- Executing Dial("SIP/555123-081b8eb0",
"SIP/ext_400_124/555123|5|tT") in new stack
   -- Called ext_400_124/555123
   -- SIP/ext_400_124-081bf848 is ringing
   -- Nobody picked up in 5000 ms
   -- Executing Hangup("SIP/555123-081b8eb0", "") in new stack
 == Spawn extension (inside, 5123, 2) exited non-zero on
'SIP/555123-081b8eb0'
   -- Executing Dial("SIP/555123-081c79a8",
"SIP/ext_400_124/555123|5|tT") in new stack
   -- Called ext_400_124/555123
   -- SIP/ext_400_124-081ccee8 is ringing
 == Spawn extension (inside, 5123, 1) exited non-zero on
'SIP/555123-081c79a8'



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-14 Thread Il Neofita

This is the situation
A call me at my provider 1
I am not home and I would like to transfer the call
I do not pickup the call for some reason
I would like to hangup the caller, however, my asterisk try again to call on
my mobile over and over

I would like to stop it.

Any idea?

Thank you a lot.

On 2/14/07, Yuan LIU <[EMAIL PROTECTED]> wrote:


>From: "Il Neofita" <[EMAIL PROTECTED]>
>Date: Wed, 14 Feb 2007 19:30:51 -0500
>
>I have this simple context
>
>I am register to an external provider and when I am not home I would like
>to transfer the phone outside
>The problem that the call goes in loop

I don't see any loop in records below?  What your dial plan does is what
you
told it to: ring for 5 sec, then hang up.  Because the calling party
hasn't
given up, your dial plan rings again.  Where's the error?

Yuan Liu

>I cannot understand why.
>
>Can you figure out my error?
>
>Thank you
>
>sip.conf
>register => user:[EMAIL PROTECTED]/400
>
>[inside]
>exten => _4X.,1,dial(SIP/ext_400_124/555123,5,tT)
>exten => _4X.,2,hangup
>
>-- Executing Dial("SIP/555123-081b8eb0",
>"SIP/ext_400_124/555123|5|tT") in new stack
>-- Called ext_400_124/555123
>-- SIP/ext_400_124-081bf848 is ringing
>-- Nobody picked up in 5000 ms
>-- Executing Hangup("SIP/555123-081b8eb0", "") in new stack
>  == Spawn extension (inside, 5123, 2) exited non-zero on
>'SIP/555123-081b8eb0'
>-- Executing Dial("SIP/555123-081c79a8",
>"SIP/ext_400_124/555123|5|tT") in new stack
>-- Called ext_400_124/555123
>-- SIP/ext_400_124-081ccee8 is ringing
>  == Spawn extension (inside, 5123, 1) exited non-zero on
>'SIP/555123-081c79a8'


___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-14 Thread Yuan LIU

From: "Il Neofita" <[EMAIL PROTECTED]>
Date: Wed, 14 Feb 2007 20:37:52 -0500

This is the situation
A call me at my provider 1
I am not home and I would like to transfer the call
I do not pickup the call for some reason
I would like to hangup the caller, however, my asterisk try again to call 
on my mobile over and over


I would like to stop it.


Well, you'll have to decide how you want to "hang up" the caller: Do you 
want him/her to be ignored, or to be told that you are not available (like 
an answering machine)?  You also need to tell  Asterisk how to determine if 
the next "invite" comes from the same caller during the same "session". 
(These are not very easy tasks but doable.)


In either case, you need to add a flag to your dial plan, set it after it 
rings your cell, and reset it once Asterisk determines that THIS caller has 
been "hung up". (Of course you can do what "Vacation" does in E-mail: set up 
a flag for each identifiable caller, and only call your mobile once until 
you reset them all.  The algorithm would be simpler but more unidentifiable 
callers will be ignored.)  Your dial plan will check this flag before 
ringing your cell, then branch accordingly.


Hope this helps.

Yuan Liu


Any idea?

Thank you a lot.

On 2/14/07, Yuan LIU <[EMAIL PROTECTED]> wrote:


>From: "Il Neofita" <[EMAIL PROTECTED]>
>Date: Wed, 14 Feb 2007 19:30:51 -0500
>
>I have this simple context
>
>I am register to an external provider and when I am not home I would 
like

>to transfer the phone outside
>The problem that the call goes in loop

I don't see any loop in records below?  What your dial plan does is what
you
told it to: ring for 5 sec, then hang up.  Because the calling party
hasn't
given up, your dial plan rings again.  Where's the error?

Yuan Liu

>I cannot understand why.
>
>Can you figure out my error?
>
>Thank you
>
>sip.conf
>register => user:[EMAIL PROTECTED]/400
>
>[inside]
>exten => _4X.,1,dial(SIP/ext_400_124/555123,5,tT)
>exten => _4X.,2,hangup
>
>-- Executing Dial("SIP/555123-081b8eb0",
>"SIP/ext_400_124/555123|5|tT") in new stack
>-- Called ext_400_124/555123
>-- SIP/ext_400_124-081bf848 is ringing
>-- Nobody picked up in 5000 ms
>-- Executing Hangup("SIP/555123-081b8eb0", "") in new stack
>  == Spawn extension (inside, 5123, 2) exited non-zero on
>'SIP/555123-081b8eb0'
>-- Executing Dial("SIP/555123-081c79a8",
>"SIP/ext_400_124/555123|5|tT") in new stack
>-- Called ext_400_124/555123
>-- SIP/ext_400_124-081ccee8 is ringing
>  == Spawn extension (inside, 5123, 1) exited non-zero on
>'SIP/555123-081c79a8'


___
--Bandwidth and Colocation provided by Easynews.com --

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





___
--Bandwidth and Colocation provided by Easynews.com --

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



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-15 Thread Il Neofita

On 2/14/07, Yuan LIU <[EMAIL PROTECTED]> wrote:



Well, you'll have to decide how you want to "hang up" the caller: Do you
want him/her to be ignored, or to be told that you are not available (like
an answering machine)?  You also need to tell  Asterisk how to determine
if
the next "invite" comes from the same caller during the same "session".
(These are not very easy tasks but doable.)

In either case, you need to add a flag to your dial plan, set it after it
rings your cell, and reset it once Asterisk determines that THIS caller
has
been "hung up". (Of course you can do what "Vacation" does in E-mail: set
up
a flag for each identifiable caller, and only call your mobile once until
you reset them all.  The algorithm would be simpler but more
unidentifiable
callers will be ignored.)  Your dial plan will check this flag before
ringing your cell, then branch accordingly.

Hope this helps.

Yuan Liu



Thank you for the answer.
Right know I solved sending after everything to the voicemail.
But I tought that hangup was suppose to close the call, however, is not the
case and a really did not catch why.

I will try to read a bit more.
___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-15 Thread Yuan LIU

From: "Il Neofita" <[EMAIL PROTECTED]>
Date: Thu, 15 Feb 2007 03:37:14 -0500

But I tought that hangup was suppose to close the call, however, is not the 
case and a really did not catch why.


Now I see where the confusion comes from.  Asterisk doesn't really speak 
English - or Chinese for that matter:-)  In telephony, there is no way for 
the callee to tell the caller to stop ringing - unless you "answer" it 
first.  Once you answer, you can do a number of things, the rudest being to 
immediately hang up. (I saw live people doing this intentionally.)  Your 
only other option really is to ignore.


I just thought up this simple method to ignore: divert the dial plan to 
simply Wait() an unreasonable amount of time in hope that the caller hangs 
up.


exten => s,1,Dial(yourcell,5)
exten => s,n,Wait(300)

That's assuming your provider provides disconnect supervision.  You can also 
Play(prerecorded,noanswer) if your provider supports it. (Won't hurt to try 
even if not - but disconnect supervision is a must.)


Yuan Liu


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-15 Thread Il Neofita

Ok thank you a lot!!!

On 2/15/07, Yuan LIU <[EMAIL PROTECTED]> wrote:


>From: "Il Neofita" <[EMAIL PROTECTED]>
>Date: Thu, 15 Feb 2007 03:37:14 -0500
>
>But I tought that hangup was suppose to close the call, however, is not
the
>case and a really did not catch why.

Now I see where the confusion comes from.  Asterisk doesn't really speak
English - or Chinese for that matter:-)  In telephony, there is no way for
the callee to tell the caller to stop ringing - unless you "answer" it
first.  Once you answer, you can do a number of things, the rudest being
to
immediately hang up. (I saw live people doing this intentionally.)  Your
only other option really is to ignore.

I just thought up this simple method to ignore: divert the dial plan to
simply Wait() an unreasonable amount of time in hope that the caller hangs
up.

exten => s,1,Dial(yourcell,5)
exten => s,n,Wait(300)

That's assuming your provider provides disconnect supervision.  You can
also
Play(prerecorded,noanswer) if your provider supports it. (Won't hurt to
try
even if not - but disconnect supervision is a must.)

Yuan Liu


___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-18 Thread Tim Panton


On 15 Feb 2007, at 09:55, Yuan LIU wrote:


From: "Il Neofita" <[EMAIL PROTECTED]>
Date: Thu, 15 Feb 2007 03:37:14 -0500

But I tought that hangup was suppose to close the call, however,  
is not the case and a really did not catch why.


Now I see where the confusion comes from.  Asterisk doesn't really  
speak English - or Chinese for that matter:-)  In telephony, there  
is no way for the callee to tell the caller to stop ringing -  
unless you "answer" it first.  Once you answer, you can do a number  
of things, the rudest being to immediately hang up. (I saw live  
people doing this intentionally.)  Your only other option really is  
to ignore.


That isn't exactly true - ISDN and IAX (SIP?) support the concept of  
rejecting a call without answering it.
The asterisk dial plan only supports this indirectly. If there is no  
extension that maps to the called number
in the relevant context then asterisk will reject the call without  
answering. I don't think this helps the OP's
situation, but for the sake of the archives I think its worth  
clarifying


Tim Panton

www.mexuar.net
www.westhawk.co.uk/



___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-18 Thread C F

Asterisk supports this directly by issuing the hangup command before
the answer command.  However, when using an analog interface like FXO
the line has no way of knowing you just hung up and will continue to
ring, which asterisk will see as a new call. in my experience even
when using a PRI if i dont give the pri cause the provider re
initiates the call.

On 2/18/07, Tim Panton <[EMAIL PROTECTED]> wrote:


On 15 Feb 2007, at 09:55, Yuan LIU wrote:

>> From: "Il Neofita" <[EMAIL PROTECTED]>
>> Date: Thu, 15 Feb 2007 03:37:14 -0500
>>
>> But I tought that hangup was suppose to close the call, however,
>> is not the case and a really did not catch why.
>
> Now I see where the confusion comes from.  Asterisk doesn't really
> speak English - or Chinese for that matter:-)  In telephony, there
> is no way for the callee to tell the caller to stop ringing -
> unless you "answer" it first.  Once you answer, you can do a number
> of things, the rudest being to immediately hang up. (I saw live
> people doing this intentionally.)  Your only other option really is
> to ignore.

That isn't exactly true - ISDN and IAX (SIP?) support the concept of
rejecting a call without answering it.
The asterisk dial plan only supports this indirectly. If there is no
extension that maps to the called number
in the relevant context then asterisk will reject the call without
answering. I don't think this helps the OP's
situation, but for the sake of the archives I think its worth
clarifying

Tim Panton

www.mexuar.net
www.westhawk.co.uk/



___
--Bandwidth and Colocation provided by Easynews.com --

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


___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-18 Thread Eric \"ManxPower\" Wieling

C F wrote:

Asterisk supports this directly by issuing the hangup command before
the answer command.  However, when using an analog interface like FXO
the line has no way of knowing you just hung up and will continue to
ring, which asterisk will see as a new call. in my experience even
when using a PRI if i dont give the pri cause the provider re
initiates the call.


This would only happen if you blindly run two Dial lines in sequence in 
your dialplan.  Don't do this.

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-18 Thread Il Neofita

Yes, but I would like to try a number and after to try a second one.
Any Idea how to avoid this.

On 2/18/07, Eric ManxPower Wieling <[EMAIL PROTECTED]> wrote:


C F wrote:
> Asterisk supports this directly by issuing the hangup command before
> the answer command.  However, when using an analog interface like FXO
> the line has no way of knowing you just hung up and will continue to
> ring, which asterisk will see as a new call. in my experience even
> when using a PRI if i dont give the pri cause the provider re
> initiates the call.

This would only happen if you blindly run two Dial lines in sequence in
your dialplan.  Don't do this.
___
--Bandwidth and Colocation provided by Easynews.com --

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

___
--Bandwidth and Colocation provided by Easynews.com --

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


Re: [asterisk-users] Strange behaviour with Dial cmd

2007-02-18 Thread Eric \"ManxPower\" Wieling
Check the value of DIALSTATUS then decide of you want to dial the 2nd 
number.  See [macro-std-exten] in extensions.conf for an example of 
checking the value of DIALSTATUS.


The only time you might want two Dial lines in a row is if you always, 
not matter what, want to dial the 2nd number.


Il Neofita wrote:

Yes, but I would like to try a number and after to try a second one.
Any Idea how to avoid this.

On 2/18/07, *Eric ManxPower Wieling* < [EMAIL PROTECTED] 
> wrote:


C F wrote:
 > Asterisk supports this directly by issuing the hangup command before
 > the answer command.  However, when using an analog interface like FXO
 > the line has no way of knowing you just hung up and will continue to
 > ring, which asterisk will see as a new call. in my experience even
 > when using a PRI if i dont give the pri cause the provider re
 > initiates the call.

This would only happen if you blindly run two Dial lines in sequence in
your dialplan.  Don't do this.


___
--Bandwidth and Colocation provided by Easynews.com --

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