[Kamailio-Users] Dialplan Module Confusion

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 18 08:36:42 CET 2009


Hello,

On 18.11.2009 5:38 Uhr, JR Richardson wrote:
> Hi All,
>  
> I'm new to the list and fairly new to the vastness which is kamailio 
> and the tons of modules and options.  I'm trying to figure out the 
> simplest method to accomplish the following scenario:
>  
> SIP call comes in, match DID in database (MySQL), rewrite ruri with 
> associated database entry matching DID, relay call to specified 
> gateway, if no matching entry for DID is in database, forward call to 
> dispatcher module and continue processing call (I already use the 
> dispatcher module for load balancing, just need to implement DID call 
> routing before I send calls to dispatcher)
>  
> I've been reading about the following modules, dialplan, LCR, 
> drouting, alias_db.
>  
> I think dialplan is what I really need, but I'm confused about what 
> entries to put in the database to match on 10 digit DID:
>  
> match-op = 0 (equal)
> match_exp= 1112223333
> match_len= 10
> subst_exp= ?? is this where I would put the ruri 
> sip:1112223333 at 10.10.10.10 <mailto:sip%3A1112223333 at 10.10.10.10> (I'm 
> not sure of the syntax here)
> repl_exp= ?? not sure what this is for
Think in Perl's substitution command format:

s/subst_exp/repl_exp/

subst_exp - is regular expression that can be used to group parts of the 
input
repl_exp - is used to build the output

Example: you want to remove the first 0 and prefix +44 to a number:

subst_exp=^0(.+)$
repl_exp=+44\1


>  
> can more than one database entry have the same id?
>  
> and also I could use a practical example of how this would work int he 
> config file:
>  
> dp_translate("240", "$ruri.user/$ruri.user");

This is an obsolete example, right one now is:
dp_translate("240", "$rU/$rU");

It will do the operations over R-URI username part.

Cheers,
Daniel

>  t_relay??
>  
> Any guidance on this would be much appreciated.
>
> Thanks.
>
> JR
> -- 
> JR Richardson
> Engineering for the Masses
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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/





More information about the sr-users mailing list