(no subject)

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

(no subject)

Uday Kumar
Hello Everyone

I have a system developed in opensips to make outbound calls. Now trying to implement the LRN thing using sip invite with provider IP because USA have different rate based on LRN. 

Customer Call => OpenSIPs => LRN server. Once received response 302 from LRN server then send call to gateway. So OpenSIPs sending first Invite to LRN server to get LRN details and then sending to gateway to process call. 

I have followed below PDF for implementation but no success yet.


Please guide. 
--
Thanks & Regard
Uday.
Mobile:- +91-9377579349

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Jon Abrams
Uday, what do you currently have in your script for the LRN dip? What do you observe the script doing (or not doing) currently?

- Jon

On Fri, Dec 14, 2018 at 7:16 AM Uday kumar <[hidden email]> wrote:
Hello Everyone

I have a system developed in opensips to make outbound calls. Now trying to implement the LRN thing using sip invite with provider IP because USA have different rate based on LRN. 

Customer Call => OpenSIPs => LRN server. Once received response 302 from LRN server then send call to gateway. So OpenSIPs sending first Invite to LRN server to get LRN details and then sending to gateway to process call. 

I have followed below PDF for implementation but no success yet.


Please guide. 
--
Thanks & Regard
Uday.
Mobile:- +91-9377579349
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Uday Kumar
Hello Jon,

Here is my code....

if (is_method("INVITE")) {
    route(RELAY_TO_LRN);
}

route[RELAY_TO_LRN] {
$du = "sip:IP:PORT";
$T_fr_timeout=2;
t_on_failure("lrn_reply");
t_relay();
}

failure_route[lrn_reply] {
if (t_check_status("302")) {
                   $var(contact) = $hdr(Contact);
   xlog("SCRIPT:LRN:DBG: $var(contact) \n");
   $var(lrn_rpl) = $(var(contact){nameaddr.uri}{param.value,rn});
   xlog("SCRIPT:LRN:DBG:  $var(lrn_rpl) \n");
                   if ($var(lrn_rpl) == NULL || $var(lrn_rpl) == "") {
      $var(lrn_rpl) = $rU;
      xlog("SCRIPT:LRN:DBG: $rU is not ported \n");
   } else {
      xlog("SCRIPT:LRN:DBG: $rU translates to $var(lrn_rpl) \n");
      $rU = $var(lrn_rpl);
   }
}

...... continue the call ......
}


Please advice. 

Thanks
Uday.

On Fri, Dec 14, 2018 at 7:21 PM Jon Abrams <[hidden email]> wrote:
Uday, what do you currently have in your script for the LRN dip? What do you observe the script doing (or not doing) currently?

- Jon

On Fri, Dec 14, 2018 at 7:16 AM Uday kumar <[hidden email]> wrote:
Hello Everyone

I have a system developed in opensips to make outbound calls. Now trying to implement the LRN thing using sip invite with provider IP because USA have different rate based on LRN. 

Customer Call => OpenSIPs => LRN server. Once received response 302 from LRN server then send call to gateway. So OpenSIPs sending first Invite to LRN server to get LRN details and then sending to gateway to process call. 

I have followed below PDF for implementation but no success yet.


Please guide. 
--
Thanks & Regard
Uday.
Mobile:- +91-9377579349
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Thanks & Regard
Uday.
Mobile:- +91-9377579349

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: (no subject)

Jon Abrams
You may need to change how you are pulling the contact header, so it grabs it from the reply. I use something like this:

$var(contact) = $(<reply>hdr(Contact));
$avp(lrn_called) = $(var(contact){nameaddr.uri}{param.value,rn});

- Jon

On Tue, Dec 18, 2018 at 4:43 AM Uday kumar <[hidden email]> wrote:
Hello Jon,

Here is my code....

if (is_method("INVITE")) {
    route(RELAY_TO_LRN);
}

route[RELAY_TO_LRN] {
$du = "sip:IP:PORT";
$T_fr_timeout=2;
t_on_failure("lrn_reply");
t_relay();
}

failure_route[lrn_reply] {
if (t_check_status("302")) {
                   $var(contact) = $hdr(Contact);
   xlog("SCRIPT:LRN:DBG: $var(contact) \n");
   $var(lrn_rpl) = $(var(contact){nameaddr.uri}{param.value,rn});
   xlog("SCRIPT:LRN:DBG:  $var(lrn_rpl) \n");
                   if ($var(lrn_rpl) == NULL || $var(lrn_rpl) == "") {
      $var(lrn_rpl) = $rU;
      xlog("SCRIPT:LRN:DBG: $rU is not ported \n");
   } else {
      xlog("SCRIPT:LRN:DBG: $rU translates to $var(lrn_rpl) \n");
      $rU = $var(lrn_rpl);
   }
}

...... continue the call ......
}


Please advice. 

Thanks
Uday.

On Fri, Dec 14, 2018 at 7:21 PM Jon Abrams <[hidden email]> wrote:
Uday, what do you currently have in your script for the LRN dip? What do you observe the script doing (or not doing) currently?

- Jon

On Fri, Dec 14, 2018 at 7:16 AM Uday kumar <[hidden email]> wrote:
Hello Everyone

I have a system developed in opensips to make outbound calls. Now trying to implement the LRN thing using sip invite with provider IP because USA have different rate based on LRN. 

Customer Call => OpenSIPs => LRN server. Once received response 302 from LRN server then send call to gateway. So OpenSIPs sending first Invite to LRN server to get LRN details and then sending to gateway to process call. 

I have followed below PDF for implementation but no success yet.


Please guide. 
--
Thanks & Regard
Uday.
Mobile:- +91-9377579349
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users


--
Thanks & Regard
Uday.
Mobile:- +91-9377579349
_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users

_______________________________________________
Users mailing list
[hidden email]
http://lists.opensips.org/cgi-bin/mailman/listinfo/users