Soren Rathje
2004-Feb-21 18:44 UTC
[Asterisk-Users] SIP extension "busy" when not available ??
How come * says 1010 is BUSY in the trace below? I would have guessed "UNAVAILABLE" since 1010 is not logged on/registered. ***** [root@asterisk asterisk]# asterisk -vvvvvvvvfcg ... Asterisk CVS-02/21/04-15:10:20, Copyright (C) 1999-2001 Linux Support Services, Inc. ... ... -- Executing Macro("SIP/1000-2806", "stdexten|1010|SIP/1010") in new stack -- Executing Dial("SIP/1000-2806", "SIP/1010|20|tr") in new stack Feb 22 02:21:19 NOTICE[278545]: app_dial.c:527 dial_exec: Unable to create channel of type 'SIP' == Everyone is busy at this time -- Executing VoiceMail("SIP/1000-2806", "b1010") in new stack ... ... sip show peers Name/username Host Mask Port Status 2000 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 1020 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 1010 (Unspecified) (D) 255.255.255.255 0 UNKNOWN 1000/1000 192.168.0.65 (D) 255.255.255.255 5061 OK (9 ms) [macro-stdexten]; exten => s,1,Dial(${ARG2},20,tr) ; Ring the interface, 20 seconds maximum exten => s,2,Voicemail(u${ARG1}) ; If unavailable, send to voicemail w/ unavail announce exten => s,3,Goto(default,s,1) ; If they press #, return to start exten => s,102,Voicemail(b${ARG1}) ; If busy, send to voicemail w/ busy announce exten => s,103,Goto(default,s,1) ; If they press #, return to start ***** /Soren -- "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle
Rich Adamson
2004-Feb-22 05:35 UTC
[Asterisk-Users] SIP extension "busy" when not available ??
> How come * says 1010 is BUSY in the trace below? I would have guessed > "UNAVAILABLE" since 1010 is not logged on/registered.That's what has been programmed in the asterisk code and has been that way since the beginning of time. I don't like it either, but I'm not a programmer and can't change it. The logical response really should be Unavailable, but apparently there must be a reason why no one has changed this. It would appear part of the reason behind this is that asterisk stores the last known status of each sip phone's Register in a database entry (which is what gets displayed in the "sip show registry" command), and should the logical connection to that SIP phone be lost 10 seconds after the register, asterisk would not know that. Although the current logic does not require a sip phone to register, it would seem like the asterisk logic should be something like: a. call is attempted to sip x1234, b. if * knows the extn is in use, return busy, or, c. if not busy, asterisk attempts to contact x1234 across the wire, d. if no contact, return Unavailable The sip phone could be busy since it could actually have another call in progress with some other sip proxy other then asterisk, so I'm sure there is far more logic required then what meets this non-programmers eye. Rich
info-lists@robertc.de
2004-Feb-23 04:47 UTC
[Asterisk-Users] SIP extension "busy" when not available ??
Soren Rathje said:> ----- Original Message ----- > From: "Olle E. Johansson" <oej@edvina.net> > To: <asterisk-users@lists.digium.com> > Sent: Sunday, February 22, 2004 8:52 PM > Subject: Re: [Asterisk-Users] SIP extension "busy" when not available ?? > > >> > Although the current logic does not require a sip phone to register, >> it > would >> > seem like the asterisk logic should be something like: >> > a. call is attempted to sip x1234, >> > b. if * knows the extn is in use, return busy, or, >> > c. if not busy, asterisk attempts to contact x1234 across the wire, >> > d. if no contact, return Unavailable >> Or if not registred. >> > > In a wireline telephony scenario the above would be the proper method as > we > do not know if the subscriber have their phone plugged in or not. With > Asterisk we experience the same information as mobile operators do: > "unreachable", "unanswered" and "busy". IMHO we should have the same > options. > > So, the priority for a type=friend would be: > a: check if client is registered and/or reachable, if not - return > "unreachable" > b: check if client is busy, if call-waiting not active - return "busy" > c: if call is rejected by client, return approriate message > d: if call is unanswered, return "unavailable" or "busy" with reference to > (b). > > -- SorenI use ChanIsAvail() to check to see if the phone is connected at the top of the dialplan for that extension. This works for IAX2 and SIP channels but not for MGCP. If you are interested in the actual code I can send it to you from home tonight. Robert