[OpenSIPS-Users] Opensips as outbound proxy for asterisk client
Laszlo
laszlo at voipfreak.net
Sat Jul 24 20:28:20 CEST 2010
You can relay the register to sipgate, so when auth is done, then you can
forward it.
consume_credentials();
$du = "sip:sipgate_ip_goes_here:port";
t_relay();
exit;
so instead of doing if (!save("location")) etc
-Laszlo
2010/7/24 Nauman Sulaiman <nauman762-home at yahoo.co.uk>
> Hi, We have Asterisk 1.6.2.9 and Opensips 1.6.2 in the same Linux box and
> we want
> to have OpenSIPS as the out/inbound proxy for Asterisk when running as UAC.
>
>
> We have Asterisk registered with Sipgate ok when sending REGISTER directly
> to the Sipgate
> domain but would like to send the Register via OpenSIPS so it's in the path
> for incoming invites
>
> Opensips.cfg as follows
>
> listen=udp:192.168.0.20:5060
>
> register code: we have removed the authentication for now to get this
> working first
>
> if (is_method("REGISTER"))
> {
>
> if (!db_check_to())
> {
> sl_send_reply("403","Forbidden auth ID");
> exit;
> }
>
> if (!save("location"))
> sl_reply_error();
>
> exit;
> }
>
>
>
>
> we have astersik sip.conf file as follows
>
> [general]
> port=5062
> bindaddr=0.0.0.0
> context=default
> outboundproxy=192.168.0.20
> outboundproxyport=5060
>
> register => username:secret at sipgate.co.uk/username
>
> [username]
> type=friend
> context=incoming
> username=username
> secret=secret
> host=sipgate.co.uk
> host=dynamic
> fromdomain=sipgate.co.uk
> insecure=port,invite
> nat=yes
> disallow=all
> allow=alaw
> canreinvite=no
>
> However the REGISTER messages are sent by Astersik but ther is no response
> fron OpenSIPS and it is not routing them either . Is it because they are
> both on the same IP?
> We do have then on different ports so though it would be ok
>
>
>
> _______________________________________________
> 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/20100724/ce07d47a/attachment.htm
More information about the Users
mailing list