[Kamailio-Users] What is the best module for routing INVITE based on DID in R-URI?

Daniel-Constantin Mierla miconda at gmail.com
Sat Mar 13 11:59:19 CET 2010



On 03/13/2010 02:30 AM, Geoffrey Mina wrote:
> Thanks, that worked perfectly.  The PDT module seems to be a solid
> solution for what I'm trying to accomplish.  I just need a mapping for
> inbound DIDs... i suppose I could have used htable, but this seems a
> little cleaner.
>    

pdt uses internally a tree which is better to index dids (very fast 
lookup). htable can be used, but is more appropriate when the key is 
alphanumeric.

Cheers,
Daniel

> On Fri, Mar 12, 2010 at 5:40 PM, Daniel-Constantin Mierla
> <miconda at gmail.com>  wrote:
>    
>> Hello,
>>
>> On 03/12/2010 10:36 PM, Geoffrey Mina wrote:
>>      
>>> Sorry to bring up an old thread here... but I have finally gotten
>>> around to implementing your PDT suggestion.  I have a table which
>>> looks like:
>>>
>>> source | prefix | domain |
>>> * | 5555551212 | 192.168.200.1
>>> * | 5555551213 | 192.168.200.1
>>> * | 5555551214 | 192.168.200.1
>>>
>>> The calls are coming in as: RURI=sip:5555551212 at 192.168.200.0:5060 and
>>> I am using the pdt module by calling with prefixdomain("2","0") so
>>> that we aren't actually stripping out any of the URI, I am just
>>> matching to a domain and rewriting.  In my logs I am seeing the
>>> following and I am unable to route to anything but the first.
>>>
>>> Mar 12 16:29:13 cust-sipgateway1 /usr/local/sbin/kamailio[9157]:
>>> ERROR:pdt:pdt_load_db: sdomain [*]: prefix [5555551213] or domain
>>> <192.168.200.1>    duplicated
>>> Mar 12 16:29:13 cust-sipgateway1 /usr/local/sbin/kamailio[9157]:
>>> ERROR:pdt:pdt_load_db: sdomain [*]: prefix [5555551214] or domain
>>> <192.168.200.1>    duplicated
>>>
>>>
>>> Any ideas?  It would be a shame if I had to scrap this plan... as it
>>> works so nicely with only a single prefix/domain! :)
>>>
>>>        
>> just disable domain duplication checking:
>> http://kamailio.org/docs/modules/stable/modules_k/pdt.html#id2533886
>>
>> First version of this module had the constraint of one prefix-domain
>> relation (like with unique prefix for each country) and the parameter
>> controls the backward compatibility.
>>
>> Cheers,
>> Daniel
>>
>>
>>      
>>>
>>> On Thu, Jan 21, 2010 at 3:58 AM, Daniel-Constantin Mierla
>>> <miconda at gmail.com>    wrote:
>>>
>>>        
>>>> On 1/20/10 12:54 AM, Geoffrey Mina wrote:
>>>>
>>>>          
>>>>> Thanks for the idea.  Ill have lots of these, so If you wouldn't mind,
>>>>> could you elaborate a bit on using ENUM in kamailio.
>>>>>
>>>>> P.s. I'm on 1.5
>>>>>
>>>>>
>>>>>            
>>>> enum implementation is pretty mature, without relevant changes since 1.3
>>>> or
>>>> so.
>>>>
>>>> Regarding enum, practically is about storing relation between numbers and
>>>> sip addresses in DNS server and you query the DNS server each time you
>>>> get a
>>>> call. Is good if you are familiar with dns servers. For more, you can
>>>> start
>>>> from here:
>>>> http://en.wikipedia.org/wiki/Telephone_Number_Mapping
>>>>
>>>> Cheers,
>>>> Daniel
>>>>
>>>>          
>>>>> Thanks
>>>>>
>>>>> On 1/19/10, Andreas Sikkema<h323 at ramdyne.nl>      wrote:
>>>>>
>>>>>
>>>>>            
>>>>>> On Jan 19, 2010, at 8:34 PM, Geoffrey Mina wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>              
>>>>>>> I am putting up a Kamailio server which will do nothing but route
>>>>>>> INVITE requests from my upstream carrier to individual offices on my
>>>>>>> side.  The office locations will NOT be registered SIP UAs, but other
>>>>>>> Kamailio proxy servers.  What I want to have is a database of DIDs
>>>>>>> associated with a forwarding IP:Port and/or SRV records.
>>>>>>>
>>>>>>> 5555551212 ==>      1.2.3.4:5060
>>>>>>> 5555551213 ==>      1.2.3.5:5060
>>>>>>>
>>>>>>>
>>>>>>>                
>>>>>> If I had a reasonable amount of relations like this so that maintenance
>>>>>> by
>>>>>> hand would be an issue I'd try to find an ENUM setup that was easily
>>>>>> manageable. Point an ENUM address to a trusted peer and you're done.
>>>>>>
>>>>>> --
>>>>>> Andreas
>>>>>> _______________________________________________
>>>>>> 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
>>>> * http://www.asipto.com/
>>>>
>>>>
>>>>
>>>>          
>> --
>> Daniel-Constantin Mierla
>> Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
>> * http://www.asipto.com/index.php/sip-router-masterclass/
>>
>>
>>      

-- 
Daniel-Constantin Mierla
Kamailio SIP Router Masterclass, Berlin, March 22-26, 2010
* http://www.asipto.com/index.php/sip-router-masterclass/




More information about the Users mailing list