Usercode/password per call on SIP trunk?

Hi

I would like to vary the usercode/password on every call via a SIP trunk. Essentially, I have many extensions sharing a single SIP trunk to a SIP provider. Rather than using a single usercode/password to authenticate the trunk to the SIP provider, I would like to use the usercode password of each extension as the authenticating pair for the SIP trunk.

Can anyone think how to do this within the FreePBX macro structure?

Regards

Peter

You can’t.

However, you can use PIN Sets to set a bunch of PINS, then enable PIN set in the Outbound Route setup.

Mikael

I know how to use pinsets - the purpose of my question was not to ask for a usercode/password from the user before placing the call on the trunk, but to use the extension/secret as user:password on the trunk so that the upstream SIP provider bills the call to the extension.

The Asterisk Dial command provides for this functionality - Dial(SIP/user:[email protected]/$OUTNUM$,60,flags). I am happy to code this functionality into a custom file, but I would like it to remain integrated into the FreePBX structure for CDR and other reasons.

Should I recode [macro-dialout-trunk], or is there an easier way of integration?

Peter

I wonder how I run the ROUTER PASSWORD in OUTBOUND ROUTES?
Using multiple routes and several extensions, some need to make calls for specific routes, as I put the password in the OUTBOUND ROUTES ACCOUNT CODE and extension.

When I call the extension with the password it does not use this route but the first on the list, it is missing some configuration?