Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk - pstn, but decided to keep it all within ser). This is fine, because asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Can your gateway strip digits? If so use translation rules to strip the prefix from the called party number.
Iqbal wrote:
Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk
- pstn, but decided to keep it all within ser). This is fine, because
asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
but wouldnt that then be avoiding the mapping of 0845xxx to 040600 instead, i.e bypassing it,
Steve Blair wrote:
Can your gateway strip digits? If so use translation rules to strip the prefix from the called party number.
Iqbal wrote:
Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk
- pstn, but decided to keep it all within ser). This is fine, because
asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Maybe. I'm getting lost in what you are trying to accomplish. I thought you wanted an inbound call through the gateway to the asterisk box to be presented with a called party number of 040600 extracted from 08450040600. If this isn't the case then please ignore my suggestion :-)
-Steve
Iqbal wrote:
but wouldnt that then be avoiding the mapping of 0845xxx to 040600 instead, i.e bypassing it,
Steve Blair wrote:
Can your gateway strip digits? If so use translation rules to strip the prefix from the called party number.
Iqbal wrote:
Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk - pstn, but decided to keep it all within ser). This is fine, because asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
well kind of :-)
the 040600 (alias) is getting picked up, because the 0845 is routing there, and the call goes through, hence the lookup on my db already does what the stripping would do.
The problem I have is that I need to set a flag based upon the calledID, to oute to asterisk, and this is not possible since I am checking my my grp table to see if the user belongs to a grp, now in there the 040600 maps to a group called asterisk.
So if 040600 dials out, it uses is_user_in("From", ast) and set a flag, however if I do it in reverse, i.e call coming into the user, then I cant really check for anything, since 0845 will not be in the grp table.
iqbal
Steve Blair wrote:
Maybe. I'm getting lost in what you are trying to accomplish. I thought you wanted an inbound call through the gateway to the asterisk box to be presented with a called party number of 040600 extracted from 08450040600. If this isn't the case then please ignore my suggestion :-)
-Steve
Iqbal wrote:
but wouldnt that then be avoiding the mapping of 0845xxx to 040600 instead, i.e bypassing it,
Steve Blair wrote:
Can your gateway strip digits? If so use translation rules to strip the prefix from the called party number.
Iqbal wrote:
Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk - pstn, but decided to keep it all within ser). This is fine, because asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Maybe Im wrong, but wont you be able to do the check after you have done you alias lookup?
something like :
Invite: 0845 lookup("aliases"); invite: 040600 if(is_user_in("To","ast");.. ..setflagmagic.. }..
Maybe Im compleatly wrong. and dont see you rpoint..but it was just a tought (just barly read the tread)
-atle
* Iqbal iqbal@gigo.co.uk [050706 15:59]:
well kind of :-)
the 040600 (alias) is getting picked up, because the 0845 is routing there, and the call goes through, hence the lookup on my db already does what the stripping would do.
The problem I have is that I need to set a flag based upon the calledID, to oute to asterisk, and this is not possible since I am checking my my grp table to see if the user belongs to a grp, now in there the 040600 maps to a group called asterisk.
So if 040600 dials out, it uses is_user_in("From", ast) and set a flag, however if I do it in reverse, i.e call coming into the user, then I cant really check for anything, since 0845 will not be in the grp table.
iqbal
Steve Blair wrote:
Maybe. I'm getting lost in what you are trying to accomplish. I thought you wanted an inbound call through the gateway to the asterisk box to be presented with a called party number of 040600 extracted from 08450040600. If this isn't the case then please ignore my suggestion :-)
-Steve
Iqbal wrote:
but wouldnt that then be avoiding the mapping of 0845xxx to 040600 instead, i.e bypassing it,
Steve Blair wrote:
Can your gateway strip digits? If so use translation rules to strip the prefix from the called party number.
Iqbal wrote:
Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk - pstn, but decided to keep it all within ser). This is fine, because asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
I use aliases to map external numbers to my internal numbers. In your example I would create an alias for 08450040600 that directs the call to 040600. Then when an external call comes in and you do a lookup("aliases") in ser.cfg your ruri is set to the internal number and your other processing should then work.
Regards
Stuart
-----Original Message----- From: serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] On Behalf Of Iqbal Sent: 06 July 2005 14:30 To: Steve Blair Cc: serusers@lists.iptel.org Subject: Re: [Serusers] call routing problem
but wouldnt that then be avoiding the mapping of 0845xxx to 040600 instead, i.e bypassing it,
Steve Blair wrote:
Can your gateway strip digits? If so use translation rules to strip the prefix from the called party number.
Iqbal wrote:
Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk
- pstn, but decided to keep it all within ser). This is fine, because
asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
_______________________________________________ Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
That part works fine, but when using is_user_in I need to match the From, To in the grptable which only contains my 040600 aliases, as opposed to 0845, maybe I should match the R-URI
Iqbal
Stuart Kirkwood - Jubilee Consultancy Limited wrote:
I use aliases to map external numbers to my internal numbers. In your example I would create an alias for 08450040600 that directs the call to 040600. Then when an external call comes in and you do a lookup("aliases") in ser.cfg your ruri is set to the internal number and your other processing should then work.
Regards
Stuart
-----Original Message----- From: serusers-bounces@iptel.org [mailto:serusers-bounces@lists.iptel.org] On Behalf Of Iqbal Sent: 06 July 2005 14:30 To: Steve Blair Cc: serusers@lists.iptel.org Subject: Re: [Serusers] call routing problem
but wouldnt that then be avoiding the mapping of 0845xxx to 040600 instead, i.e bypassing it,
Steve Blair wrote:
Can your gateway strip digits? If so use translation rules to strip the prefix from the called party number.
Iqbal wrote:
Hi
I am mapping external numbers to internal ones in a db, eg 08450040600 maps to 040600
So when a call comes from pstn to 08450040600 it hits the ip phone on 040600, all well and good.
Now what I am testing is deploying asterisk for other features like call pickup and all. I have managed to create separate contexts in asterisk based on company ID (i.e virtual PBX) assigned from a DB.
And when a call from IP phone A (company id =cid=500) calls out the call goes via ser (thats where all IP phones are registered) to asterisk, and then out to ser --->pstn (was gonna go out via asterisk
- pstn, but decided to keep it all within ser). This is fine, because
asterisk is in the loop.
Now what I need is for inbound calls to that IP phone to also be routed into asterisk, and then to ser and to the ipphone, that way I pull all calls for each company into a asterisk context for all its pbx functionality.
The problem is that when 0845 is called from pstn, I cant setflag on it, using is_user_in, since From = pstn dialing number, and To = 4408450040600, and not 040600, any ideas on what I can match on so that I can set the correct flag and divert to asterisk.
Iqbal
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
Serusers mailing list serusers@lists.iptel.org http://lists.iptel.org/mailman/listinfo/serusers
.