[Kamailio-Users] dialplan and carrierroute

victorpy victorpy at gmail.com
Wed Jan 7 16:12:33 CET 2009


sorry the call-id was wrong. i really use the user part of the ruri, that
represent a phone number in my case.

your answer really helped me. I thik the first option will solve my problem,
the second might too but as you say i'll loose flexibility.

thank you


Henning Westerholt-2 wrote:
> 
> On Wednesday 07 January 2009, victorpy wrote:
>> i want to know if there is a way of routing based on patern matching
>> using
>> caller-id.
>> Basically, i want to route through a carrier if the call-id have some
>> pattern
>>
>> Eg.:
>>
>> international is 002-(country code)-(area code)-697699.
>> Long distance is (country code) -(area code) -123456
>> Local is 123456
>>
>> The international and long distance change
>>
>> If international then route through carrier1
>> else if long distance the route through carrier 2
>> else if local then route through carrier 3
> 
> Hi victorpy,
> 
> do we talk about the SIP call-id header field here? Each call should get a 
> unique one, so i don't think this is feasible. But hashing over the
> call-id 
> is possible.
> 
> If you mean another header field, then you could just lookup the target of
> the 
> call by some other means (e.g. from a DB table, set it from the script),
> and 
> give the carrier id to the cr_route function with an AVP. The specific GWs 
> could then lookup by the cr prefix matching function for each carrier. You 
> can modify the string that is used for prefix matching as well, as is also 
> just a pseudo-variable.
> 
> Another option would be to just use the 'default' carrier in cr, and use
> the 
> normal prefix matching via the R-URI to route the call to the specific
> GWs. 
> But you'll loose some flexibility here, as you don't have the possibility
> to 
> seperate your routing by several carriers anymore.
> 
> Cheers,
> 
> Henning
> 
> _______________________________________________
> Users mailing list
> Users at lists.kamailio.org
> http://lists.kamailio.org/cgi-bin/mailman/listinfo/users
> 
> 

-- 
View this message in context: http://www.nabble.com/dialplan-and-carrierroute-tp21331266p21333211.html
Sent from the OpenSER Users Mailing List mailing list archive at Nabble.com.





More information about the Users mailing list