[Users] How to use pdt module correctly?

Charles Wang lazy.charles at gmail.com
Wed May 23 14:02:44 CEST 2007


Dear Daniel,

Nice to meet you.
Yes, my pdt table is:
sdomain: caller.openser.ip.address   ( the openser's ip address of caller)
prefix: 444
domain: callee.openser.ip.address    ( the openser's ip address of callee)

But I got "PDT:prefix2domain: no prefix found in [444111]" when caller(
222 at caller.openser.ip.address ) try to make a call 444111 to callee (
111 at callee.openser.ip.address ) using prefix2domain("0", "0") in route[0] of
openser.cfg.

Would you please give me some tips how to debug it?

Thank you very much.

Best regards,
Charles


2007/5/23, Daniel-Constantin Mierla <daniel at voice-system.ro>:
>
> Hello,
>
> sdomain is the source domain -- it is taken from From URI, if you call
> from xyz at aaa.com to 444111 at aaa.com and want to
> become 111 at bbb.com ,then entry in pdt table should be:
>
> sdomain: aaa.com
> prefix: 444
> domain: bbb.com
>
> Cheers,
> Daniel
>
>
> On 05/23/07 11:57, Charles Wang wrote:
> > Hi all,
> >
> > I try to rewrite 444111 at aaa.com <mailto:444111 at aaa.com> to 111 at bbb.com
> > <mailto:111 at bbb.com> with pdt module.
> >
> >
> > ############# pdt table in DB ##################
> > mysql> select * from pdt;
> > +----+----------------------+----------+--------------+
> > | id | sdomain           | prefix   | domain    |
> > +----+----------------------+----------+--------------+
> > |  1 |  bbb.com <http://bbb.com>          | 444      | bbb.com
> > <http://bbb.com>  |
> > +----+----------------------+----------+--------------+
> >
> > ############## parts of my openser.cfg##################################3
> > loadmodule "pdt.so"
> > modparam("pdt", "db_url", "mysql://openser:openserrw@localhost/openser")
> > modparam("pdt", "db_table", "pdt")
> > modparam("pdt", "domain_column", "sdomain")
> > modparam("pdt", "prefix_column", "prefix")
> > modparam("pdt", "prefix", "")
> > modparam("pdt", "hsize_2pow", 4)
> > modparam("pdt", "sync_time", 300)
> > modparam("pdt", "clean_time", 600)
> >
> > route[0] {
> > ........................(skip)
> >  if (is_method("INVITE")) {
> >   xlog("L_INFO", "Prefix To Domain I - M=$rm RURI=$ru F=$fu T=$tu
> > IP=$si ID=$ci\n");
> >   prefix2domain("0","0");
> >   xlog("L_INFO", "Prefix To Domain II - M=$rm RURI=$ru F=$fu T=$tu
> > IP=$si ID=$ci\n");
> >   };
> > ........................(skip)
> > }
> >
> > #################### /var/log/message
> > #######################################
> >
> > May 23 15:55:12 localhost openser[22172]: New request - M=INVITE
> > RURI=sip:444111 at aaa.com <mailto:sip:444111 at aaa.com> F=sip:222 at aaa.com
> > <mailto:sip:222 at aaa.com> T= sip:444111 at aaa.com
> > <mailto:sip:444111 at aaa.com> IP=60.244.xxx.xxx
> > ID=88BEB1DB-B447-4DAF-A3D6-212DBA3EC628 at 10.6.1.185
> > <mailto:ID=88BEB1DB-B447-4DAF-A3D6-212DBA3EC628 at 10.6.1.185>
> > May 23 15:55:12 localhost openser[22172]: Prefix To Domain I -
> > M=INVITE RURI= sip:444111 at aaa.com <mailto:sip:444111 at aaa.com>
> > F=sip:222 at aaa.com <mailto:sip:222 at aaa.com> T=sip:444111 at aaa.com
> > <mailto:sip:444111 at aaa.com> IP=60.244.xxx.xxx
> > ID=88BEB1DB-B447-4DAF-A3D6-212DBA3EC628 at 10.6.1.185
> > <mailto:ID=88BEB1DB-B447-4DAF-A3D6-212DBA3EC628 at 10.6.1.185>
> > May 23 15:55:12 localhost openser[22172]: PDT:prefix2domain: no prefix
> > found in [444111]
> > May 23 15:55:12 localhost openser[22172]: Prefix To Domain II -
> > M=INVITE RURI= sip:444111 at aaa.com <mailto:sip:444111 at aaa.com>
> > F=sip:222 at aaa.com <mailto:sip:222 at aaa.com> T=sip:444111 at aaa.com
> > <mailto:sip:444111 at aaa.com> IP=60.244.xxx.xxx
> > ID=88BEB1DB-B447-4DAF-A3D6-212DBA3EC628 at 10.6.1.185
> > <mailto:ID=88BEB1DB-B447-4DAF-A3D6-212DBA3EC628 at 10.6.1.185>
> > --
> >
> > Best Regards
> > Charles
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users at openser.org
> > http://openser.org/cgi-bin/mailman/listinfo/users
> >
>



-- 

Best Regards
Charles
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kamailio.org/pipermail/users/attachments/20070523/1203a19b/attachment.htm 


More information about the Users mailing list