[OpenSIPS-Users] Opensip SIP Trunk authentication issue
Răzvan Crainea
razvan at opensips.org
Fri Aug 22 11:02:46 CEST 2014
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 Solutions
www.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 .*") {
> route(3);
> exit;
> };
>
> ...
> ...
> route[3] {
>
> if (method=="INVITE")
> {
> if (uri=~"^sip:16465352727 at .*") {
>
> rewritehostport("65.xxx.xxx.xxx:5065");
> xlog("Redirecting to SIP Provider.. $ru\n");
> exit;
> };
> };
> }
>
>
>
>
> _______________________________________________
> 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/20140822/ee14dfdf/attachment.htm>
More information about the Users
mailing list