SearchSearch  Log in to check your private messagesLog in to check your private messages  recent posts Recent Posts
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
bigblokeOffline



Joined: Aug 15, 2004
Posts: 66
Location: Newport South Wales
Status: Offline
Posted: Feb 19, 2008 - 10:43 PM Reply with quote Back to top
Hi all,

I "think" the answer to my question here is "yes...but it wont return what you want it to".

Nevertheless I am still trying to find a way to get
asterisk to inherit the value of a variable obtained from a shell command sequence

I have created a caller-id translation table for incoming skype calls (to avoid confusion when skype IDs come into * as CLI).

The ethos for doing this is my mate's wife (a voip 'naysayer') who asks searching questions of him... like "who is 'fido_xyz123' and why are they calling us?" when if it said "Freda&Jim" she would probably have just answered it.

the command line simply greps the file for ${callerid) and pipes it to a 'cut' command that retrieves the second field delimited by a ':' - it works fine manually in the shell.

It seems that, after much huffing about, a system() call cannot return the revised string, just a "I did it" or an "I didnt do it" if I've RTFM'd correctly

I have tried to eval(system()) but don't get my desired output.

I have seen references to app_backticks() , indeed I have found the C code, but haven't managed to get this integrated.

Is there a <<simple>> way of doing this please ? perl script I suppose ?

regards

BB
View user's profile Send private message MSN Messenger ICQ Number
ianplainOffline
Site Admin


Joined: Jul 05, 2004
Posts: 2909
Location: Bath UK
Status: Offline
Posted: Feb 22, 2008 - 09:05 PM Reply with quote Back to top
Hi

Two ideas

1. use the astdb and store the skype id as the key and the true caller id as the value, I do this for caller ID taging

or
2. have a look at curl

Ian
View user's profile Send private message
thelostpacketOffline



Joined: Aug 08, 2007
Posts: 12

Status: Offline
Posted: Mar 04, 2008 - 04:02 AM Reply with quote Back to top
Why not just write a simple subroutine in the dialplan that changes the Caller ID with an if statement (or a list of them). Simple, effective and if your list of contacts isn't outrageous then that should work just fine.

Thanks
TheLostPacket
View user's profile Send private message
bigblokeOffline



Joined: Aug 15, 2004
Posts: 66
Location: Newport South Wales
Status: Offline
Posted: Mar 04, 2008 - 08:09 AM Reply with quote Back to top
thelostpacket :
Why not just write a simple subroutine in the dialplan that changes the Caller ID with an if statement (or a list of them). Simple, effective and if your list of contacts isn't outrageous then that should work just fine.


Hi ,

Thats "kind of" what I am doing now, its rather ungainly (about 48 skype contacts) and I need to do it twice:

Once for translating inbound Skype IDs,
Once for translating outbound short dials back to skype IDs,

I want to set up a database table which I can manage without a dialplan , but that asterisk can use. Astdb seems to be the way forward as it is resillient to system reboots. However, I haven't yet done the research to establish how to rapidly populate the database table from outside of a dialplan.

I've finally got sisky EE working in trunk mode Ian, Seems there are many ways to skin the cat ! what an emb*****ance!

good now that it works though

regards

BB
View user's profile Send private message MSN Messenger ICQ Number
thelostpacketOffline



Joined: Aug 08, 2007
Posts: 12

Status: Offline
Posted: Mar 05, 2008 - 01:11 AM Reply with quote Back to top
Bigbloke, one word for you func_odbc. You can use some RDBMS like postgresql or mysql anything unixODBC supports actually.

Thanks
-TheLostPacket
View user's profile Send private message


View previous topic Printable version Log in to check your private messages View next topic

Post new topic   Reply to topic
Forum Rules and Guidelines | About VoIP User | Privacy Policy


All logos and trademarks in this site are property of their respective owner.
Comments and posts are property of the poster, all the rest (c) 2003-2008 VoIP User Limited.

VoIP User Limited is incorporated in England and Wales under Company Number 6694577.

No part of this site may be reproduced without our prior consent.