Howto: Multiple registrations from same provider?
Hi! I'm trying to config my asterisk for multiple registrations from same provider.
I have 2 numbers from same service, "serviceip.com", with username "aaaa" and "bbbb" and password "xxxx" and "yyyy" and phone number "1234-5678" and "1234-6789"
i have two context "[contexta]" and "[contextb]"
i also have multiple extensions in both contexts.
i wish that when someone calls to "1234-5678" the call be redirected to extension "s" on "[contexta]" and when someone calls to "1234-6789" the call be redirected to extension "s" on "[contextb]"
also, when some extension in "[contexta]" dials a number (like 8243-2732) the call uses the right registry (user aaaa)
right now i can do this with only one registry, but when i activate both of them, then nothing works, no in calls, no out calls, only calls between extensions of the same context.
in sip.conf i have this:
register => aaaa:xxxx@serviceip.com/99900
register => bbbb:yyyy@serviceip.com/99901
[myphone]
context=contexta
type=friend
host=dynamic
mailbox=myextensionnumber
username=myphone
secret=****
qualify=yes
callerid="My Name" <myextensionnumber>
nat=yes
canreinvite=yes
[myotherphone]
context=contextb
type=friend
host=dynamic
mailbox=myotherextensionnumber
username=myotherphone
secret=****
qualify=yes
callerid="My Name" <myotherextensionnumber>
nat=yes
canreinvite=yes
and on extensions.conf
[default]
exten => 99900,1,Goto(contexta,s,1)
exten => 99901,1,Goto(contextb,s,1)
on [contexta] and [contextb] i have the "demo" context that comes with asterisk, only copied it and changed the context name to contexta and contextb
|