Thanks that worked. One question though the IP registered to asterisk shows the openips IP address is there any way to show the correct IP of the device or does it always have to go to the opensips ip
-----Original Message----- From: users-boun...@lists.opensips.org on behalf of Laszlo Sent: Thu 22/04/2010 21:42 To: OpenSIPS users mailling list Subject: Re: [OpenSIPS-Users] opensips forward register 2010/4/22 Laszlo <las...@voipfreak.net> > > > 2010/4/22 dcomms <i...@dcomms.net> > > >> Hi, >> I have configure the load balancer as per opensips >> http://www.opensips.org/Resources/DocsTutLoadbalancing >> >> My question is how can i forward registration requests to asterisk. What >> am >> i doing wrong >> >> Thanks >> >> >> if (is_method("REGISTER")) { >> # authenticate the REGISTER requests >> if (!www_authorize("", "subscriber")) { >> www_challenge("", "0"); >> exit; >> } >> >> if (!db_check_to()) { >> sl_send_reply("403","Forbidden auth ID"); >> exit; >> } >> >> # auth done -> send it to registrar >> consume_credentials(); >> # rewritehostport("192.168.10.2:5060"); >> >> if (!save("location")) { >> log(1,"Location Error\n"); >> sl_reply_error(); >> }; >> >> >> log(1,"Trying to Save location\n"); >> >> >> t_relay(); >> >> exit; >> } >> >> >> >> > > Something like this: > > > if (is_method("REGISTER")) { > # authenticate the REGISTER requests > if (!www_authorize("", "subscriber")) { > www_challenge("", "0"); > exit; > } > > if (!db_check_to()) { > sl_send_reply("403","Forbidden auth ID"); > exit; > } > > # auth done -> send it to registrar > consume_credentials(); > $du="sip:192.168.10.2:5060"); > made a mistake here. correctly it's: $du = "sip:192.168.10.2:5060"; t_relay(); > exit; > } > >
<<winmail.dat>>
_______________________________________________ Users mailing list Users@lists.opensips.org http://lists.opensips.org/cgi-bin/mailman/listinfo/users