Pass through SIP Trunk no Auth

Hi all !!
Pretty new to asterisk so excuse my ignorance on some things :slight_smile:
I have a simple but very specific scenario.
I want the call to come in from a Trunk to Asterisk, Asterisk to only generate a new call ID ,
with the same elements ( nto change the From or TO at all ) but a different Call-ID and send it back where it came from.
No Authentication no nothing, just a trunk with Domain Name (not IP) and setup as a Proxy (host=[SBC IP]) the source where it came from (with a domain name, not ip).
In my mind, it will need 1 trunk for incoming and outgoing (type=peer) and 1 outbound rule with ANY ANY, nothing else.
Basically, I need the SIP Engine of Asterisk.
Customer Trunk (FROM) >> Load Balancer >> Asterisk >> Load Balancer >> Destination Trunk (TO)

Any config example would be highly appreciated!!! :slight_smile:

You’re not going to be able to preserve the To and From or lots of other elements. Asterisk isn’t a proxy. It’s a B2BUA and each call leg is different.

yes, I can understand this but if the FROM and TO are not touched, theoretically it will be kept the same.
I think FreePBX can do this, I just do not want to use GUI and I want a light and pure sip engine.

No, they’ll most likely be different. Some aspects of them preserved potentially - display name and user in the case of From - but not exactly the same.

If you truly want to there are sample configs for PJSIP for different scenarios[1]. Looking at them and taking the time to understand what the different parts do would be needed.

[1] res_pjsip Configuration Examples - Asterisk Project - Asterisk Project Wiki

The To URI is not passed through the Asterisk backbone, and, in fact the current SIP channel driver cannot set it to anything other than the same as the request URI (give or take the effects of source routing). (The dialplan can access it, but only by using the ability to read arbitrary headers.)

Asterisk takes the user part, only, of the request URI, and treats that as the Asterisk extension. The dialplan normally just supplies some derivative of that to outgoing side, which uses it as part of the outgoing request URI and To header, although it is possible for the dialplan to obtain the incoming request URI domain and to set the request URI domain on outgoing calls.

The user part of the From URI is used to form the caller ID, by default, and the display name part, the caller name, but there is no way, as far as I know of controlling the outbound domain part.

This is only an option on the obsolete, chan_sip, driver, which has been completely removed from the working copy of the source code which will produce this year’s release of Asterisk.

1 Like

Hi David, I saw this from here " Asterisk as B2BUA between OpenSIPS and SBN " where you also responded to that forum :slight_smile:
The Request Line URL and the TO in most cases is the same (difficult to be different but possible).
I mainly care for the UserPart and the HostPart to remain untouched so the call will eventually arrive at the proper destination.

I don’t understand why a new call ID or even a new branch ID is needed, especially given that this seems to be an application for a proxy, not a PABX.

Ideally the load balancing proxy would do the routing.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.