[Asterisk-Users] Re: 'I'nvalid extension handling problems, even with workaround

telmo at n1.com telmo at n1.com
Wed Dec 22 02:40:24 MST 2004


Hello folks,

Humrmrm... 2 days, no answers... :-/

Either I made a stupid question (I don't think so: I have *really* tried to solve
that on my own before asking the list) or this one's just something nobody has
ever tried but me (I also find that unlikely: even the telco here plays a message
when I dial a wrong number; also there's the wiki page I mentioned, which
indicates that someone in the past has had the same issue).

It may also be that this one worked perfectly with previous versions of Asterisk,
and isn't working with the version I'm trying (this could be more probable: I've
seen people reporting many broken things in 1.0.2 lately).

Could anyone please clarify me? What are folks using for "wrong extension" handling?

Thanks in advance for any answers.

Best Regards,
Telmo.


On Mon Dec 20  1:20 , telmo at n1.com> sent:

>Hello folks,
>
>I'm having trouble configuring Asterisk to play an "invalid extension" message to
>anyone dialing an undefined extension.
>
>First I tried using the 'i' pseudo-extension, but it didn't work at all;
>searching the wiki I found that page:
>    http://www.voip-info.org/tiki-index.php\?page=Asterisk%20i%20extension
>where it basically says that the 'i' extension can't be used like I (and
>apparently the wiki page author) thought.
>
>I then did the "separate context with _." trick the above wiki page suggests; at
>first it seemed to work: picking up an extension and dialing any invalid
>extension would play the message (albeit it would play twice, can't understand
>why) and then hang up.
>
>Later I found the above configuration was interfering with my sip dial-out thru
>voiptalk.org: any call I place thru voiptalk (for example, dialing '8902' for the
>welcome message) is followed by the "invalid extension" message when the remote
>end hangs up.
>
>I'm running Asterisk 1.0.2, which I compiled from the source myself.
>Below are my extensions.conf and sip.conf, simplified to the point where there
>isn't anything not related to the above problem:
>
>;;;extensions.conf
>[internal]              ;;; context used by our internal SIP-phon
>include => voiptalk.org         ;include context below
>exten => 11,1,Dial(SIP/gsbt100,20,tr);calling : dial our office phone
>include => invalid_calls        ;all ext numbers not handled above are invalid
>[voiptalk.org]
>;forwards any calls starting with an "8" thru voiptalk.org
>exten => _8.,1,Answer
>exten => _8.,3,SetCIDNum(55555555)
>exten => _8.,4,SetCIDName(My Name And Surname)
>exten => _8.,5,Dial(SIP/${EXTEN:1}@voiptalk.org,,g)
>exten => _8.,6,HangUp
>[invalid_calls]         ;;; default context for invalid calls
>exten => _.,1,Wait(1)
>exten => _.,2,Answer
>exten => _.,3,Playback(invalid)
>exten => _.,4,Hangup
>;;;end of extensions.conf
>
>;;;sip.conf
>[general]
>register => 55555555:7777777 at voiptalk.org/1000
>[voiptalk.org]
>type=friend
>secret=7777777
>username=55555555
>host=voiptalk.org
>fromdomain=voiptalk.org
>insecure=very
>dtmfmode=info
>[gsbt100]                                                      
>type=friend                                                    
>host=dynamic
>defaultip=192.168.1.200
>canreinvite=no
>username=gsbt100
>secret=xpto1234
>dtmfmode=rfc2833
>mailbox=1234
>context=internal
>callerid="Office" 
>;;;eof sip.conf
>
>Below is the console output of 'asterisk -cp -vvvvvvvvvvvvvv', when I pick up the
>phone on the gsbt100 and dial '8902': 
>
>Setting NAT on RTP to 0
>Stopping retransmission on '20fc1bc647b262ea at 192.168.1.200' of Response 15995: Found
>Setting NAT on RTP to 0
>Check for res for gsbt100
>Call from user 'gsbt100' is 1 out of 0
>build_route: Contact hop: 
>    -- Executing Answer("SIP/gsbt100-b25b", "") in new stack
>    -- Executing Answer("SIP/gsbt100-b25b", "") in new stack
>    -- Executing SetCIDNum("SIP/gsbt100-b25b", "55555555") in new stack
>    -- Executing SetCIDName("SIP/gsbt100-b25b", "My Name And Surname") in new stack
>    -- Executing Dial("SIP/gsbt100-b25b", "SIP/902 at voiptalk.org|999|g") in new stack
>SIMPLE DIAL (NO URL)
>Setting NAT on RTP to 0
>Outgoing Call for 902
>902 is not a local user
>    -- Called 902 at voiptalk.org
>Stopping retransmission on '20fc1bc647b262ea at 192.168.1.200' of Response 15996: Found
>(Provisional) Stopping retransmission (but retaining packet) on
>'645df6fa2d6126026dd9624d5c3f35e1 at voiptalk.org' Request 102: Found
>Acked pending invite 102
>Stopping retransmission on '645df6fa2d6126026dd9624d5c3f35e1 at voiptalk.org' of
>Request 102: Found
>(Provisional) Stopping retransmission (but retaining packet) on
>'645df6fa2d6126026dd9624d5c3f35e1 at voiptalk.org' Request 103: Found
>Acked pending invite 103
>Stopping retransmission on '645df6fa2d6126026dd9624d5c3f35e1 at voiptalk.org' of
>Request 103: Found
>build_route: Record-Route hop: 
>build_route: Contact hop: 
>    -- SIP/voiptalk.org-8789 answered SIP/gsbt100-b25b
>    -- Attempting native bridge of SIP/gsbt100-b25b and SIP/voiptalk.org-8789
>Oooh, format changed to 8
>Ooh, format changed from UNKN to ULAW
>Ooh, format changed from UNKN to ALAW
>Didn't get a frame from channel: SIP/voiptalk.org-8789
>Bridge stops bridging channels SIP/gsbt100-b25b and SIP/voiptalk.org-8789
>update_user_counter(902) - decrement outUse counter
>902 is not a local user
>Exiting with DIALSTATUS=ANSWER.
>    -- Executing Hangup("SIP/gsbt100-b25b", "") in new stack
>  == Spawn extension (internal, 8902, 6) exited non-zero on 'SIP/gsbt100-b25b'
>    -- Executing Wait("SIP/gsbt100-b25b", "1") in new stack
>    -- Executing Answer("SIP/gsbt100-b25b", "") in new stack
>    -- Executing Playback("SIP/gsbt100-b25b", "invalid") in new stack
>Difference is 50232, ms is 6299
>    -- Playing 'invalid' (language 'en')
>Request to schedule in the past?!?!
>Request to schedule in the past?!?!
>    -- Executing Hangup("SIP/gsbt100-b25b", "") in new stack
>  == Spawn extension (internal, h, 4) exited non-zero on 'SIP/gsbt100-b25b'
>update_user_counter(gsbt100) - decrement inUse counter
>Stopping retransmission on '20fc1bc647b262ea at 192.168.1.200' of Request 102: Found
>
>What happens on the phone is that I hear voiptalk.org's greeting and after they
>hang up, I hear my own "invalid extensions" message.
>
>I've searched the wiki, the list archives and even bugs.digium.com for an answer,
>but could not find any. Thanks in advance for your help.
>
>Best Regards,
>   Telmo.
>

---- 
SeeqMail - the only email you'll ever need Starts Here
Sign up for FREE personalized email today: http://www.seeqmail.com

http://www.Grassroots.org/ - Make Change!
---- 



More information about the asterisk-users mailing list