[OpenSIPS-Users] Opensip SIP Trunk authentication issue

Satish Patel satish.txt at gmail.com
Sat Aug 23 20:21:17 CEST 2014


Now i am seeing other issue, My opensip is registered to up stream SIP
provide Trunk using UAC but now if i call outside my Opensips sending
INVITE to SIP Provide and SIP provider sending back 407 Proxy Auth
challenge and and my Opensips sending ACK 200 to SIP provide and then
Opensips sending 407 Auth proxy challenge to my SIP phone.. that is very
strange..

How do i solve this problem? I want my Opensip behave like B2BU, i don't
want it to be proxy so sending message from here to there..   Anyone have
any suggestion or am i doing something wrong? following is my Senior.


[SIP_phone] ------------->[Opensips]--------------->[SIP Provider]


On Fri, Aug 22, 2014 at 7:21 AM, Satish Patel <satish.txt at gmail.com> wrote:

> I think you got it right, thanks a lot.
>
> Sent from my iPhone
>
> On Aug 22, 2014, at 5:02 AM, Răzvan Crainea <razvan at opensips.org> wrote:
>
> Hi, Satish!
>
> The problem is that in your route[3] you are not relaying the request. You
> just change the URI and exit. You should call t_relay() just before the
> exit statement.
>
> Best regards,
>
> Răzvan Crainea
> OpenSIPS Solutionswww.opensips-solutions.com
>
> On 08/21/2014 11:56 PM, Satish Patel wrote:
>
>    We have opensip running with multidomain authentication, now we have
> purchases SIP trunk from provide to send call to put side country (PSTN)
>
>  They gave me Username/Password and IP address of their SIP server
>
>  I have did following configuration to configure my opensip as UAC
>
> #### Opensips UAC
> loadmodule "uac_auth.so"
> loadmodule "uac_registrant.so"
> modparam("uac_registrant", "hash_size", 2)
> modparam("uac_registrant", "timer_interval", 100)
> modparam("uac_registrant", "db_url", "mysql://opensips:opensipsrw@localhost
> /opensips")
> modparam("uac_registrant", "table_name", "registrant")
>
>
>  My Opensip successfully register on their Trunk
>
> # opensipsctl registrant dump
> AOR:: sip:testtrunk at 65.xxx.xxx.xxx:5065 expires=300
>         state:: REGISTERED_STATE
>         last_register_sent:: Fri Aug 22 02:18:14 2014
>         registration_t_out:: Fri Aug 22 02:21:35 2014
>         registrar:: sip:65.xxx.xxx.xxx.xxx:5065
>         binding:: sip:testtrunk at 65.xxx.xxx.xxx:5065
>         dst_IP:: IPv4 ip=xxx.xxx.xxx.xxx
>
>
>  Now big question is how do i use this trunk in my routing script, After
> google i came up with following configuration but it is not working, It is
> not rewriting host part.
>
>  # account only INVITEs
>         if (is_method("INVITE")) {
>
>                 setflag(ACC_DO); # do accounting
>                 $avp(can_uri) = $ru;
>
>                       };
>
>         }
>         # PSTN Testing
>         if  ( uri=~"^sip:16465352727 at .*" <%5Esip:16465352727 at .*>) {
>         route(3);
>         exit;
>         };
>
> ...
> ...
>  route[3] {
>
> if (method=="INVITE")
>  {
>   if (uri=~"^sip:16465352727 at .*" <%5Esip:16465352727 at .*>) {
>
>         rewritehostport("65.xxx.xxx.xxx:5065");
>         xlog("Redirecting to SIP Provider.. $ru\n");
>     exit;
>   };
> };
> }
>
>
>
>
> _______________________________________________
> 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/20140823/a08faab9/attachment-0001.htm>


More information about the Users mailing list