[Blink] Dialing rules
Olaf Monien
olaf at monien.net
Thu May 12 16:15:33 CEST 2011
Alright, I'll give it a shot ...
Regards / Grüße,
Olaf Monien
------------------------------------------
Developer Experts, LLC
www.developer-experts.net
www.monien.net/blog
Office USA
10600 Chevrolet Way #211
Estero, FL 33928
Fon: +1 (239) 494 5049
Office Germany
Daniel Magin
Gerhart-Hauptmann-Ring 134
60439 Frankfurt am Main
Fon: +49 (69) 175 548 150
Am 12.05.2011 um 09:57 schrieb Adrian Georgescu:
> Locate ContactWindowController.py file and the function startSessionWithSIPURI(). Replace at its very beginning the line:
>
> def startSessionWithSIPURI(self, text, session_type="audio"):
> account = self.activeAccount()
>
> With something like:
>
> def startSessionWithSIPURI(self, text, session_type="audio"):
> for account in AccountManager().iter_accounts():
> # select account based on a custom logic:
> if account.id.domain == 'sipgate.de' and text.startswith('0049'):
> break
> else:
> # no account matched, take the default
> account = self.activeAccount()
>
> The account structure is documented here:
>
> http://sipsimpleclient.com/wiki/SipMiddlewareApi#Account
>
> Adrian
>
> On May 12, 2011, at 3:40 PM, Olaf Monien wrote:
>
>> Well, Python is not in my skill set, but I will be ok, if you consider the idea to be implemented in some future release. If you think its too much of a niche feature to actually implement it, I won't die either ;-)
>>
>>
>> Regards / Grüße,
>> Olaf Monien
>> ------------------------------------------
>> Developer Experts, LLC
>> www.developer-experts.net
>> www.monien.net/blog
>>
>> Office USA
>> 10600 Chevrolet Way #211
>> Estero, FL 33928
>> Fon: +1 (239) 494 5049
>>
>> Office Germany
>> Daniel Magin
>> Gerhart-Hauptmann-Ring 134
>> 60439 Frankfurt am Main
>> Fon: +49 (69) 175 548 150
>>
>> Am 12.05.2011 um 03:50 schrieb Adrian Georgescu:
>>
>>>
>>> On May 11, 2011, at 11:27 PM, Olaf Monien wrote:
>>>
>>>>
>>>>
>>>> Am 11.05.2011 um 15:20 schrieb Adrian Georgescu:
>>>>
>>>>> Given the current Blink GUI design, how would such feature look like? Now when one makes an outbound call at least is known which account is being used.
>>>>
>>>> I would suggest an "Auto" account, which would be a "virtual" account, that tries to find matching rules. If no rule matches, the default account will be used. These rules would be like so (pseudo code)
>>>>
>>>> "if number to dial starts with +49 then use Account1
>>>> else if number to dial starts with +1 then use Account2
>>>> else use Account 3"
>>>>
>>>
>>> If you know Python I can tell you where you can insert this logic into the code and you can do it yourself like this. Is this good enough for you?
>>>
>>> Regards,
>>> Adrian
>>>
>>>
>>>
>>> _______________________________________________
>>> Blink mailing list
>>> Blink at lists.ag-projects.com
>>> http://lists.ag-projects.com/mailman/listinfo/blink
>>
>> _______________________________________________
>> Blink mailing list
>> Blink at lists.ag-projects.com
>> http://lists.ag-projects.com/mailman/listinfo/blink
>
> _______________________________________________
> Blink mailing list
> Blink at lists.ag-projects.com
> http://lists.ag-projects.com/mailman/listinfo/blink
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4383 bytes
Desc: not available
URL: <http://lists.ag-projects.com/pipermail/blink/attachments/20110512/40c4f315/attachment.bin>
More information about the Blink
mailing list