[OpenSIPS-Users] enum_pv_query response

Andrew Melton amelton at gmail.com
Tue Apr 10 08:25:48 CEST 2012


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 at 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 at 10.10.81.28>;tag=as6c204346
To: <sip:+13104849395 at 10.10.141.97
>;tag=3e30cad664f79af6351b92d4153bfe13.b8f4
Call-ID: 7f995e292bec90f904dd33f9764af0bb at 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 <razvan at 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,
>
> --
> Răzvan Crainea
> OpenSIPS Developerhttp://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;spid=1086!'
>
>  Based on that, I was expecting to redirect the call by parsing the rn=
> 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 listUsers at lists.opensips.orghttp://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opensips.org/pipermail/users/attachments/20120409/72a7454f/attachment.htm>


More information about the Users mailing list