[OpenSIPS-Users] With OpenSIPS-CP how to make a sip trunk between two opensips

Trevor Steyn trevor at webon.co.za
Tue Aug 4 21:05:57 CEST 2015


HI Kevin.

You have already added the ips to be trusted so all that needs to be
done is the routing it depends how you want to do it but simplest from
opensips-CP is probably the drouting module you can use prefix match to
route to other sip server,

On sip server 1 you would add a gateway in the dr_gatway table with the
ip of the sip server 2

and add a rule like the following

*************************** 1. row ***************************
     ruleid: 1
    groupid: 1
     prefix: 2000
    timerec:
   priority: 0
    routeid:
     gwlist: your_sip_server_2
      attrs:

DB Layout: http://www.opensips.org/html/docs/db/db-schema-devel.html#AEN3101
Drouting Module:
http://www.opensips.org/html/docs/modules/2.1.x/drouting.html

Regards
Trevor Steyn


On 23/07/2015 20:36, Kevin Kokos wrote:
> Hi All,
>
> First of all, i'm a noob in the sip environment, network and even more
> in opensips so please excuse my lack of accuracy/knowledge.
> Here is my goal, in a test purpose (yes it can be weird), i have the
> following installation:
>
> SIP client (1000, registered on OpenSips 1) ------- OpenSips 1
> (192.168.1.1) ----------- Opensips 2 (192.168.1.2) -------SIP client
> (2000, registered on OpenSips 2)
>
> The goal is for sip_client with account 1000 to be able to call
> sip_client with account 2000.It should be easy to do but i can't
> manage to configure it.
>
> Each OpenSips can be managed by Opensips-cp.
>
> From what i read, i saw the following step to do:
> -In the IP Auth tab, add the other sip server ip address in order to
> be trusted.
> =>Both of sip server should be allowed to talk to each other. Is it
> enough for linking the two sip servers?
> -Make a dialplan. Use a prefix, create a dialplan which regex for
> identifying the prefix in the sip uri and add the ip address of the
> other sip server.
> =>Let's choose 66 prefix for the Opensips 2 area. In dialing 661000
> from sip client 2000, we can have something like that for the
> dialplan: matching regex: ^661000[0-9].* Matching flags 0 Substitution
> regex (66100[0-9])@.*(;.*) Replacement expression sip:\1 at 192.168.1.1
> <mailto:1 at 192.168.1.1>
> -Make a dynamic routing. Give the other sip server ip address and
> strip the prefix.
> In that case: Address: 192.168.1.1 Strip 2 PRI Prefix #66
>
> Same thing in the opposite way on the other sip server.
>
> Someone could explain to me where i am wrong and/or maybe redirect me
> to a tutorial for dummies (wasn't able to find anything i understand
> in googling...maybe lake of good keyword....) ? Thank you in advance.
>
> Kevin
>
>
>
>
> _______________________________________________
> 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/20150804/c6de58ec/attachment.htm>


More information about the Users mailing list