[Asterisk-Users] dialplan defenition

Joao Pereira joao.pereira at fccn.pt
Wed Aug 10 07:51:05 MST 2005


Ok, but thats static routing. My architecture is this:

[pbx extensions] --- [SIEMENS PBX] ---- [ASTERISK] --- [SER] --- [sip 
clients]

I can't put in Asterisks sip.conf  the hundreds of pbx extensions (and 
they are always changing), I must do a dinamic forward for all 74XXX calls.
I think this is realy close:

exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r)

because it seems that is everything right... but It always answer:

pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid
extension 's' in context 'default', but no invalid handler

Joao Pereira




Moises Silva wrote:

>its kind of weird may be the problem is the default context, i have
>never used the default context, i always use a specific context for
>each extension. Lets say you have a registered sip number 21, then you
>can do in sip.conf
>
>[21]
>someparameter=blah...
>etc...
>context=sipcontext
>
>the important thing is the parameter called 'context' it has as value
>'sipcontext'. When the extension 21 calls, then the dialed number (any
>number the extension 21 dials) will arrive to the specified context
>'sipcontext'. in sipcontext you write
>
>[sipcontext]
>exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r)
>
>that should work. let us know if you still have problems.
>
>On 7/29/05, Joao Pereira <joao.pereira at fccn.pt> wrote:
>  
>
>>but everytime I dont put the "s", when I try to call 74XXX, Asterisk
>>answers :
>>
>>pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid
>>extension 's' in context 'default', but no invalid handler
>>
>>I think it must be something like that:
>>
>>exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r)
>>... but it always answers:
>>pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/1' sent into invalid
>>extension 's' in context 'default', but no invalid handler
>>
>>
>>
>>It must be a way to do it...
>>Thanks
>>João
>>
>>Moises Silva wrote:
>>
>>    
>>
>>>Please read this docs:
>>>http://www.voip-info.org/tiki-index.php?page=Asterisk+config+extensions.conf
>>>
>>>you need to understand what the 's' extension does. If you use it, no
>>>matter what number they have dialed, it will start at the s extensión.
>>>If i understand your goal, YOU DONT NEED the 'exten => s,1,Answer' .
>>>
>>>You have:
>>>
>>>
>>>      
>>>
>>>>;exten => s,1,Answer
>>>>;exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r)
>>>>
>>>>
>>>>        
>>>>
>>>please replace it for:
>>>exten => _74XXX,1,Answer()
>>>exten => _74XXX,2,Dial(SIP/${EXTEN}@1193.136.252.5,30,r)
>>>
>>>best regards
>>>
>>>On 7/29/05, Joao Pereira <joao.pereira at fccn.pt> wrote:
>>>
>>>
>>>      
>>>
>>>>Ok, now ill explain my dialplan problem
>>>>
>>>>Goal: When Asterisk receives a 74XXX number, should send it to its peer
>>>>in 193.136.252.5:5060 (SERs IP), someting like:
>>>>sip:74XXX at 193.136.252.5
>>>>Here is my extensions.conf and sip.conf
>>>>
>>>>------------------- EXTENSIONS.CONF
>>>>[general]
>>>>static=yes
>>>>writeprotect=no
>>>>
>>>>[globals]
>>>>CONSOLE=Console/dsp
>>>>
>>>>TRUNK=CAPI
>>>>
>>>>[default]
>>>>
>>>>; this way he works... but always dials sip:74118 at 193.136.252.5 ... not
>>>>yet what I want
>>>>;exten => s,1,Dial(SIP/74118 at 193.136.252.5,30,r)
>>>>
>>>>; this way, he dials "sip:s at 193.136.252.5" ...
>>>>;exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r)
>>>>
>>>>;this way it works... but I have to dial:
>>>>; 74XXX then he gives me dialtone, and then I must dial 74XXX again...
>>>>; not yet what I want... the idea is just dial 74XXX once, withou
>>>>dialtones in between
>>>>;exten => s,1,Answer
>>>>;exten => _74XXX,1,Dial(SIP/${EXTEN}@1193.136.252.5,30,r)
>>>>
>>>>; what must I put here to dial  sip:74XXX at 193.136.252.5   ???
>>>>
>>>>-------------------SIP.CONF
>>>>[general]
>>>>context=default
>>>>
>>>>port=1720
>>>>bindaddr=193.136.252.5
>>>>
>>>>insecure=very
>>>>
>>>>realm=fccn.pt
>>>>
>>>>;defenition of SER as a peer
>>>>[193.136.252.5]
>>>>type=peer
>>>>username=193.136.252.5:5060
>>>>host=193.136.252.5
>>>>context=from-sip
>>>>canreinvite=no
>>>>insecure=very
>>>>
>>>>
>>>>
>>>>Thanks
>>>>Joao Pereira
>>>>-----------------------------------------------------------------------------
>>>>
>>>>
>>>>
>>>>Moises Silva wrote:
>>>>
>>>>
>>>>
>>>>        
>>>>
>>>>>the problem is how are you getting there? i mean, what do you have in
>>>>>sip.conf and please post all the relevant text in extensions.conf, not
>>>>>just the 'exten => blah' part, we need to know context names to see if
>>>>>its matching the sip.conf configuration
>>>>>
>>>>>regards
>>>>>
>>>>>On 7/28/05, Joao Pereira <joao.pereira at fccn.pt> wrote:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>>>>I had tried that also, but it didnt work. In that case, if I dial 74118
>>>>>>(for example) Asterisk answers this:
>>>>>>
>>>>>>pbx.c:1877 ast_pbx_run: Channel 'CAPI[contr1/118]/0' sent into invalid
>>>>>>extension 's' in context 'default', but no invalid handler
>>>>>>
>>>>>>I think it needs the "s"... but how do I put the "s" and route the call
>>>>>>to 74XXX at 193.136.252.5 ????
>>>>>>Thanks
>>>>>>Joao
>>>>>>
>>>>>>
>>>>>>Christian Victor wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>>>Joao Pereira schrieb:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>>>Im writing my dial plan, in witch every SIP phone begins with 74 and
>>>>>>>>has more 3 numbers (like 74XXX).
>>>>>>>>So, I want to route all 74XXX calls to my sip channel. For this I
>>>>>>>>wrote this line:
>>>>>>>>exten => s,1,Dial(SIP/74118 at 193.136.252.5,30,r)
>>>>>>>>
>>>>>>>>but this way all calls go to 74118 at 193.136.252.5  .....
>>>>>>>>
>>>>>>>>Then I tried:
>>>>>>>>exten => s,1,Dial(SIP/${EXTEN}@193.136.252.5,30,r)
>>>>>>>>
>>>>>>>>but this way, the system tries to dial  <sip:s at 193.136.252.5> and not
>>>>>>>>74XXX at 193.136.252.5 like I wanted...
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>                
>>>>>>>>
>>>>>>>You were on the right way my friend. Why not try
>>>>>>>
>>>>>>>exten => _74XXX,1,Dial(SIP/$(EXTEN)@193.136.252.5,30,r)
>>>>>>>
>>>>>>>Hope that helps
>>>>>>>Christian
>>>>>>>_______________________________________________
>>>>>>>Asterisk-Users mailing list
>>>>>>>Asterisk-Users at lists.digium.com
>>>>>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>>>>To UNSUBSCRIBE or update options visit:
>>>>>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>              
>>>>>>>
>>>>>>_______________________________________________
>>>>>>Asterisk-Users mailing list
>>>>>>Asterisk-Users at lists.digium.com
>>>>>>http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>>>To UNSUBSCRIBE or update options visit:
>>>>>> http://lists.digium.com/mailman/listinfo/asterisk-users
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>            
>>>>>>
>>>>>
>>>>>
>>>>>          
>>>>>
>>>
>>>
>>>      
>>>
>
>
>  
>



More information about the asterisk-users mailing list