Re: [SR-Users] Get destination out of _dsdst_

2019-10-03 Thread David Villasmil
Got it, it's "$xavp(_dsdst_=>uri)"

Thanks all!

Regards,

David Villasmil
email: david.villasmil.w...@gmail.com
phone: +34669448337


On Thu, Oct 3, 2019 at 2:01 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello guys,
>
> I've never used "ds_select" as opposed to "ds_select_dst", and i would
> like to get the actual destination out of _dsdst_
>
> I've got
>
> modparam("dispatcher", "xavp_dst", "_dsdst_")
>
> and then i'm trying to do:
>
> if(!ds_select("100", "4"))
> {
> send_reply("404", "No destination");
> exit;
> }else{
> xlog("L_ERR", "[XHTTP]: The next destination for SMS is:
> [$xavp(_dsdst_)]\n");
> ds_mark_dst("d");
> }
>
> But that's coming up with
>
>  The next destination for SMS is: [<>]
>
> I need to get the actual ip address out of the struct.
>
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users


Re: [SR-Users] Get destination out of _dsdst_

2019-10-03 Thread Federico Cabiddu
Hi,
xavps are structs, not plain strings:
https://www.kamailio.org/wiki/cookbooks/5.2.x/pseudovariables#xavp_id_-_xavps
.
To get the ip of the currently selected destination you should use
$xavp(_dsdst_=>uri)
(
http://www.kamailio.org/docs/modules/5.2.x/modules/dispatcher.html#dispatcher.p.xavp_dst

)
Anyway after using ds_select the destination is set in $du.

Cheers,

Federico

On Thu, Oct 3, 2019 at 3:02 PM David Villasmil <
david.villasmil.w...@gmail.com> wrote:

> Hello guys,
>
> I've never used "ds_select" as opposed to "ds_select_dst", and i would
> like to get the actual destination out of _dsdst_
>
> I've got
>
> modparam("dispatcher", "xavp_dst", "_dsdst_")
>
> and then i'm trying to do:
>
> if(!ds_select("100", "4"))
> {
> send_reply("404", "No destination");
> exit;
> }else{
> xlog("L_ERR", "[XHTTP]: The next destination for SMS is:
> [$xavp(_dsdst_)]\n");
> ds_mark_dst("d");
> }
>
> But that's coming up with
>
>  The next destination for SMS is: [<>]
>
> I need to get the actual ip address out of the struct.
>
>
> Regards,
>
> David Villasmil
> email: david.villasmil.w...@gmail.com
> phone: +34669448337
> ___
> Kamailio (SER) - Users Mailing List
> sr-users@lists.kamailio.org
> https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users
>
___
Kamailio (SER) - Users Mailing List
sr-users@lists.kamailio.org
https://lists.kamailio.org/cgi-bin/mailman/listinfo/sr-users