[asterisk-users] Multiple user registration ...
Mauro Sergio Ferreira Brasil
mauro.brasil at tqi.com.br
Tue Sep 1 07:00:53 CDT 2009
Thanks a lot Faheem for you help.
I totaly understand now the approach you've used.
It's very interesting and inventive for sure.
I didn't know that I could append "IP:Port" info on user when using the
"Dial" command and that this will make calling to two different devices
registered using same user work.
With this little but extemelly important peace of information you gave
me the answer to our questions here.
Thanks again, and best regards,
Mauro.
Faheem escreveu:
> The purpose of Perl script is to store user registrations records only
> and nothing else regarding call dialing.
>
> The script will main records like this.
> User1:
> IP1: 192.168.0.100 Por1: 5060
> IP2: 69.30.21.10 Port2: 5060
>
> User2:
> IP1: 192.168.10.1 Por1: 5060
> IP2: 192.168.10.1 Por2: 5061
>
> User3:
> IP1: 192.168.10.121 Por1: 5060
> IP2: 192.168.10.123 Por2: 5061
>
>
>
> and so on....
>
> No it all depends on you to store these information on files or database.
> Assume you have stored IP/Ports in the database.
>
> Database=cloneline
> Table = users(username,ip1,port1,ip2,port2)
>
> For dialing:
> Assume username=user1 and extension =123456
> exten=> 123456,1,NoOp()
> exten=> 123456,n,MYSQL(Connect connid 'localhost' cdr dbpass cloneline)
> exten=> 123456,n,NoOP(Connection ID:${connid})
> exten=> 123456,n,MYSQL(Query resultid ${connid} SELECT\ ip1\, port1\,
> ip2\, port2\, status\ from\ users\ where\ username="user1" )
> exten=> 123456,n,MYSQL(Fetch fetchid ${resultid} ip1 port1 ip2 port2)
> exten=> 123456,n,Dial(SIP/user1@${ip1}:${port1}&SIP/user1@${ip2}:${port2})
>
>
> for dialing user3
> username=user3 and extension =112233
> exten=> 112233,1,NoOp()
> exten=> 112233,n,MYSQL(Connect connid 'localhost' cdr dbpass cloneline)
> exten=> 112233,n,NoOP(Connection ID:${connid})
> exten=> 112233,n,MYSQL(Query resultid ${connid} SELECT\ ip1\, port1\,
> ip2\, port2\, status\ from\ users\ where\ username="user3" )
> exten=> 112233,n,MYSQL(Fetch fetchid ${resultid} ip1 port1 ip2 port2)
> exten=> 112233,n,Dial(SIP/user3@${ip1}:${port1}&SIP/user3@${ip2}:${port2})
>
> Hope every thing would be clear...
>
> Muhammad Faheem
> Software Engineer
> AxVoice Inc.
> 307,Y Commercial,
> DHA Lahore, Pakistan
> +92-333-4793314
> http://www.axvoice.com
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> -- Bandwidth and Colocation Provided by http://www.api-digital.com --
>
> AstriCon 2009 - October 13 - 15 Phoenix, Arizona
> Register Now: http://www.astricon.net
>
> asterisk-users mailing list
> To UNSUBSCRIBE or update options visit:
> http://lists.digium.com/mailman/listinfo/asterisk-users
--
__At.,
_
*Technology and Quality on Information*
Mauro Sérgio Ferreira Brasil
Coordenador de Projetos e Analista de Sistemas
+ mauro.brasil at tqi.com.br <mailto:@tqi.com.br>
: www.tqi.com.br <http://www.tqi.com.br>
( + 55 (34)3291-1700
( + 55 (34)9971-2572
More information about the asterisk-users
mailing list