Hello, Andrew!

You should see the enum response stored in the $ru variable just after the enum_pv_query function.

Regards,

--
Ra(zvan Crainea
OpenSIPS Developer
http://www.opensips-solutions.com


On 04/10/2012 09:25 AM, Andrew Melton wrote:
Ok, thanks Razvan.

Can you help me narrow down the response? I am using the enum_pv_query along with t_reply to return the enum results to the caller:

route[1] {
...
enum_pv_query("$ru", "enum.local");
 t_reply("302", "ENUM");
...


This results in something like (from sip_trace):

| 1089 | 2012-04-09 20:33:23 | 7f995e292bec90f904dd33f9764af0bb@10.10.81.28 <mailto:7f995e292bec90f904dd33f9764af0bb@10.10.81.28> | | SIP/2.0 302 ENUM Via: SIP/2.0/UDP 10.10.81.28:5060;received=10.10.81.28;branch=z9hG4bK2bfcb565;rport=5060 From: <sip:12105856325@10.10.81.28 <mailto:sip%3A12105856325@10.10.81.28>>;tag=as6c204346 To: <sip:+13104849395@10.10.141.97 <mailto:sip%3A%2B13104849395@10.10.141.97>>;tag=3e30cad664f79af6351b92d4153bfe13.b8f4 Call-ID: 7f995e292bec90f904dd33f9764af0bb@10.10.81.28 <mailto:7f995e292bec90f904dd33f9764af0bb@10.10.81.28>
CSeq: 102 INVITE
Contact: <tel:+13104849395;npdi;rn=3105654000;spid=132D>;q=0.99
Server: OpenSIPS (1.8.0-beta-notls (x86_64/linux))
Content-Length: 0

It would seem that either $(ct.fields(uri) or $ru would grab the Contact header string:

Contact: <tel:+13104849395;npdi;rn=3105654000;spid=132D>;q=0.99

but xlog copies the received URI instead of the enum_pv_query results.

Is there something in addition to $ru that I need to look for to capture the URI response?

Thank you.









On Mon, Apr 9, 2012 at 1:17 AM, Razvan Crainea <raz...@opensips.org <mailto:raz...@opensips.org>> wrote:

    Hello, Andrew!

    You cannot access the raw NAPTR response from the script, you can
    only see the R-URI modified according to the ENUM regexp response.
    Therefore, you can search for the rn param in the R-URI ($ru
    pseudovariable).

    Regards,

    --
    Ra(zvan Crainea
    OpenSIPS Developer
    http://www.opensips-solutions.com


    On 04/06/2012 11:58 PM, Andrew Melton wrote:
    I am attempting to use the NAPTR response from an enum_pv_query,
    but I can't find the variable being used to store it.  Debug
    shows a response value:

    DBG:enum:enum_pv_query_3: ENUM query on
    5.2.1.5.7.2.8.2.1.5.1.enum.local: order 100, pref 50, flen 1,
    flags 'u', slen 12, services 'E2U+pstn:tel', rlen 44, regexp
    '!^(.*)$!tel:\1;npdi;rn=5125599976 <tel:5125599976>;spid=1086!'

    Based on that, I was expecting to redirect the call by parsing
    the rn=5125599976 <tel:5125599976> from the enum response, and
    using it to either rewrite the uri or construct a simple 302 from
    scratch.  Can I store the response or use it in a script?

    Thanks.




    _______________________________________________
    Users mailing list
    Users@lists.opensips.org  <mailto:Users@lists.opensips.org>
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users

    _______________________________________________
    Users mailing list
    Users@lists.opensips.org <mailto:Users@lists.opensips.org>
    http://lists.opensips.org/cgi-bin/mailman/listinfo/users




_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
Users@lists.opensips.org
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

Reply via email to