[asterisk-users] Dial() using full SIP account details

Martin Lima ra25 at atlas.cz
Sun Mar 19 11:41:15 CDT 2017


> Incidentally, I do know I can put a Register statement into sip.conf, and
> then be able to use the Dial() application just using the username (and
> this works), however I need a solution which can support two or more
> accounts at different remote providers having the same username.

You can define all your remote providers in sip conf:

[Provider1]
type=peer
host=provider1.tld
defaultuser=yourusername
fromuser=yourusername
secret=yourverysecretpassword

[Provider2]
type=peer
host=provider2.tld
defaultuser=yourusername
fromuser=yourusername
secret=yourverysecretpassword

And then use Dial(Sip/Provider1/callednumber)
No registration should be neccessary in this case unless you want to receive 
calls as well. (you will need to change type to friend too in this case...)

Martin
> 
> Therefore the username alone will not be unique, but the combination of
> username + password + server name will be, hence the reason why I would need
> to use this in the dialplan.
> 
> 
> If anyone can offer suggestions on how to use the full SIP credentials in a
> Dial() statement, and also how to escape special characters such as ! I
> would be very grateful.
> 
> 
> Thanks,
> 
> 
> Antony.




More information about the asterisk-users mailing list