[SR-Users] Change "from user "

arun Jayaprakash jayaprakasharun at yahoo.com
Sat Aug 24 15:24:05 CEST 2013


Hello Alex, thank you. So this is what I have:

if (is_method("INVITE")) {
                xlog("L_DBG", "LOG: INVITE in PSTN route\n");
                $var(new_uri) = "sip:"+ "8888888888" +"@home.otv.net:5060";
                uac_replace_from("","$var(new_uri)");
                xlog("L_DBG", "LOG: After update fU is $fU");

                if (uri=~"sip:1[2-9][0-9]+ at .*") {
                        if (!is_user_in("From", "ld")) {
                                xlog("LOG: PSTN call but user don't have permissions\n");
                                sl_send_reply("403", "No permission for long dist calls");
                                exit;
                        }
                }
        }

My questions are:

1. When I do uac_replace_from("8888888888",""); I do not see any change in the output, my from user still remains the same and is not updated to 8888888888, why is that?

2. When I run the scrip as shown in my snippet above the from user changes on the receiving phones caller id to 8888888888 but how come in my xlog I still see the old $fU and not the updated one?

Thanks for the help.

A

________________________________
 From: Alex Balashov <abalashov at evaristesys.com>
To: arun Jayaprakash <jayaprakasharun at yahoo.com>; Kamailio (SER) - Users Mailing List <sr-users at lists.sip-router.org> 
Sent: Thursday, August 22, 2013 4:08 PM
Subject: Re: [SR-Users] Change "from user "
 


uac_replace_from() in the uac module can do that. 


arun Jayaprakash <jayaprakasharun at yahoo.com> wrote:
Hello, can someone let me know how I can modify the "from user" when making an outbound PSTN call. For example, when I make a PSTN call now the caller ID shows up as my 4 digit extension but I would like my PSTN number displayed instead. Thank you.
>
>
>Arun
>
>
>________________________________
>
>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
>
--
Sent from my Nexus 10, with all the figments of autocorrect that might imply.

Alex Balashov - Principal
Evariste Systems LLC
235 E Ponce de Leon Ave
Suite 106
Decatur, GA 30030
United States
Tel: +1-678-954-0670
Web: http://www.evaristesys.com/, http://www.alexbalashov.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-users/attachments/20130824/45af2a16/attachment.html>


More information about the sr-users mailing list