[SR-Users] R: lcr module: strip and tag

Alida - Danilo SMALDONE dsmaldone at alida.it
Wed Apr 27 16:42:00 CEST 2011


Here you are


 

gw_uri_avp[0]='1|1|3|774|1171521237|172.16.10.200|5060||1|0' -> what does
1171521237 means? I never entered this value

 

Kamailio 3.1 installed from rpm on Centos

 

The modified route

 

route[LCR] {

        xlog("L_WARN", "ENTRO IN ROUTE LCR
********************************** \n");

        if (!load_gws(1)) {

                sl_send_reply("503", "Unable to load gateways");

                exit;

        } else {

                $var(i) = 0;

                while(is_avp_set("$(avp(i:709)[$var(i)])")) {

                        xlog("L_WARN","loading
gw_uri_avp[$var(i)]='$(avp(i:709)[$var(i)])'\n");

                        $var(i) = $var(i) + 1;

                        avp_print();

                };

                if(is_avp_set("$avp(i:709)")) {

                        xlog("L_WARN", "Trying gateway '$avp(i:709)'\n");

                } else {

                        xlog("L_WARN", "No More Gateways \n");

                };

                # try the first matched gateway

                if (next_gw()) {

                        xlog("L_WARN","ruri_user_avp='$avp(i:500)'\n");

                        xlog("L_WARN","test ruri_avp='$ru'\n");

                        xlog("L_WARN", "$tu in next_gw() call
route(LCR)='$tu' \n");

                        # Route to failure for failover

                        #t_on_failure("2");

                         route(RELAY);

                } else {

                        sl_send_reply("503","No available gateways");

                        exit;

                };

        };

        exit;

}

 

The result

 

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>: ENTRO IN PSTN
**********************************

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>: $tu before call
route(LCR)='sip:09711234567 at voip.myproxy.it'

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>: ENTRO IN ROUTE
LCR **********************************

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>: loading
gw_uri_avp[0]='1|1|3|774|1171521237|172.16.10.200|5060||1|0'

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>: Trying gateway
'1|1|3|774|1171521237|172.16.10.200|5060||1|0'

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>:
ruri_user_avp='09711234567'

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>: test
ruri_avp='sip: 09711234567 at 172.16.10.200'

Apr 27 16:34:14 localhost kamailio[8725]: WARNING: <script>: $tu in
next_gw() call route(LCR)='sip:09711234567 at voip.alida.it'

 

Danilo

 

-----Messaggio originale-----
Da: sr-users-bounces at lists.sip-router.org
[mailto:sr-users-bounces at lists.sip-router.org] Per conto di Juha Heinanen
Inviato: mercoledì 27 aprile 2011 14:31
A: SIP Router - Kamailio (OpenSER) and SIP Express Router (SER) -Users
Mailing List
Oggetto: [SR-Users] lcr module: strip and tag

 

 

 

> I've some understanding problem on lcr module.

 

based on info you gave, i cannot say anything.  check how your request

uri looks like when you call load_gws() and after you have called

next_gw() and check how your tables look like.  there is no need to

inspect the internal avps unless you suspect a bug somewhere.

 

-- juha

 

_______________________________________________

SIP Express Router (SER) and Kamailio (OpenSER) - sr-users mailing list

sr-users at lists.sip-router.org

http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20110427/1c02ea83/attachment-0001.htm>


More information about the sr-users mailing list