[OpenSIPS-Users] Trunking Calls Onward

Richard Revels rrevels at bandwidth.com
Sat May 1 19:11:20 CEST 2010


Pretty sure I must be missing something here but when you do the alias_db_lookup, the destination host and port will already be set to whatever you set the domain column to in the dbaliases table.  Just call t_relay() and it goes.

As Adrian mentioned, there are a ba-zillion ways to do this.  You might look at the drouting module if a one-to-one lookup is not what you are after.  Also, you mention you send some extra headers to asterisk to let it determine where to send the call.  I'm going to assume by that point you already know the IP and port you want to send to so why not just do $rd=IPTOSENDTO; $rp=PORTTOSENDTO; ?  These will accept AVP's as arguments.

http://www.opensips.org/Resources/DocsCoreVar16#toc56

http://www.opensips.org/Resources/DocsCoreVar16#toc61


Richard


On May 1, 2010, at 5:10 AM, Mike O'Connor wrote:

> Hi Adrian
> 
> I've tried a good number of them, the only method I've been able to
> working is to send the calls to Asterisk at a static locations using
> sethostport.
> 
> There does not seem to be a function which can rewrite the destination
> host/port from with in the opensips config file using a call like this.
> sethostport($avp(s:calltrunk));
> Maybe there is but I've been reading the docs for a while now and can
> not find one.
> 
> I currently use alias_db_lookup to find a local service number then a
> avp_db_load to find if the call should be forwarded. I then test and
> then forward the call to Asterisk with some extra headers which tell
> asterisk where to send the call.
> 
> There just has to be a simpler way.
> 
> Thanks for you time
> Mike
> 
> 
> 
> On 1/05/10 6:28 PM, Adrian Georgescu wrote:
>> Mike,
>> 
>> There are infinite ways to do what you asked for. My suggestion is  
>> just one of them.
>> 
>> Adrian
>> 
>> 
>> On May 1, 2010, at 10:54 AM, Mike O'Connor wrote:
>> 
>> 
>>> So there is no way for me to read from a db and rewrite the sip host  
>>> and
>>> port ?
>>> 
>>> Mike
>>> 
>>> On 1/05/10 4:35 PM, Adrian Georgescu wrote:
>>> 
>>>> You could use ENUM to translate SIP URIs to a particular outside peer
>>>> and use trusted peers table to match incoming calls.
>>>> 
>>>> Then you only need to add ENUM numbers in your DNS database and  
>>>> trusted
>>>> peers in your proxy database, no need to configure much in OpenSIPS
>>>> beside doing ENUM lookup and checking the trusted table.
>>>> 
>>>> 
>>>> On Sat, 2010-05-01 at 16:28 +0930, Mike O'Connor wrote:
>>>> 
>>>> 
>>>>> Hi All
>>>>> 
>>>>> I have a need to forward calls onward for a range of DID's, but the
>>>>> other end is not going to Register. I think this is called trunking.
>>>>> 
>>>>> I need to be able to configure the DID's and the ip/port there  
>>>>> being on
>>>>> forwarded too.
>>>>> What methods should I use to do this ?
>>>>> 
>>>>> I've look at a number of options but the issue is that for the  
>>>>> functions
>>>>> like 'seturi' do not allow variables only static strings.
>>>>> 
>>>>> Thanks
>>>>> Mike
>>>>> 
>>>>> _______________________________________________
>>>>> Users mailing list
>>>>> Users at lists.opensips.org
>>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>>> 
>>>>> 
>>>>> 
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opensips.org
>>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>>> 
>>>> 
>>> 
>>> _______________________________________________
>>> Users mailing list
>>> Users at lists.opensips.org
>>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>>> 
>>> 
>> 
>> _______________________________________________
>> Users mailing list
>> Users at lists.opensips.org
>> http://lists.opensips.org/cgi-bin/mailman/listinfo/users
>> 
> 
> 
> _______________________________________________
> Users mailing list
> Users at lists.opensips.org
> http://lists.opensips.org/cgi-bin/mailman/listinfo/users




More information about the Users mailing list