[OpenSIPS-Users] how to make a phone call to between two different domain sip server

Michael Leung gbcbooksmj at gmail.com
Fri Nov 7 11:50:51 CET 2014


please give me some advice

On Thu, Nov 6, 2014 at 8:45 PM, Michael Leung <gbcbooksmj at gmail.com> wrote:

> HI all
>
> I Define the following regular expression in my first opensips1 domain
> config file
>
>     if ($tU =~"^3*") {
>
>         #strip(1);
>
>         if(!lookup("location")) {
>             if(!t_relay("udp:opensips2:5060")){
>
>             sl_send_reply("404", "User Offline/Not Found");
>             }
>         }
>    }
>
>
> and then Define another regular expression in my second opensips2 domain
> config file
>
>
>         if ($tU=~"^3*" && $fd != "opensips2") {
>
>                 if (!lookup("location")) {
>                         sl_send_reply("404", "User Offline/Not Found");
>                 } else {
>                         t_relay();
>                 }
>         }
>
> when i dial 30001 from 10001 at opensip1
>
> i got error from opensips1
>
>
> Nov  6 20:35:53 CDlinux /usr/local/opensips_proxy/sbin/opensips[25544]:
> ERROR:dialog:get_routing_info: failed to print route records
> Nov  6 20:35:53 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]:
> ERROR:core:print_rr_body: too many RR
> Nov  6 20:35:53 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]:
> ERROR:dialog:get_routing_info: failed to print route records
> Nov  6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]:
> ERROR:core:print_rr_body: too many RR
> Nov  6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]:
> ERROR:dialog:get_routing_info: failed to print route records
> Nov  6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]:
> ERROR:core:print_rr_body: too many RR
> Nov  6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25545]:
> ERROR:dialog:get_routing_info: failed to print route records
> Nov  6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25547]:
> ERROR:core:print_rr_body: too many RR
> Nov  6 20:36:49 CDlinux /usr/local/opensips_proxy/sbin/opensips[25547]:
> ERROR:dialog:get_routing_info: failed to print route records
>
> i did not figure out what wrong it is going. what does RR mean,
>
> do any module i miss to compile or load ?
>
> thanks
>
> Michael
>
>
>
> On Thu, Nov 6, 2014 at 6:23 PM, Michael Leung <gbcbooksmj at gmail.com>
> wrote:
>
>> Hi SamyGo
>>
>> My Objective is to understand how sip work
>> you said that is the easiest way of how to route a call automatic , so do
>> you have a better way to do that ?
>>
>> i want a more smart scheme to actualize dynamic routing.
>>
>> On Mon, Nov 3, 2014 at 12:33 AM, SamyGo <govoiper at gmail.com> wrote:
>>
>>> Hi Michael,
>>>
>>> If you HAVE to register two phones at two different OpenSIPS with
>>> different domains then there are few ways to do it. I'll go with the easy
>>> one.
>>>
>>> 1 - Static call routing
>>> Define a regular expression in both OpenSIPS to dial to the other
>>> OpenSIPS if the dialled destination number has certain prefix in front of
>>> it and vice-versa.
>>> i.e calls From 4135 at OpenSIP1.your1st-domain.com  to 94135 will route to
>>> OpenSIPS2.your2nd-domain.com ;
>>> At your OpenSIPS2 in the config file you've to use regexp that anything
>>> having a 9 in prefix and Not from myself  then strip off prefix 9,
>>> do a lookup("location") search for online user and t_relay the call to
>>> it.
>>>
>>> if ($tU =~ "^9*" && $fd != "OpenSIPS2.your2nd-domain.com" ) {
>>> #Above detects if it has a 9 prefix and call is not coming from my own
>>> users
>>>
>>>     strip(1);
>>>
>>>     if(!lookup("location") {
>>> #above condition will lookup user if it is registered, if Not then
>>> return below message.
>>>           sl_send_reply("404", "User Offline/Not Found");
>>>     } else {
>>> #If user is found then relay the call to it.
>>>      t_relay();
>>>     }
>>>
>>> }
>>>
>>>
>>> That is the easiest and static way of how you can do it. Why do you need
>>> to use OpenSIPS for this? what exactly are your objectives ?
>>> Hope this helped you understand a bit.
>>>
>>>
>>> BR,
>>> Sammy
>>>
>>> On Fri, Oct 31, 2014 at 7:13 AM, Michael Leung <gbcbooksmj at gmail.com>
>>> wrote:
>>>
>>>> Hi all
>>>>
>>>> i know this is a stupid question
>>>>
>>>> but i dont use sip to make a phone call very often ,
>>>>
>>>> i have setup up two opensips server in my intranet environment
>>>>
>>>> i use two phones to register on each server
>>>>
>>>> how to make a phone call from one to another one
>>>>
>>>> do i have to add the the destination domain name behind the alias
>>>> number when i dial out ?
>>>>
>>>> or why can i dial the alias number without domain name , then the
>>>> opensips server will routing it to a the opensips server automatically
>>>>
>>>>
>>>> thanks
>>>>
>>>> Michael
>>>>
>>>> _______________________________________________
>>>> 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/20141107/58a65567/attachment-0001.htm>


More information about the Users mailing list