Hi all and thanks for support.
I’ve an asterisk box connected to a cloud VOIP provider. The provider give me un EXTENSION and i connect my asterisk at this extension.
All call that are routed to this extension are handled and run a PHPAgi script (webcall to a web portal).
All work good and mine config is this:
/etc/asterisk/sip_custom_post.conf
register => user:password@dominio.sotto.livello.com
[user]
type=friend
secret=password
username=user
host=dominio.sotto.livello.com
port=5060
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
insecure=port,invite
fromdomain=dominio.sotto.livello.com
context=from-pippo
/etc/asterisk/extensions_custom.conf
[from-pippo]
exten => _.,1,AGI(pippo.php)
exten => _.,n,Wait(60)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
All works fine and mine script was run correctly.
Now, i must connect a second EXTENSION to mine asterisk box and with this second extension i must run a different php script
I think to configure all like this:
/etc/asterisk/sip_custom_post.conf
register => user:password@dominio.sotto.livello.com
register => user1:password1@dominio.sotto.livello.com
[user]
type=friend
secret=password
username=user
host=dominio.sotto.livello.com
port=5060
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
insecure=port,invite
fromdomain=dominio.sotto.livello.com
context=from-pippo
[user1]
type=friend
secret=password1
username=user1
host=dominio.sotto.livello.com
port=5060
dtmfmode=rfc2833
canreinvite=no
disallow=all
allow=ulaw
allow=alaw
allow=gsm
insecure=port,invite
fromdomain=dominio.sotto.livello.com
context=from-pluto
/etc/asterisk/extensions_custom.conf
[from-pippo]
exten => _.,1,AGI(pippo.php)
exten => _.,n,Wait(60)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
[from-pluto]
exten => _.,1,AGI(pluto.php)
exten => _.,n,Wait(60)
exten => h,1,Hangup
exten => i,1,Hangup
exten => t,1,Hangup
If i configure like i say, the 2 extension are “registered” in my asterisk, all call are answered regurarly at one extension and at second extension, but all the call are handled with “from-pippo” context so all execute “pippo.php” script.
Any idea about what i make wrong?
Thanks.
Mauro.