[Kamailio-Users] Drouting Question

Daniel-Constantin Mierla miconda at gmail.com
Fri Feb 12 19:55:34 CET 2010



On 2/12/10 5:55 PM, Sven Schulz wrote:
> Thanks Daniel,
> Yes, your explanation makes sense to me now. I found a sample config where
> drouting was used and its using the "use_next_gw" command in the failure
> route. I was under the impression that "Do_routing" did all this
> automatically...from reading the doc.
>
> Im planning on using openser as a "gateway selector" for a large PBX. The
> PBX will send all outbound calls to openser. Openser will then route the
> calls (based on area code, etc) to the appropriate gateway. The routes have
> to be stored in a database as opposed to the config.

do you need failure-routes? If not and you route based on longest prefix 
matched then check pdt module as well, it is more lightweight.

Cheers,
Daniel

>   It will also collect
> ACC records for all calls.
>
>
>
>
> On 2/11/10 4:02 PM, "Daniel-Constantin Mierla"<miconda at gmail.com>  wrote:
>
>    
>>
>> On 2/11/10 8:53 PM, Alex Balashov wrote:
>>      
>>>> = 4xx reply.
>>>>          
>> better said:>=300 reply
>>      
>>> On 02/11/2010 02:52 PM, Sven Schulz wrote:
>>>
>>>        
>>>> Hello,
>>>>
>>>> Ive been testing Kamailio 3.0 and drouting. In the documentation it
>>>> states (Section 1.5 Routing Rule Processing) ³The module will execute
>>>> serial forking for each address in chain. The next address in chain is
>>>> used only if the previously has failed.²
>>>>          
>> I think it is a bit too much said. You have to do some scripting, in
>> this way:
>> - first build the list of available destinations by calling do_routing(...)
>> - that will set first destination in R-URI and the rest will be kept in
>> avp list
>> - before forwarding with t_relay() arm a failure_route
>> - the failure_route is executed only when the forwarded invite is
>> replied with>=300 code
>> - if failure route is triggered, call next_routing() (maybe you need to
>> call append_branch() afterward as well)
>> - re-arm the failure route and forward again
>> - repeat until next_routing() is false (no more destinations available)
>>
>>
>>      
>>>> What exactly defines a failure? Does it use ping or OPTIONS to determine
>>>> if a GW is busy or down?
>>>>          
>> I haven't looked at drouting for this option, last time I got into that
>> code several weeks ago it wasn't no way to detect gw states. But
>> dispatcher, lcr and probably carrierroute modules use options to detect
>> availability of gateways.
>>
>> Maybe if you can describe what you want to achieve, we can give some
>> hints what is best to use.
>>
>> Hope it helps,
>> Daniel
>>      
>>>> Id like to know exactly how drouting figures
>>>> this out.
>>>>
>>>>
>>>> Sven Schulz
>>>> Penn State University
>>>> Telecommunications and Network Services
>>>> 814.865.6116
>>>> sip:sven at psu.edu
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Kamailio (OpenSER) - Users mailing list
>>>> Users at lists.kamailio.org
>>>> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
>>>> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>>>>          
>>>
>>>        
>
> _______________________________________________
> Kamailio (OpenSER) - Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> http://lists.openser-project.org/cgi-bin/mailman/listinfo/users
>
>    

-- 
Daniel-Constantin Mierla
SIP Server Professional Solutions
* http://www.asipto.com/




More information about the Users mailing list