[asterisk-users] splitting sip.conf to two files

2010-02-19 Thread Joseph
Is it possible to split sip.conf into two files (sip1.conf sip2.conf)?

I have an Audiocodes gateway with two FXO ports, and (according to info I 
received, and it appears to be correct) Asterisk find the peers based on their 
IP 
and not on their IP+PORT. Thus, Audiocodes with two FXO ports registered on the 
same devices (= one single IP with different SIP ports), the last entry
into my sip.conf file is taken into consideration = all calls are sent to the 
context of that last extension.

So I can only use one context for incoming calls. If I split the sip.conf 
into two files will it make any difference.

Is it a limitation/bug in Asterisk or sip.conf?

-- 
Joseph

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] splitting sip.conf to two files

2010-02-19 Thread Danny Nicholas
I think sip.conf will allow the inclusion of a second (or greater) sip2.conf
file.  This might only apply to extensions.conf, but I'm betting all .conf
files are processed with the same parser.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Joseph
Sent: Friday, February 19, 2010 10:22 AM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] splitting sip.conf to two files

Is it possible to split sip.conf into two files (sip1.conf sip2.conf)?

I have an Audiocodes gateway with two FXO ports, and (according to info I
received, and it appears to be correct) Asterisk find the peers based on
their IP 
and not on their IP+PORT. Thus, Audiocodes with two FXO ports registered on
the same devices (= one single IP with different SIP ports), the last entry
into my sip.conf file is taken into consideration = all calls are sent to
the context of that last extension.

So I can only use one context for incoming calls. If I split the sip.conf
into two files will it make any difference.

Is it a limitation/bug in Asterisk or sip.conf?

-- 
Joseph

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] splitting sip.conf to two files

2010-02-19 Thread Joseph
I'm suspecting you might be correct; so it will not make much difference. 

--
Joseph

On 02/19/10 10:29, Danny Nicholas wrote:
I think sip.conf will allow the inclusion of a second (or greater) sip2.conf
file.  This might only apply to extensions.conf, but I'm betting all .conf
files are processed with the same parser.

-Original Message-
From: asterisk-users-boun...@lists.digium.com
[mailto:asterisk-users-boun...@lists.digium.com] On Behalf Of Joseph
Sent: Friday, February 19, 2010 10:22 AM
To: asterisk-users@lists.digium.com
Subject: [asterisk-users] splitting sip.conf to two files

Is it possible to split sip.conf into two files (sip1.conf sip2.conf)?

I have an Audiocodes gateway with two FXO ports, and (according to info I
received, and it appears to be correct) Asterisk find the peers based on
their IP
and not on their IP+PORT. Thus, Audiocodes with two FXO ports registered on
the same devices (= one single IP with different SIP ports), the last entry
into my sip.conf file is taken into consideration = all calls are sent to
the context of that last extension.

So I can only use one context for incoming calls. If I split the sip.conf
into two files will it make any difference.

Is it a limitation/bug in Asterisk or sip.conf?


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] splitting sip.conf to two files

2010-02-19 Thread Tzafrir Cohen
On Fri, Feb 19, 2010 at 09:21:46AM -0700, Joseph wrote:
 Is it possible to split sip.conf into two files (sip1.conf sip2.conf)?
 
 I have an Audiocodes gateway with two FXO ports, and (according to info I 
 received, and it appears to be correct) Asterisk find the peers based on 
 their IP 
 and not on their IP+PORT. Thus, Audiocodes with two FXO ports registered on 
 the same devices (= one single IP with different SIP ports), the last entry
 into my sip.conf file is taken into consideration = all calls are sent to 
 the context of that last extension.
 
 So I can only use one context for incoming calls. If I split the sip.conf 
 into two files will it make any difference.
 
 Is it a limitation/bug in Asterisk or sip.conf?

I assume you use '#include to separate sip.conf to two files. #include
is a verbatim inclusion, and thus for all prictical purposes it is the
same as if everything were in a single file.

Configuration [sections] cannot be repeated in the Asterisk
configuration files. If you want to add later on anything to [foo], you
can't just add a second [foo] . Rather, you should add:

[foo](+)

This will add the content of that section after the content of the
existing section [foo].

See http://svn.digium.com/svn/asterisk/trunk/doc/tex/configuration.tex
(Any better direct link?)

-- 
   Tzafrir Cohen
icq#16849755  jabber:tzafrir.co...@xorcom.com
+972-50-7952406   mailto:tzafrir.co...@xorcom.com
http://www.xorcom.com  iax:gu...@local.xorcom.com/tzafrir

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] splitting sip.conf to two files

2010-02-19 Thread Edwin Lam
Joseph wrote:
 Is it possible to split sip.conf into two files (sip1.conf sip2.conf)?
 
 I have an Audiocodes gateway with two FXO ports, and (according to info I 
 received, and it appears to be correct) Asterisk find the peers based on 
 their IP 
 and not on their IP+PORT. Thus, Audiocodes with two FXO ports registered on 
 the same devices (= one single IP with different SIP ports), the last entry
 into my sip.conf file is taken into consideration = all calls are sent to 
 the context of that last extension.
 
 So I can only use one context for incoming calls. If I split the sip.conf 
 into two files will it make any difference.

there might be an include directive in sip.conf (i can't confirm)
however Asterisk will see it as one big sip.conf so it will do
absolutely nothing for you in this situation.

what you can do is setup automatic dial to different extensions on
the 2 ports on audiocodes.

-- 
Edwin Lam edwin@officegeneral.com
Systems Engineer, Office General, Inc.
Ph: +1 415 439 4988 Fax: +1 415 283 3370
http://pgpkeys.mit.edu:11371/pks/lookup?op=getsearch=0xD6506D20


-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users


Re: [asterisk-users] splitting sip.conf to two files

2010-02-19 Thread Joseph
On 02/19/10 18:38, Edwin Lam wrote:

 So I can only use one context for incoming calls. If I split the sip.conf 
 into two files will it make any difference.

there might be an include directive in sip.conf (i can't confirm)
however Asterisk will see it as one big sip.conf so it will do
absolutely nothing for you in this situation.

what you can do is setup automatic dial to different extensions on
the 2 ports on audiocodes.

I already have setup automatic dialing, it does noting. 

But the solution might be to specify different port number in the Tel to IP 
routing table, and setup sip.conf entries to listen on these ports.
Calls coming from Trunk Group 1 are to be sent on port 5065, and all calls 
coming from Trunk Group 2 will be sent on Trunk Group 5066.  
It will take two routing table entries to do this.

-- 
Joseph

-- 
_
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

asterisk-users mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/asterisk-users